.
https://www.mediafire.com/file/sjhxgn70gxshilg/protocol_spi_pwm.png/file
protocol.h@110:a6d1d3525014, 2022-04-07 (annotated)
- Committer:
- voltxd
- Date:
- Thu Apr 07 12:13:04 2022 +0000
- Revision:
- 110:a6d1d3525014
- Parent:
- 109:4ee7ffc8f175
.
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 | 109:4ee7ffc8f175 | 7 | #define STATE_PROPULSION 1 |
voltxd | 109:4ee7ffc8f175 | 8 | #define STATE_DIRECTION 2 |
voltxd | 109:4ee7ffc8f175 | 9 | #define STATE_CHECKSUM 3 |
voltxd | 109:4ee7ffc8f175 | 10 | |
voltxd | 109:4ee7ffc8f175 | 11 | char calculateChecksum(uint32_t propulsion, uint32_t direction); |
voltxd | 109:4ee7ffc8f175 | 12 | void decodeMessage(char c); |
voltxd | 110:a6d1d3525014 | 13 | void getVerifiedPWMValues(uint32_t *pwmPropulsion, uint32_t *pwmDirection); |
voltxd | 109:4ee7ffc8f175 | 14 | char isDataAvailable(); |
voltxd | 109:4ee7ffc8f175 | 15 | |
voltxd | 109:4ee7ffc8f175 | 16 | #endif |