NANO130_H2Press/User/adc_bat.h

32 lines
782 B
C
Raw Normal View History

2025-04-10 14:54:41 +08:00
/*----------------------------------------------------------------*
* *
* *
* *
* *
* *
* 2017-02-10 *
* *
*----------------------------------------------------------------*/
#ifndef USER_ADC_BAT_PRESENT
#define USER_ADC_BAT_PRESENT
// 颠倒字节顺序
uint16_t ntohs(uint16_t n);
uint32_t ntohl(uint32_t n);
#define htons(n) ntohs(n)
#define htonl(n) ntohl(n)
// 初始化引脚
void Battery_Init(void);
void Battery_Open();
// 读电池数据并解析
uint32_t DS2788_ReadBattery(data_dtu_t *sample);
// 充放电改变标志
extern uint8_t bat_CurrentEvent;
extern uint32_t Poweroff_time;
#endif