diff --git a/si4/soft_gsm_main.si4project/soft_gsm_main.sip_sym b/si4/soft_gsm_main.si4project/soft_gsm_main.sip_sym index 6bffbb8..5498516 100644 Binary files a/si4/soft_gsm_main.si4project/soft_gsm_main.sip_sym and b/si4/soft_gsm_main.si4project/soft_gsm_main.sip_sym differ diff --git a/si4/soft_gsm_main.si4project/soft_gsm_main.siwork b/si4/soft_gsm_main.si4project/soft_gsm_main.siwork index 7b1667e..591c26d 100644 Binary files a/si4/soft_gsm_main.si4project/soft_gsm_main.siwork and b/si4/soft_gsm_main.si4project/soft_gsm_main.siwork differ diff --git a/source/app/app_drv.c b/source/app/app_drv.c index 37a49b5..e7011af 100644 --- a/source/app/app_drv.c +++ b/source/app/app_drv.c @@ -65,11 +65,15 @@ void L3_UARTcom3_exp_protocol(TS_Handle_PH3 *p) { if (1 == p->ok) { + #if 1 TS_PH3_ccmodbus ccmodbus; - //L0_uart0_uc(0xaa); byte_copy_uc((U8*)&ccmodbus,(U8*)&p->ts_ccmodbus,p->ts_ccmodbus.num + 3); - p->ok = 0; G.rfid = ccmodbus.buf[0]; + L0_uart3_uc(G.rfid & 0xFF); + #else + L0_uart3_uc(p->reg); + #endif + p->ok = 0; } } diff --git a/source/app/main.c b/source/app/main.c index 043d263..ae5c2c0 100644 --- a/source/app/main.c +++ b/source/app/main.c @@ -126,10 +126,6 @@ void main(void) s_nos_tick.t1s_heatbeart = 0; //L0_uart0_uc('.'); L0_uart0_sendArray("abcdefg", 7); - D_P03_REV(); - D_P04_REV(); - D_P05_REV(); - D_P06_REV(); } //串口3 RFID接收 L3_UARTcom3_exp_protocol(&s_uart3_rec); diff --git a/source/bsp/bsp_config.c b/source/bsp/bsp_config.c index 2634b9c..625a1de 100644 --- a/source/bsp/bsp_config.c +++ b/source/bsp/bsp_config.c @@ -222,7 +222,7 @@ void L1_s2b_PH3_0(unsigned char sbufreg) //uart3 void L1_s2b_PH3_3(unsigned char sbufreg) { - s_uart0_rec.reg = sbufreg; + s_uart3_rec.reg = sbufreg; L1_s2b_PH3(&s_uart3_rec); } diff --git a/source/msp/UART3.c b/source/msp/UART3.c index b040141..6d7055d 100644 --- a/source/msp/UART3.c +++ b/source/msp/UART3.c @@ -201,9 +201,7 @@ void INTERRUPT_UART3(void) D_SERVE_UART3// using 3 /// output: 对应的结构体变量中携带 缓存buf和协议ok的标志 //s_uart3_rec.reg = L0_uart3_get(); //s_uart3_rec.ok = 1; - //s_uart3_rec.reg = L0_uart3_get(); - //s_uart3_rec.ok = 1; - //Lp0_uart3_fun(L0_uart3_get()); + Lp0_uart3_fun(L0_uart3_get()); } //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< diff --git a/source/tpc/tpc_uart.c b/source/tpc/tpc_uart.c index dcfa511..cd89671 100644 --- a/source/tpc/tpc_uart.c +++ b/source/tpc/tpc_uart.c @@ -111,6 +111,7 @@ void L1_s2b_PH3(TS_Handle_PH3 *p)// reentrant p->sp[0] = p->head_0; p->sp[1] = p->head_1; p->num = 1; + //p->ok = 1; } }else { @@ -128,7 +129,7 @@ void L1_s2b_PH3(TS_Handle_PH3 *p)// reentrant if(p->num >= p->max) { //p->ts_ccmodbus.crc = (p->sp[p->num-1] | p->sp[p->num]) & 0xFFFF; - if(checkCRC16(&p->__ts_ccmodbus)) + if(/*checkCRC16(&p->__ts_ccmodbus)*/ 1) { if (p->ok != 1) { diff --git a/source/tpc/tpc_uart.h b/source/tpc/tpc_uart.h index a81f6ab..637dd8a 100644 --- a/source/tpc/tpc_uart.h +++ b/source/tpc/tpc_uart.h @@ -220,7 +220,7 @@ extern void L1_s2b_PH2(struct _s_PH2_FFFE_ *p);// reentrant; /// 协议表达的意思为地址为0x52的从机, 功能码16 数据为11 22 33 44,校验码 F5 9F /// 校验码的范围为 -#define D_s_PH3_ccmodbus_max 16 +#define D_s_PH3_ccmodbus_max 32 #define D_s_PH3_ccmodbus_min 4 typedef struct