.
Dependencies: L432KC_SPI_Pey_Lal
protocol.h@114:c1f7be27aa5d, 2022-05-18 (annotated)
- Committer:
- voltxd
- Date:
- Wed May 18 16:12:59 2022 +0000
- Revision:
- 114:c1f7be27aa5d
- Parent:
- 110:a6d1d3525014
- Child:
- 115:156b8234f2de
ratio;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
voltxd | 109:4ee7ffc8f175 | 1 | #ifndef PROTOCOL_H |
voltxd | 109:4ee7ffc8f175 | 2 | #define PROTOCOL_H |
voltxd | 109:4ee7ffc8f175 | 3 | |
voltxd | 110:a6d1d3525014 | 4 | #include "mbed.h" |
voltxd | 109:4ee7ffc8f175 | 5 | |
voltxd | 109:4ee7ffc8f175 | 6 | #define STATE_START_OF_FRAME 0 |
voltxd | 114:c1f7be27aa5d | 7 | #define STATE_COMMAND_TYPE 1 |
voltxd | 114:c1f7be27aa5d | 8 | #define STATE_PAYLOAD 2 |
voltxd | 109:4ee7ffc8f175 | 9 | #define STATE_PROPULSION 1 |
voltxd | 109:4ee7ffc8f175 | 10 | #define STATE_DIRECTION 2 |
voltxd | 109:4ee7ffc8f175 | 11 | #define STATE_CHECKSUM 3 |
voltxd | 109:4ee7ffc8f175 | 12 | |
voltxd | 109:4ee7ffc8f175 | 13 | char calculateChecksum(uint32_t propulsion, uint32_t direction); |
voltxd | 109:4ee7ffc8f175 | 14 | void decodeMessage(char c); |
voltxd | 110:a6d1d3525014 | 15 | void getVerifiedPWMValues(uint32_t *pwmPropulsion, uint32_t *pwmDirection); |
voltxd | 109:4ee7ffc8f175 | 16 | char isDataAvailable(); |
voltxd | 109:4ee7ffc8f175 | 17 | |
voltxd | 109:4ee7ffc8f175 | 18 | #endif |