positioner_testing_project/User/driver/ht1200m.c

24 lines
660 B
C
Raw Permalink 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.

#include "ht1200m.h"
/**
* @brief 重置hart_ht1200m模块
*
* 该函数用于重置hart_ht1200m模块通过操作硬件复位引脚和RTS引脚实现。
*
* 具体步骤如下:
* 1. 将HART1和HART2的复位引脚置高电平启动复位过程。
* 2. 延时10毫秒确保复位过程完成。
* 3. 将HART1和HART2的复位引脚置低电平结束复位过程。
* 4. 将HART1和HART2的RTS引脚设置为接收状态准备接收数据。
*/
extern void hart_ht1200m_reset(void)
{
HART1_RESET_ON;
HART2_RESET_ON;
HAL_Delay(10);
HART1_RESET_OFF;
HART2_RESET_OFF;
HART1_RTS_RECEIVE;
HART2_RTS_RECEIVE;
}