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.
45 lines
1.1 KiB
45 lines
1.1 KiB
/**
|
|
******************************************************************************
|
|
* @copyright Copyright (C), 2016-2022, ConvenientPower. Co., Ltd.
|
|
* @file comp_protection.h
|
|
* @version 1.0
|
|
* @author qing.cheng
|
|
* @date 2022-11-16
|
|
* @brief Header file of COMP_COMMON_H module.
|
|
******************************************************************************
|
|
*/
|
|
#ifndef _COMP_COMMON_H_
|
|
#define _COMP_COMMON_H_
|
|
|
|
#include "core_comm.h"
|
|
#include "drv_comm.h"
|
|
|
|
typedef enum
|
|
{
|
|
PORT0 = 0,
|
|
PORT1 = 1,
|
|
PORT2 = 2,
|
|
} PORT_NUM_e;
|
|
/*
|
|
* @brief trigger check
|
|
* @note
|
|
* @param curr_value:
|
|
* @param trigger_thrsh:
|
|
* @param less_trigger:
|
|
* @param times:max compare times
|
|
* @param time_step
|
|
* @param debounce
|
|
* @retval
|
|
*/
|
|
bool comp_common_trigger_check(uint32_t curr_value, uint32_t trigger_thrsh, bool less_trigger, uint8_t *times, uint8_t time_step, uint16_t debounce);
|
|
|
|
/*
|
|
* @brief comp_dac_close_vbus
|
|
* @param port(0:GATE1,1:GATE2,2:GATE3)
|
|
* @param bool enable (0:disable,1:enable)
|
|
* @note null
|
|
* @retval null
|
|
*/
|
|
void comp_common_dac_vbus_switch(uint8_t port, bool enable);
|
|
|
|
#endif
|
|
|