22 changed files with 177 additions and 45 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,43 @@ |
|||
#include "app_task_rfid.h" |
|||
#include "../msp/uart0.h" |
|||
#include "../msp/uart3.h" |
|||
|
|||
#define MODBUS_SLAVER_RETRY_MAX_TIME 3 |
|||
|
|||
TS_rfid ts_rfid; |
|||
|
|||
void L3_task_rfid_init(void) |
|||
{ |
|||
L1_task_init(&ts_rfid.task); |
|||
L3_task_s_go(ts_rfid,D_task_init); |
|||
} |
|||
|
|||
U8 rfid_start_pkg[] = {0xBB,0x00,0x27,0x00,0x03,0x22,0xFF,0xFF,0x4A,0x7E}; |
|||
U8 rfid_stop_pkg[] = {0xBB,0x00,0x28,0x00,0x00,0x28,0x7E}; |
|||
|
|||
void L1_enable_rfid() |
|||
{ |
|||
L0_uart0_sendArray(rfid_start_pkg,10); |
|||
L0_uart3_sendArray(rfid_start_pkg,10); |
|||
} |
|||
|
|||
void L1_disable_rfid() |
|||
{ |
|||
L0_uart0_sendArray(rfid_stop_pkg,7); |
|||
L0_uart3_sendArray(rfid_stop_pkg,7); |
|||
} |
|||
|
|||
#define D_task_rfid_send 0x51 |
|||
void L3_task_rfid_handle(TS_rfid *s) |
|||
{ |
|||
TTSS_Task_init(); |
|||
L2_task_go(D_task_rfid_send); |
|||
|
|||
TTSS_Task_step(D_task_rfid_send) |
|||
L1_enable_rfid(); |
|||
L2_task_go_Tdelay(D_task_rfid_send, D_Tdelay_10s); |
|||
|
|||
TTSS_Task_end(); |
|||
} |
|||
|
|||
|
@ -0,0 +1,17 @@ |
|||
#ifndef APP_TASK_RFID |
|||
#define APP_TASK_RFID |
|||
|
|||
#include "../ctask/task.h" |
|||
#include "app_common.h" |
|||
|
|||
typedef struct |
|||
{ |
|||
TS_task task; |
|||
}TS_rfid; |
|||
|
|||
extern TS_rfid ts_rfid; |
|||
|
|||
extern void L3_task_rfid_init(); |
|||
extern void L3_task_rfid_handle(TS_rfid *s); |
|||
|
|||
#endif |
Loading…
Reference in new issue