40 lines
786 B
C
40 lines
786 B
C
/*
|
||
* @Date: 2025-06-26 09:38:45
|
||
* @LastEditors: 路怀帅
|
||
* @LastEditTime: 2025-07-05 11:31:57
|
||
* @FilePath: \RVMDK(uv5)e:\个人项目\零距电子\安灯遥控器\Andon_Remote_Control\Andon_RTOS\User\inc\bsp_bat.h
|
||
*/
|
||
#ifndef __BAT_H
|
||
#define __BAT_H
|
||
|
||
#include "main.h"
|
||
|
||
typedef struct
|
||
{
|
||
void (*Init)(void);
|
||
uint8_t (*Read_State)(void);
|
||
} BATClassStruct;
|
||
|
||
typedef enum
|
||
{
|
||
BAT_Charging = 0, // 电池充电中
|
||
BAT_Full, // 电池充满
|
||
BAT_Low, // 电池低电量
|
||
BAT_Hight // 电池高电量
|
||
|
||
} BAT_State_Enum;
|
||
|
||
extern BATClassStruct BATClass;
|
||
void Power_button_init(void);
|
||
uint8_t Check_Power_buttun(void);
|
||
|
||
|
||
typedef struct {
|
||
void (* Init)(void);
|
||
uint16_t (* GetValue)(uint8_t ADC_channelx);
|
||
} ADC1ClassStruct;
|
||
|
||
extern ADC1ClassStruct ADC1Class;
|
||
|
||
#endif
|