APP 4

Dependencies:   mbed CRC16 mbed-rtos

Committer:
vinbel93
Date:
Mon Feb 22 18:31:05 2016 +0000
Revision:
18:493a5aa7e4ec
Parent:
16:cf433716f8d6
Parent:
17:8d8c33bdcaf5
Child:
19:41e914ab0d19
Merge des 'ti changes

Who changed what in which revision?

UserRevisionLine numberNew contents of line
manl2003 2:1250280a511b 1 #include "mbed.h"
manl2003 2:1250280a511b 2 #include "LPC17xx.h"
manl2003 4:272f227e4442 3 #include <bitset>
manl2003 4:272f227e4442 4
manl2003 12:715af3660c73 5
vinbel93 5:9f05591944ba 6 #pragma once
manl2003 2:1250280a511b 7
manl2003 2:1250280a511b 8 #define CLOCKS_TO_SECOND 96000000
vinbel93 13:195826b8c61b 9 #define FRAMESIZE 100
vinbel93 9:b937f9c6d682 10 #define MAX_DATA 640
vinbel93 6:3181f546e812 11
vinbel93 6:3181f546e812 12 using namespace std;
manl2003 12:715af3660c73 13
manl2003 16:cf433716f8d6 14 enum STATES
manl2003 16:cf433716f8d6 15 {
manl2003 16:cf433716f8d6 16 PREAMBLE = 0,
manl2003 16:cf433716f8d6 17 START = 1,
manl2003 16:cf433716f8d6 18 TYPE = 2,
manl2003 16:cf433716f8d6 19 LENGTH = 3,
manl2003 16:cf433716f8d6 20 DATA = 4,
manl2003 16:cf433716f8d6 21 CRC16STATE = 5,
manl2003 16:cf433716f8d6 22 END = 6
manl2003 16:cf433716f8d6 23 };
manl2003 16:cf433716f8d6 24
vinbel93 15:ed9511c3aac6 25 extern void _decodeCallback(bitset<MAX_DATA> decMessage);
vinbel93 17:8d8c33bdcaf5 26 extern void _decodeError();
manl2003 16:cf433716f8d6 27 extern void _updateState(STATES state);
vinbel93 17:8d8c33bdcaf5 28 extern void _readDephased();