APP 4

Dependencies:   mbed CRC16 mbed-rtos

Committer:
manl2003
Date:
Tue Feb 23 21:15:05 2016 +0000
Revision:
27:011ad1667040
Parent:
26:f2b37f9dfca9
Tout beau, mef inclue.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vinbel93 26:f2b37f9dfca9 1 // Vincent Bélanger et Laurent Mandrile
vinbel93 26:f2b37f9dfca9 2 // belv1802 - manl2003
vinbel93 26:f2b37f9dfca9 3
manl2003 2:1250280a511b 4 #include "mbed.h"
manl2003 2:1250280a511b 5 #include "LPC17xx.h"
manl2003 4:272f227e4442 6 #include <bitset>
manl2003 4:272f227e4442 7
vinbel93 5:9f05591944ba 8 #pragma once
manl2003 2:1250280a511b 9
manl2003 2:1250280a511b 10 #define CLOCKS_TO_SECOND 96000000
vinbel93 20:f0932bfe09ed 11 #define FRAMESIZE 696
vinbel93 9:b937f9c6d682 12 #define MAX_DATA 640
manl2003 23:d41a23d8f2d7 13 #define DEBUG 0
vinbel93 6:3181f546e812 14
vinbel93 6:3181f546e812 15 using namespace std;
manl2003 12:715af3660c73 16
vinbel93 26:f2b37f9dfca9 17 // Enumération des états de la MEF
manl2003 16:cf433716f8d6 18 enum STATES
manl2003 16:cf433716f8d6 19 {
manl2003 23:d41a23d8f2d7 20 PREAMBLE,
manl2003 23:d41a23d8f2d7 21 START,
manl2003 23:d41a23d8f2d7 22 TYPE,
manl2003 23:d41a23d8f2d7 23 LENGTH,
manl2003 23:d41a23d8f2d7 24 DATA,
manl2003 23:d41a23d8f2d7 25 CRC16STATE,
manl2003 23:d41a23d8f2d7 26 END,
manl2003 23:d41a23d8f2d7 27 NOSTATE
manl2003 16:cf433716f8d6 28 };
manl2003 16:cf433716f8d6 29
vinbel93 26:f2b37f9dfca9 30 void debugPrint();
manl2003 23:d41a23d8f2d7 31 void initTimers();
vinbel93 20:f0932bfe09ed 32 extern void _decodeCallback(bitset<MAX_DATA> decMessage, int size);
vinbel93 17:8d8c33bdcaf5 33 extern void _decodeError();
manl2003 16:cf433716f8d6 34 extern void _updateState(STATES state);