1. 增加可临时修改日志开关

This commit is contained in:
coffee 2026-04-19 23:50:54 +08:00
parent f6bc1d4631
commit 029be9ede5
2 changed files with 12 additions and 0 deletions

View File

@ -139,6 +139,13 @@ void HDLogInit(uint32_t (*getTime)());
*/
void HDLogSetOptCall(void (*call)(const char *format, va_list args));
/**
* @brief
* @param level
* @param enable
*/
void HDLogSetSwitch(uint8_t level, uint8_t enable);
/**
* @brief
* @return

View File

@ -279,6 +279,11 @@ void HDLogSetOptCall(void (*call)(const char *format, va_list args))
sOperateCall = call;
}
void HDLogSetSwitch(uint8_t level, uint8_t enable)
{
HBitSet(sLogItem, level, enable);
}
uint32_t HDLogGetTime()
{
if (sGetTime)