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.
radio.h@10:c4629b6c42f8, 2017-10-15 (annotated)
- Committer:
- Cheroukee
- Date:
- Sun Oct 15 23:13:18 2017 +0000
- Revision:
- 10:c4629b6c42f8
- Parent:
- 3:6ea97936f6fa
- Child:
- 13:b44c1f678aff
Added quick queue module, fixed data reception to fill in message structure
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Cheroukee | 10:c4629b6c42f8 | 1 | |
Cheroukee | 10:c4629b6c42f8 | 2 | #pragma once |
Cheroukee | 1:5fc0c0996264 | 3 | |
Cheroukee | 1:5fc0c0996264 | 4 | #define HEADER_DELIMITER 0b01010101 |
Cheroukee | 1:5fc0c0996264 | 5 | |
Cheroukee | 10:c4629b6c42f8 | 6 | #define HEADER_START 0b01111110 |
Cheroukee | 1:5fc0c0996264 | 7 | |
Cheroukee | 1:5fc0c0996264 | 8 | #define FOOTER_END 0b11111110 |
Cheroukee | 1:5fc0c0996264 | 9 | |
Cheroukee | 1:5fc0c0996264 | 10 | #define MAX_MESSAGE_LENGTH 80 |
Cheroukee | 1:5fc0c0996264 | 11 | |
Cheroukee | 2:fdb34827d964 | 12 | typedef char byte; |
Cheroukee | 1:5fc0c0996264 | 13 | |
Cheroukee | 1:5fc0c0996264 | 14 | typedef struct { |
Cheroukee | 1:5fc0c0996264 | 15 | byte preambule; |
Cheroukee | 1:5fc0c0996264 | 16 | byte start; |
Cheroukee | 1:5fc0c0996264 | 17 | byte options; |
Cheroukee | 1:5fc0c0996264 | 18 | byte length; |
Cheroukee | 10:c4629b6c42f8 | 19 | byte data[MAX_MESSAGE_LENGTH] = { 0 }; |
Cheroukee | 1:5fc0c0996264 | 20 | byte control; |
Cheroukee | 1:5fc0c0996264 | 21 | byte end; |
Cheroukee | 1:5fc0c0996264 | 22 | } radio_message_t; |
Cheroukee | 1:5fc0c0996264 | 23 | |
Cheroukee | 2:fdb34827d964 | 24 | // API |
Cheroukee | 10:c4629b6c42f8 | 25 | // public functions |
Cheroukee | 3:6ea97936f6fa | 26 | void init_radio_system(); |
Cheroukee | 3:6ea97936f6fa | 27 | |
Cheroukee | 10:c4629b6c42f8 | 28 | bool send_message(char* buffer, int length); |