vasko ozo
/
TxRxService
20190816
Diff: main.cpp
- Revision:
- 20:b60d2a5cd128
- Parent:
- 19:09c21f5f0625
- Child:
- 22:1010cb11fb14
diff -r 09c21f5f0625 -r b60d2a5cd128 main.cpp --- a/main.cpp Wed Aug 07 17:53:12 2019 +0000 +++ b/main.cpp Wed Aug 07 21:03:37 2019 +0000 @@ -9,14 +9,15 @@ void tickIntrFunc(void){ MsgType _msg; _msg.cmd=0x41; - _msg.pars.i32=0; + _msg.pars.ui32=0x41424344; + StartTx(&_msg.cmd); if(StartTx(&_msg.cmd)==StartOK) dpc.printf("Packet sending OK\n\r"); - else dpc.printf("Sending service not ready\n\r"); + else dpc.printf("Last StartTx signalled TxBusy\n\r"); }//tickIntrFunc int main() { TxRxServiceInit(); - tickTx.attach(&tickIntrFunc, 1); + tickTx.attach(&tickIntrFunc, 0.5); //Exige Monumentum //Я дебил,потому что хотел выполнить действия,которые @@ -29,7 +30,7 @@ while(1) { if ( RxBuffFull == 1 ) { RxBuffFull = 0; - if(GetCheckSum(&RxBuff.cmd) == RxBuff.cs) myled = 0; else myled = 1; + if(GetCheckSum(&RxBuff.cmd) == RxBuff.cs) myled = !myled; } }//while(1) }//main