21 lines
510 B
C
21 lines
510 B
C
#ifndef __SCREEN_BRIGHTNESS_H__
|
||||
|
|
#define __SCREEN_BRIGHTNESS_H__
|
|||
|
|
|
|||
|
|
#ifdef __cplusplus
|
|||
|
|
extern "C" {
|
|||
|
|
#endif
|
|||
|
|
#include "config.h"
|
|||
|
|
|
|||
|
|
|
|||
|
|
extern uint8_t g_current_brightness;
|
|||
|
|
|
|||
|
|
/** percent: 0~100,与滑动条/BLE 一致;0→PWM 下限、100→PWM 上限(见 screen_brightness.c) */
|
|||
|
|
void set_system_brightness(int percent);
|
|||
|
|
/** 有亮度脏标记时写 NVS(内部 50ms 防抖定时器);供退出设置页等场景也可直接调用 */
|
|||
|
|
void commit_brightness_if_dirty(void);
|
|||
|
|
#ifdef __cplusplus
|
|||
|
|
}
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
#endif
|