.

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers protocol.h Source File

protocol.h

00001 #ifndef PROTOCOL_H
00002 #define PROTOCOL_H
00003 
00004 #include "mbed.h"
00005 
00006 #define STATE_START_OF_FRAME 0
00007 #define STATE_PROPULSION 1
00008 #define STATE_DIRECTION 2
00009 #define STATE_CHECKSUM 3
00010 
00011 char calculateChecksum(uint32_t propulsion, uint32_t direction);
00012 void decodeMessage(char c);
00013 void getVerifiedPWMValues(uint32_t *pwmPropulsion, uint32_t *pwmDirection);
00014 char isDataAvailable();
00015 
00016 #endif