35 lines
483 B
C
Executable File
35 lines
483 B
C
Executable File
#ifndef __HAL_INTERFACE_BATTERY_H__
|
|
#define __HAL_INTERFACE_BATTERY_H__
|
|
#include <stdint.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif /* __cplusplus */
|
|
|
|
typedef enum{
|
|
SOLAR_IN = 0x1,
|
|
}BATTERY_STATUS;
|
|
|
|
typedef struct
|
|
{
|
|
uint8_t percent;
|
|
uint8_t charging;
|
|
BATTERY_STATUS status;
|
|
}HAL_BATTERY_INFO;
|
|
|
|
|
|
int32_t hal_battery_init();
|
|
|
|
int32_t hal_battery_deinit();
|
|
|
|
int32_t hal_battery_get(HAL_BATTERY_INFO *p_info);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
#endif
|
|
|