[core] Prepare for project name change

This commit is contained in:
Kuba Szczodrzyński
2023-04-24 11:35:39 +02:00
parent 85a687fc56
commit 461e4c6df0
56 changed files with 105 additions and 103 deletions

View File

@@ -71,7 +71,7 @@ class UpdateClass {
const char *errorString();
const char *getFirmwareName();
const char *getFirmwareVersion();
const char *getLibreTuyaVersion();
const char *getLibreTinyVersion();
const char *getBoardName();
private: /* UpdateUtil.cpp */

View File

@@ -161,9 +161,9 @@ const char *UpdateClass::getFirmwareVersion() {
}
/**
* @brief Get LibreTuya version from UF2 info.
* @brief Get LibreTiny version from UF2 info.
*/
const char *UpdateClass::getLibreTuyaVersion() {
const char *UpdateClass::getLibreTinyVersion() {
if (info)
return info->lt_version;
return NULL;

View File

@@ -8,7 +8,7 @@
* @brief ESP Arduino Core compatibility class.
*
* This class only consists of inline functions, which
* wrap the LibreTuya C API (lt_api.h). Refer to the docs of the C API
* wrap the LibreTiny C API (lt_api.h). Refer to the docs of the C API
* for more information.
*
* The class is accessible using the `ESP` global object.

View File

@@ -15,15 +15,15 @@
#define FlashId lt_flash_id_t
/**
* @brief Main LibreTuya API class.
* @brief Main LibreTiny API class.
*
* Since v1.0.0, this class only consists of inline functions, which
* wrap the LibreTuya C API (lt_api.h). Refer to the docs of the C API
* wrap the LibreTiny C API (lt_api.h). Refer to the docs of the C API
* for more information.
*
* The class is accessible using the `LT` global object.
*/
class LibreTuya {
class LibreTiny {
public: /* lt_cpu.h */
/** @copydoc lt_cpu_get_family() */
inline ChipFamily getChipFamily() { return lt_cpu_get_family(); }
@@ -109,6 +109,6 @@ class LibreTuya {
inline uint32_t getMaxFreeBlockSize() { return lt_heap_get_max_alloc(); }
};
extern LibreTuya LT;
extern LibreTiny LT;
#endif

View File

@@ -10,12 +10,12 @@
* @brief Over-the-Air updates helper class.
*
* This class only consists of inline functions, which
* wrap the LibreTuya C API (lt_api.h). Refer to the docs of the C API
* wrap the LibreTiny C API (lt_api.h). Refer to the docs of the C API
* for more information.
*
* The class is accessible using the `OTA` global object.
*/
class LibreTuyaOTA {
class LibreTinyOTA {
public: /* lt_ota.h */
/** @copydoc lt_ota_get_type() */
inline lt_ota_type_t getType() { return lt_ota_get_type(); }
@@ -39,6 +39,6 @@ class LibreTuyaOTA {
inline bool switchImage(bool revert = false) { return lt_ota_switch(revert); }
};
extern LibreTuyaOTA OTA;
extern LibreTinyOTA OTA;
#endif

View File

@@ -4,8 +4,8 @@
#include <Flash.h>
LibreTuya LT;
LibreTuyaOTA OTA;
LibreTuyaWDT WDT;
LibreTiny LT;
LibreTinyOTA OTA;
LibreTinyWDT WDT;
EspClass ESP;
FlashClass Flash;

View File

@@ -10,12 +10,12 @@
* @brief Watchdog control class.
*
* This class only consists of inline functions, which
* wrap the LibreTuya C API (lt_api.h). Refer to the docs of the C API
* wrap the LibreTiny C API (lt_api.h). Refer to the docs of the C API
* for more information.
*
* The class is accessible using the `WDT` global object.
*/
class LibreTuyaWDT {
class LibreTinyWDT {
public: /* lt_wdt.h */
/** @copydoc lt_wdt_enable() */
inline bool enable(uint32_t timeout = 10000) { return lt_wdt_enable(timeout); }
@@ -27,6 +27,6 @@ class LibreTuyaWDT {
inline void feed() { lt_wdt_feed(); }
};
extern LibreTuyaWDT WDT;
extern LibreTinyWDT WDT;
#endif

View File

@@ -2,8 +2,8 @@
#pragma once
// LibreTuya C API (with C standard libraries)
#include <libretuya.h>
// LibreTiny C API (with C standard libraries)
#include <libretiny.h>
// Additional C libraries
#include <sys/time.h>

View File

@@ -2,7 +2,7 @@
#pragma once
#include <libretuya.h>
#include <libretiny.h>
/**
* @brief Get CPU family ID (as lt_cpu_family_t enum member).

View File

@@ -2,10 +2,10 @@
#pragma once
#include <libretuya.h>
#include <libretiny.h>
/**
* @brief Get LibreTuya version string.
* @brief Get LibreTiny version string.
*/
const char *lt_get_version();

View File

@@ -2,7 +2,7 @@
#pragma once
#include <libretuya.h>
#include <libretiny.h>
/**
* @brief Read flash chip ID and return a lt_flash_id_t struct.

View File

@@ -2,7 +2,7 @@
#pragma once
#include <libretuya.h>
#include <libretiny.h>
/**
* @brief Initialize the family core (optional).

View File

@@ -2,7 +2,7 @@
#pragma once
#include <libretuya.h>
#include <libretiny.h>
/**
* @brief Get total RAM size.

View File

@@ -2,7 +2,7 @@
#pragma once
#include <libretuya.h>
#include <libretiny.h>
#include <uf2ota/uf2types.h>
/**

View File

@@ -2,7 +2,7 @@
#pragma once
#include <libretuya.h>
#include <libretiny.h>
// https://stackoverflow.com/a/3437484
#define MAX(a, b) \

View File

@@ -2,7 +2,7 @@
#pragma once
#include <libretuya.h>
#include <libretiny.h>
/**
* @brief Enable the hardware watchdog.

View File

@@ -37,7 +37,7 @@
// #define FDB_BIG_ENDIAN
#if LT_DEBUG_FDB
#include <libretuya.h>
#include <libretiny.h>
#include <printf/printf.h>
#define FDB_PRINT(...) __wrap_printf(__VA_ARGS__)
#define FDB_DEBUG_ENABLE

View File

@@ -14,7 +14,7 @@
#include <stdlib.h>
#include <string.h>
// LibreTuya version macros
// LibreTiny version macros
#ifndef LT_VERSION
#define LT_VERSION 1.0.0
#endif
@@ -28,7 +28,7 @@
#define GCC_VERSION_STR \
STRINGIFY_MACRO(__GNUC__) "." STRINGIFY_MACRO(__GNUC_MINOR__) "." STRINGIFY_MACRO(__GNUC_PATCHLEVEL__)
#define LT_BANNER_STR \
"LibreTuya v" LT_VERSION_STR " on " LT_BOARD_STR ", compiled at " __DATE__ " " __TIME__ ", GCC " GCC_VERSION_STR \
"LibreTiny v" LT_VERSION_STR " on " LT_BOARD_STR ", compiled at " __DATE__ " " __TIME__ ", GCC " GCC_VERSION_STR \
" (-O" STRINGIFY_MACRO(__OPTIMIZE_LEVEL__) ")"
// Functional macros

View File

@@ -2,7 +2,7 @@
#pragma once
// This file collects all LibreTuya C API includes.
// This file collects all LibreTiny C API includes.
// The functions are implemented in lt_api.c, which is located
// in the common core, and in the family cores.

View File

@@ -47,7 +47,7 @@ static const uint8_t colors[] = {
};
#endif
#if LIBRETUYA_ARDUINO
#if LIBRETINY_ARDUINO
unsigned long millis(void);
#endif
@@ -61,7 +61,7 @@ void lt_log(const uint8_t level, const char *format, ...) {
return;
#if LT_LOGGER_TIMESTAMP
#if LIBRETUYA_ARDUINO
#if LIBRETINY_ARDUINO
float seconds = millis() / 1000.0f;
#elif LT_HAS_FREERTOS
float seconds = xTaskGetTickCount() * portTICK_PERIOD_MS / 1000.0f;

View File

@@ -2,7 +2,7 @@
#pragma once
#include <libretuya.h>
#include <libretiny.h>
#ifdef __cplusplus
extern "C" {

View File

@@ -1,6 +1,6 @@
/* Copyright (c) Kuba Szczodrzyński 2022-06-19. */
#include <libretuya.h>
#include <libretiny.h>
#include <fal.h>