Files
CCU621M/app/mdu_comm/mdu_stm_status_comm.h
T

58 lines
1.4 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#ifndef MDU_STM_STATUS_COMM_H
#define MDU_STM_STATUS_COMM_H
#ifdef __cplusplus /*C++编译环境下兼容C语言*/
extern "C" {
#endif
/*------ Exported includes(头文件) ----------------------*/
#include "main.h"
#include "bsp_include.h"
/*------ Exported function prototypes (函数声明) -------*/
/**
* @brief 解析 STM32072 状态帧(ID 0x1801AABB
* @param rxMsg - 接收的 CAN 帧
* @return U8_T - 1:已处理该帧并更新内部状态 0:非本模块帧
*/
U8_T u8_stm_status_can_rx(CAN_DATA *rxMsg);
/**
* @brief 发送辅源/DO 控制帧(ID 0x1802BBAA)到 STM32072
*/
void v_stm_status_can_send_aux_frame(void);
/**
* @brief 获取 STM32 状态 CAN 中的枪插枪状态
* @param u8_gunNo - 枪号 0:A枪 1:B枪
* @return U8_T - 0未插枪 1插枪
*/
U8_T u8_stm_status_get_gun_plug(U8_T u8_gunNo);
/**
* @brief 获取 STM32 状态 CAN 中的 DI 状态
* @param u8_index - 0:DI1 1:DI2
* @return U8_T - 0/1
*/
U8_T u8_stm_status_get_di(U8_T u8_index);
/**
* @brief 获取 STM32 状态 CAN 中的 AUX 状态
* @param u8_index - 0:AUX_A 1:AUX_B
* @return U8_T - 0/1
*/
U8_T u8_stm_status_get_aux(U8_T u8_index);
/**
* @brief 判断是否启用国标相关功能(是否有国标枪)
* @return U8_T - 0:不启用 1:启用
*/
U8_T u8_stm_gb_enable(void);
#ifdef __cplusplus
}
#endif
#endif /* MDU_STM_STATUS_COMM_H */