APP Team
/
app3
led example with 2 timers
main.h@5:726d7857fd33, 2014-02-12 (annotated)
- Committer:
- passelin
- Date:
- Wed Feb 12 07:07:48 2014 +0000
- Revision:
- 5:726d7857fd33
- Parent:
- 4:af325c921e79
02:07
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
passelin | 1:6e31c704f4d6 | 1 | #ifndef MAIN_H |
passelin | 1:6e31c704f4d6 | 2 | #define MAIN_H |
passelin | 1:6e31c704f4d6 | 3 | |
passelin | 1:6e31c704f4d6 | 4 | #include "mbed.h" |
passelin | 1:6e31c704f4d6 | 5 | #include "rtos.h" |
passelin | 2:124a066878cc | 6 | #include "lib_crc.h" |
passelin | 3:204e23521e39 | 7 | #include <stdlib.h> /* atoi */ |
passelin | 2:124a066878cc | 8 | #include <string> |
passelin | 2:124a066878cc | 9 | #include <bitset> |
passelin | 2:124a066878cc | 10 | |
passelin | 2:124a066878cc | 11 | #define OCTET 8 |
passelin | 2:124a066878cc | 12 | #define MAX_POOL_SIZE 696 |
passelin | 2:124a066878cc | 13 | #define PREAMBLE 0x55 |
passelin | 2:124a066878cc | 14 | #define START 0x3C |
passelin | 2:124a066878cc | 15 | #define TYPE 0x00 |
passelin | 2:124a066878cc | 16 | #define STOP 0x3E |
passelin | 2:124a066878cc | 17 | |
passelin | 5:726d7857fd33 | 18 | #define TIME 600000 // 100 ms |
passelin | 5:726d7857fd33 | 19 | |
passelin | 2:124a066878cc | 20 | typedef struct { |
passelin | 2:124a066878cc | 21 | string trame; |
passelin | 2:124a066878cc | 22 | char size; |
passelin | 2:124a066878cc | 23 | } message_t; |
passelin | 2:124a066878cc | 24 | |
passelin | 1:6e31c704f4d6 | 25 | |
passelin | 1:6e31c704f4d6 | 26 | void Writer_thread(void const *args); |
passelin | 1:6e31c704f4d6 | 27 | void Reader_thread(void const *args); |
passelin | 1:6e31c704f4d6 | 28 | void Modulator_thread(void const *args); |
passelin | 1:6e31c704f4d6 | 29 | void Demodulator_thread(void const *args); |
passelin | 1:6e31c704f4d6 | 30 | void Sender_thread(void const *args); |
passelin | 1:6e31c704f4d6 | 31 | void Receiver_thread(void const *args); |
passelin | 1:6e31c704f4d6 | 32 | |
passelin | 5:726d7857fd33 | 33 | extern "C" void TIMER3_IRQHandler (void); |
passelin | 4:af325c921e79 | 34 | extern "C" void TIMER2_IRQHandler (void); |
passelin | 1:6e31c704f4d6 | 35 | |
passelin | 1:6e31c704f4d6 | 36 | |
passelin | 1:6e31c704f4d6 | 37 | #endif // MAIN_H |