AirsoftTimer software based on mbed
Dependencies: mbed TextLCD keypad
main.cpp@4:2c91c9eccf3a, 2014-12-13 (annotated)
- Committer:
- sillevl
- Date:
- Sat Dec 13 10:11:24 2014 +0000
- Revision:
- 4:2c91c9eccf3a
- Parent:
- 3:ce34dfe2463b
- Child:
- 7:baf207d88603
refactored startup code and added class placeholders for interface devices (board)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sillevl | 1:c80248c83025 | 1 | #include "mbed.h" |
sillevl | 2:f8e46daca111 | 2 | #include "cmsis_os.h" |
sillevl | 2:f8e46daca111 | 3 | |
sillevl | 2:f8e46daca111 | 4 | |
sillevl | 4:2c91c9eccf3a | 5 | #include "Airsofttimer.h" |
sillevl | 1:c80248c83025 | 6 | #include "TextLCD.h" |
sillevl | 1:c80248c83025 | 7 | |
sillevl | 4:2c91c9eccf3a | 8 | LedPins ledpins = {P2_4, P2_4}; // left, right |
sillevl | 1:c80248c83025 | 9 | |
sillevl | 4:2c91c9eccf3a | 10 | KeyboardPins keyboardpins = {{P0_8, P0_9, P0_10, P0_11}, {P0_16, P0_17, P0_18}}; |
sillevl | 1:c80248c83025 | 11 | |
sillevl | 4:2c91c9eccf3a | 12 | LcdPins lcdpins = {P1_30, P1_31, P0_23, P0_24, P0_25, P0_26}; |
sillevl | 2:f8e46daca111 | 13 | |
sillevl | 4:2c91c9eccf3a | 14 | Pinouts pinouts = { |
sillevl | 4:2c91c9eccf3a | 15 | P0_5, // button |
sillevl | 4:2c91c9eccf3a | 16 | P0_4, // key |
sillevl | 4:2c91c9eccf3a | 17 | ledpins, // leds |
sillevl | 4:2c91c9eccf3a | 18 | P2_3, // buzzer |
sillevl | 4:2c91c9eccf3a | 19 | keyboardpins, |
sillevl | 4:2c91c9eccf3a | 20 | lcdpins// lcd |
sillevl | 4:2c91c9eccf3a | 21 | }; |
sillevl | 2:f8e46daca111 | 22 | |
sillevl | 1:c80248c83025 | 23 | int main() |
sillevl | 1:c80248c83025 | 24 | { |
sillevl | 4:2c91c9eccf3a | 25 | Airsofttimer airsofttimer(pinouts); |
sillevl | 1:c80248c83025 | 26 | } |
sillevl | 2:f8e46daca111 | 27 | |
sillevl | 2:f8e46daca111 | 28 | |
sillevl | 4:2c91c9eccf3a | 29 | //DigitalOut heartbeatLed(LED1); |
sillevl | 4:2c91c9eccf3a | 30 | //DigitalOut led2(LED2); |
sillevl | 4:2c91c9eccf3a | 31 | //DigitalOut led3(LED3); |
sillevl | 4:2c91c9eccf3a | 32 | //DigitalOut led4(LED4); |
sillevl | 2:f8e46daca111 | 33 |