22 lines
540 B
C
22 lines
540 B
C
#ifndef CHARGER_PORT_H
|
|
#define CHARGER_PORT_H
|
|
|
|
#include <stdint.h>
|
|
#include "chip_io.h"
|
|
|
|
// 检测充电状态的GPIO
|
|
// #define CHARGER_GPIO_PIN S_AGPIO_L10
|
|
|
|
#define CHARGER_SUCC 0UL
|
|
#define CHARGER_FAIL 0xFFFFFFFF
|
|
#define CHARGER_INVALID_PARAM 0x80000001
|
|
|
|
uint32_t charger_host_peripheral_init(void);
|
|
uint32_t charger_host_peripheral_deinit(void);
|
|
uint32_t charger_status_sample(void);
|
|
uint32_t charger_sample(void);
|
|
uint16_t get_power_value(void);
|
|
float get_status_value(void);
|
|
float get_average_value(void);
|
|
|
|
#endif |