#ifndef APP_PROTECTION_H #define APP_PROTECTION_H #include #include "app_power_source.h" #include "protection.h" #define PROTECTION_WORK_PERIOD 4 /* in unit of ms */ void app_protection_init(void); void app_protection_work(void); bool app_port_is_in_fault(uint8_t port); bool app_sys_is_in_fault(ps_base_e ps_base_num); void app_protect_fake_reset(uint32_t port_mask); void app_update_remote_sys_fault(uint32_t fault_code_mask); /* Used for power path switching only. */ void app_set_port_fault(uint8_t port_num, uint32_t fault_code_mask); void app_clr_port_fault(uint8_t port_num, uint32_t fault_code_mask); void update_local_uvp_thresh(uint16_t vset); void update_local_ovp_thresh(uint16_t vset); void update_local_ocp_thresh(uint16_t iset); #endif /* APP_PROTECTION_H */