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.
28 lines
461 B
28 lines
461 B
#ifndef APP_TASK_485
|
|
#define APP_TASK_485
|
|
|
|
#include "../ctask/task.h"
|
|
#include "../tpc/tpc_modbus.h"
|
|
#include "app_common.h"
|
|
|
|
#define U485_BASE 1
|
|
|
|
typedef struct
|
|
{
|
|
TS_task task;
|
|
TS_PH4_modbus loopPkg;
|
|
TS_PH4_modbus *pAckPkg;
|
|
U8 slaverIndex;
|
|
U8 pkglen;
|
|
U32 sendStamp;
|
|
U8 retryTimes;
|
|
U8 ackFlag;
|
|
}TS_485;
|
|
|
|
#define U485_TIMEOUT 3 //3 x 100ms = 300ms
|
|
extern TS_485 ts_485;
|
|
|
|
extern void L3_task_485_init();
|
|
extern void L3_task_485_handle(TS_485 *s);
|
|
|
|
#endif
|
|
|