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
579 B
25 lines
579 B
1 year ago
|
#include "app_task_uart0.h"
|
||
|
#include "msp_uart0.h"
|
||
|
///#include "../app/common.h"
|
||
|
#include "app_config.h"
|
||
|
void L3_task_uart0_modbus_handler(Ts_uart_rev_ *ph4)
|
||
|
{
|
||
|
if(ph4->ok)
|
||
|
{
|
||
|
#if 1
|
||
|
TS_PH4_modbus *ts_modbus = (TS_PH4_modbus *)ph4->buf;
|
||
|
//L0_uart0_sendArray(ph4->buf, 8);
|
||
|
//L0_uart0_sendArray("abcdefgh", 8);
|
||
|
ph4->ok = 0;
|
||
|
if(ts_modbus->slaver == R.sd.slaver_id ||
|
||
|
ts_modbus->slaver == D_UART0_485_SLAVER_ID_BROADCAST) //从机
|
||
|
{
|
||
|
U16 acklen = L3_modbus_slaver_ack(ts_modbus,&s_uart0_ack);
|
||
|
L0_uart0_sendArray((U8*)&s_uart0_ack, acklen);
|
||
|
}
|
||
|
#endif
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|