Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp@16:459ad1bd82fd, 2019-08-04 (annotated)
- Committer:
- VASKO
- Date:
- Sun Aug 04 18:01:47 2019 +0000
- Revision:
- 16:459ad1bd82fd
- Parent:
- 15:30e45bd5902e
- Child:
- 18:bef650cab156
Redefinitions. Bug with "memcpy" parameters in "CopyArr_InitTx" fixed. (Struct and so on) packing problem solved.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
VASKO | 7:7aaa14391264 | 1 | #include "PrjDefs.h" |
VASKO | 0:5152e3f9df72 | 2 | |
VASKO | 0:5152e3f9df72 | 3 | DigitalOut myled(LED1); |
VASKO | 0:5152e3f9df72 | 4 | |
VASKO | 0:5152e3f9df72 | 5 | int main() { |
VASKO | 11:6519744c77f9 | 6 | TxRxServiceInit(); |
VASKO | 12:6f63e376c0aa | 7 | |
VASKO | 2:56a194afd255 | 8 | //Exige Monumentum |
VASKO | 9:dcddb19ad551 | 9 | //Я дебил,потому что хотел выполнить действия,которые |
VASKO | 2:56a194afd255 | 10 | //требуются постоянно,один раз и именно здесь. |
VASKO | 0:5152e3f9df72 | 11 | |
VASKO | 12:6f63e376c0aa | 12 | //Для дебилов: в mbed типы "int" и "unsigned int" имеют размер 4 байта !!! |
VASKO | 12:6f63e376c0aa | 13 | |
VASKO | 16:459ad1bd82fd | 14 | //https://os.mbed.com/forum/bugs-suggestions/topic/4264/ проблема выравнивания данных |
VASKO | 16:459ad1bd82fd | 15 | |
VASKO | 0:5152e3f9df72 | 16 | while(1) { |
VASKO | 15:30e45bd5902e | 17 | if ( RxBuffFull == 1 ) { |
VASKO | 15:30e45bd5902e | 18 | RxBuffFull = 0; |
VASKO | 15:30e45bd5902e | 19 | // if(GetCheckSum(&RxBuff.cmd) == RxBuff.cs){ |
VASKO | 15:30e45bd5902e | 20 | StartTx(&RxBuff.cmd); |
VASKO | 15:30e45bd5902e | 21 | StartTx(&RxBuff.cmd); |
VASKO | 15:30e45bd5902e | 22 | if( StartTx(&RxBuff.cmd) == StartOK)myled = 0 ;else myled = 1; |
VASKO | 15:30e45bd5902e | 23 | // myled = 0; |
VASKO | 15:30e45bd5902e | 24 | // } else myled = 1; |
VASKO | 10:f7a320faef76 | 25 | } |
VASKO | 8:cad966c09853 | 26 | }//while(1) |
VASKO | 9:dcddb19ad551 | 27 | }//main |
VASKO | 9:dcddb19ad551 | 28 |