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.
payload.cpp@8:6105ffbaf237, 2019-03-23 (annotated)
- Committer:
- hi1000
- Date:
- Sat Mar 23 09:18:03 2019 +0000
- Revision:
- 8:6105ffbaf237
- Parent:
- 7:e0c7e624c5fa
- Child:
- 9:486f65124378
add queue;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hi1000 | 7:e0c7e624c5fa | 1 | #include "mbed.h" |
hi1000 | 7:e0c7e624c5fa | 2 | |
hi1000 | 8:6105ffbaf237 | 3 | extern unsigned char rx_buffer[8], tx_buffer[8]; |
hi1000 | 7:e0c7e624c5fa | 4 | extern unsigned char rx_length, tx_length; |
hi1000 | 7:e0c7e624c5fa | 5 | |
hi1000 | 7:e0c7e624c5fa | 6 | void analyzePayload() |
hi1000 | 7:e0c7e624c5fa | 7 | { |
hi1000 | 8:6105ffbaf237 | 8 | int i; |
hi1000 | 8:6105ffbaf237 | 9 | |
hi1000 | 8:6105ffbaf237 | 10 | printf("analyzePayload thread\r\n"); |
hi1000 | 8:6105ffbaf237 | 11 | while (true) { |
hi1000 | 8:6105ffbaf237 | 12 | osEvent evt = can_queue.get(); |
hi1000 | 8:6105ffbaf237 | 13 | if (evt.status == osEventMessage) { |
hi1000 | 8:6105ffbaf237 | 14 | CANMessage *message = (CANMessage*)evt.value.p; |
hi1000 | 8:6105ffbaf237 | 15 | |
hi1000 | 8:6105ffbaf237 | 16 | mpool.free(message); |
hi1000 | 8:6105ffbaf237 | 17 | } |
hi1000 | 8:6105ffbaf237 | 18 | } |
hi1000 | 8:6105ffbaf237 | 19 | |
hi1000 | 7:e0c7e624c5fa | 20 | |
hi1000 | 7:e0c7e624c5fa | 21 | } |