#ifndef _TPS62740_H__ #define _TPS62740_H__ #include #include #include "define.h" #include "nrf_drv_gpiote.h" #ifdef __cplusplus extern "C" { #endif #define TPS62740_OFF nrf_gpio_pin_write(TPS72640_EN, 0); #define TPS62740_ON nrf_gpio_pin_write(TPS72640_EN, 1); #ifdef TPS62740_FAST #define TPS62740_FAST_DISABLE nrf_gpio_pin_write(TPS72640_FAST, 1); #define TPS62740_FAST_ENABLE nrf_gpio_pin_write(TPS72640_FAST, 0); #endif typedef enum{ TPS62740_OFF_V=0, TPS62740_1_8_V=1, TPS62740_1_9_V=2, TPS62740_2_0_V=3, TPS62740_2_1_V=4, TPS62740_2_2_V=5, TPS62740_2_3_V=6, TPS62740_2_4_V=7, TPS62740_2_5_V=8, TPS62740_2_6_V=9, TPS62740_2_7_V=10, TPS62740_2_8_V=11, TPS62740_2_9_V=12, TPS62740_3_0_V=13, TPS62740_3_1_V=14, TPS62740_3_2_V=15, TPS62740_3_3_V=16, TPS62740_NORMAL_V=17, }TPS62740_V_SEL; void nrf_tps62740_gpio_init(void); bool nrf_tps62740_v_set(TPS62740_V_SEL sel); #ifdef TPS72640_PG void tps62740_dio_init(nrf_drv_gpiote_in_config_t *config,nrfx_gpiote_evt_handler_t evt_handler); #endif void tps62740_alarm_init(nrf_drv_gpiote_in_config_t *config,nrfx_gpiote_evt_handler_t evt_handler); void tps62740_pg_pro(void); void tps62740_alarm_pro(void); #ifdef __cplusplus } #endif #endif // _TPS62740_H__ /** @} */