generated from hulk/gd32e23x_template_cmake_vscode
add tmp112a code
This commit is contained in:
@@ -17,7 +17,8 @@
|
||||
*/
|
||||
|
||||
/** @brief 传感器周期上报使能标志 */
|
||||
extern volatile bool g_sensor_report_enabled;
|
||||
extern volatile bool g_eddy_current_sensor_report_enabled;
|
||||
extern volatile bool g_temperature_sensor_report_enabled;
|
||||
|
||||
/**
|
||||
* @section Command_Protocol 协议格式
|
||||
@@ -62,23 +63,42 @@ extern volatile bool g_sensor_report_enabled;
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief 获取传感器周期上报使能状态。
|
||||
* @brief 获取电涡流传感器周期上报使能状态。
|
||||
* @return bool 上报状态。
|
||||
* @retval true 传感器周期上报已启用。
|
||||
* @retval false 传感器周期上报已禁用。
|
||||
* @ingroup Command
|
||||
*/
|
||||
bool get_sensor_report_enabled(void);
|
||||
bool get_eddy_sensor_report_enabled(void);
|
||||
|
||||
/**
|
||||
* @brief 设置传感器周期上报使能状态。
|
||||
* @brief 设置电涡流传感器周期上报使能状态。
|
||||
* @param enabled 上报使能标志。
|
||||
* @arg true 启用传感器周期上报。
|
||||
* @arg false 禁用传感器周期上报。
|
||||
* @note 推荐通过此函数修改状态,便于后续功能扩展。
|
||||
* @ingroup Command
|
||||
*/
|
||||
void set_sensor_report_status(bool enabled);
|
||||
void set_eddy_sensor_report_status(bool enabled);
|
||||
|
||||
/**
|
||||
* @brief 获取温度传感器周期上报使能状态。
|
||||
* @return bool 上报状态。
|
||||
* @retval true 传感器周期上报已启用。
|
||||
* @retval false 传感器周期上报已禁用。
|
||||
* @ingroup Command
|
||||
*/
|
||||
bool get_temp_sensor_report_enabled(void);
|
||||
|
||||
/**
|
||||
* @brief 设置温度传感器周期上报使能状态。
|
||||
* @param enabled 上报使能标志。
|
||||
* @arg true 启用传感器周期上报。
|
||||
* @arg false 禁用传感器周期上报。
|
||||
* @note 推荐通过此函数修改状态,便于后续功能扩展。
|
||||
* @ingroup Command
|
||||
*/
|
||||
void set_temp_sensor_report_status(bool enabled);
|
||||
|
||||
/**
|
||||
* @brief 处理串口环形缓冲区中的命令数据。
|
||||
@@ -103,4 +123,6 @@ void handle_command(const uint8_t *cmd, uint8_t len);
|
||||
|
||||
void eddy_current_report(void);
|
||||
|
||||
void temperature_raw_value_report(void);
|
||||
|
||||
#endif // COMMAND_H
|
||||
|
Reference in New Issue
Block a user