You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
791 B
25 lines
791 B
#ifndef APP_PROTECTION_H
|
|
#define APP_PROTECTION_H
|
|
|
|
#include <stdint.h>
|
|
#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 */
|
|
|