--- a/LPCBus/MC9.c Tue Jun 06 10:07:39 2017 +0200
+++ b/LPCBus/MC9.c Mon Jun 12 10:55:15 2017 +0200
@@ -12,12 +12,23 @@
return ((int16_t)*buffer<<8) + (int16_t)*(buffer+1);
+static inline int16_t getWordSwapped(char *buffer) + return (((int16_t)*(buffer+1))<<8) + (int16_t)*buffer; static inline void setWord(char *buffer, int16_t word)
*buffer = (char)(word>>8);
*(buffer+1) = (char)(word);
+static inline void setWordSwapped(char *buffer, int16_t word) + *(buffer+1) = (char)(word>>8); static inline int8_t getBit(char *buffer, unsigned char bitOffset)
return (*buffer & (0x01 << bitOffset)) && 1;