[core] Prepare for project name change
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#include <Flash.h>
|
||||
|
||||
LibreTuya LT;
|
||||
LibreTuyaOTA OTA;
|
||||
LibreTuyaWDT WDT;
|
||||
LibreTiny LT;
|
||||
LibreTinyOTA OTA;
|
||||
LibreTinyWDT WDT;
|
||||
EspClass ESP;
|
||||
FlashClass Flash;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <libretuya.h>
|
||||
#include <libretiny.h>
|
||||
|
||||
/**
|
||||
* @brief Get CPU family ID (as lt_cpu_family_t enum member).
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <libretuya.h>
|
||||
#include <libretiny.h>
|
||||
|
||||
/**
|
||||
* @brief Initialize the family core (optional).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <libretuya.h>
|
||||
#include <libretiny.h>
|
||||
|
||||
/**
|
||||
* @brief Get total RAM size.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <libretuya.h>
|
||||
#include <libretiny.h>
|
||||
#include <uf2ota/uf2types.h>
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <libretuya.h>
|
||||
#include <libretiny.h>
|
||||
|
||||
// https://stackoverflow.com/a/3437484
|
||||
#define MAX(a, b) \
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <libretuya.h>
|
||||
#include <libretiny.h>
|
||||
|
||||
/**
|
||||
* @brief Enable the hardware watchdog.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <libretuya.h>
|
||||
#include <libretiny.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Copyright (c) Kuba Szczodrzyński 2022-06-19. */
|
||||
|
||||
#include <libretuya.h>
|
||||
#include <libretiny.h>
|
||||
|
||||
#include <fal.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user