forked from ccsens_hardware/stc_ttss_868
28 changed files with 202 additions and 99 deletions
Binary file not shown.
@ -0,0 +1,27 @@ |
|||
#include "task_uart.h" |
|||
#include "../bsp/bsp_config.h" |
|||
#include "../app/app_config.h" |
|||
#include "../msp/uart0.h" |
|||
#include "../msp/uart2.h" |
|||
S_TASK_UART_TRA s_task_uart; |
|||
void L3_task_uart_init(void) |
|||
{ |
|||
L1_task_init(&s_task_uart.task); |
|||
L3_task_s_go(s_task_uart,D_task_init); |
|||
} |
|||
#define D_task_uart2_send 0x50 |
|||
void L3_task_uart_handler(S_TASK_UART_TRA *s) |
|||
{ |
|||
TTSS_Task_init() |
|||
L2_task_go(D_task_uart2_send); |
|||
|
|||
TTSS_Task_step(D_task_uart2_send) |
|||
if(ts_uart[uNum2].t->reg!=0) |
|||
{ |
|||
LED0 ^= 1; |
|||
L0_uart2_sendArray("i",8); |
|||
} |
|||
L2_task_go_Tdelay(D_task_uart2_send,D_Tdelay_Msec(100)); //??100ms
|
|||
TTSS_Task_end(); |
|||
|
|||
} |
@ -0,0 +1,19 @@ |
|||
#ifndef _APP_TASK_UART_H |
|||
#define _APP_TASK_UART_H |
|||
|
|||
#include "../ctask/task.h" |
|||
#include "../clib/clib.h" |
|||
|
|||
typedef struct _s_task_uart |
|||
{ |
|||
TS_task task; |
|||
}S_TASK_UART_TRA; |
|||
|
|||
extern S_TASK_UART_TRA s_task_uart; |
|||
|
|||
extern void L3_task_uart_init(void); |
|||
extern void L3_task_uart_handler(S_TASK_UART_TRA *s); |
|||
|
|||
|
|||
#endif // #ifndef _APP_TASK_UART_H
|
|||
|
@ -0,0 +1,2 @@ |
|||
#include "868.h" |
|||
|
@ -0,0 +1,8 @@ |
|||
#ifndef BSP_868_H |
|||
#define BSP_868_H |
|||
|
|||
#include "../bsp/bsp_config.h" |
|||
#include "../msp/uart0.h" |
|||
|
|||
|
|||
#endif |
Loading…
Reference in new issue