forked from ccsens_hardware/stc_touch_pen
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.
77 lines
1.7 KiB
77 lines
1.7 KiB
3 years ago
|
////////////////////////////////////////////////////////////////////////////
|
||
|
///@copyright Copyright (c) 2018, 传控科技 All rights reserved.
|
||
|
///-------------------------------------------------------------------------
|
||
|
/// @file bsp_drv.c
|
||
|
/// @brief bsp @ driver config
|
||
|
///-------------------------------------------------------------------------
|
||
|
/// @version 1.0
|
||
|
/// @author CC
|
||
|
/// @date 20180331
|
||
|
/// @note cc_AS_stc02
|
||
|
//////////////////////////////////////////////////////////////////////////////
|
||
|
|
||
|
#include "app_drv.h"
|
||
|
#include "../clib/clib.h"
|
||
|
#include "../app/app_common.h"
|
||
|
#include "../app/app_task_485.h"
|
||
|
#include "../app/app_task_gm35.h"
|
||
|
|
||
|
/// reg.H,reg.L data0 data1 data2;
|
||
|
/// (reg.HL)=data0 (reg.HL+1)=data1 (reg.HL+2)=data2 (reg.HL+3)=data3
|
||
|
/// 0x0f 0----14 15
|
||
|
#if 0
|
||
|
TS_drv_ ts_drv[TS_DRV_MAX]=
|
||
|
{
|
||
|
0x0e,NULL, /// FE 01 02 03 04
|
||
|
0x12,NULL, //uart0 reply
|
||
|
0x0d,NULL, //433 camera //fd 01 02 03 06
|
||
|
0x99,NULL, //a9 gprs
|
||
|
0x00,NULL,
|
||
|
};
|
||
|
#endif
|
||
|
|
||
|
|
||
|
//U8 array[D_s_SSTR_0D0A_len+1];
|
||
|
TS_PH1A_DAT tsph1A;
|
||
|
|
||
|
void L3_UARTcom4_exp_protocol(TS_Handle_0d0a *p)
|
||
|
{
|
||
|
if (1 == p->ok )
|
||
|
{
|
||
|
#if 0
|
||
|
//U8 array[D_s_SSTR_0D0A_len+1];
|
||
|
U8 num = p->buf[0];
|
||
|
byte_copy_uc(array,p->buf+1,num);
|
||
|
|
||
|
array[num] = 0;
|
||
|
L3_protocol_handler_uart4_fun(array);
|
||
|
p->ok = 0;
|
||
|
#else
|
||
|
g_at_send_status.gprs_last_recv_stmp = s_nos_tick.t_1s;
|
||
|
L3_protocol_handler_uart4_fun(p->buf+1);
|
||
|
p->ok = 0;
|
||
|
#endif
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
void L3_task_a9_rcv_handle(TS_Handle_PH3 *p)
|
||
|
{
|
||
|
if (1 == p->ok)
|
||
|
{
|
||
|
g_at_send_status.tcp_last_recv_stmp = s_nos_tick.t_1s;
|
||
|
L3_protocol_handler_uart0_fun(&p->ts_ccmodbus,1);
|
||
|
p->ok = 0;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
void L3_UARTcom0_exp_protocol(TS_Handle_PH3 *p)
|
||
|
{
|
||
|
if (1 == p->ok)
|
||
|
{
|
||
|
L3_protocol_handler_uart0_fun(&p->ts_ccmodbus,0);
|
||
|
p->ok = 0;
|
||
|
}
|
||
|
}
|
||
|
|