AirsoftTimer software based on mbed
Dependencies: mbed TextLCD keypad
main.cpp@11:50572814f73e, 2014-12-31 (annotated)
- Committer:
- sillevl
- Date:
- Wed Dec 31 15:27:43 2014 +0000
- Revision:
- 11:50572814f73e
- Parent:
- 7:baf207d88603
- Child:
- 27:f29805113454
ShowBuzzer;
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 | 7:baf207d88603 | 8 | PinName buttonpin = P0_5; |
sillevl | 7:baf207d88603 | 9 | PinName keypin = P0_4; |
sillevl | 7:baf207d88603 | 10 | PinName buzzerpin = P2_3; |
sillevl | 11:50572814f73e | 11 | LedPins ledpins = {P2_4, P2_5}; // left, right |
sillevl | 4:2c91c9eccf3a | 12 | KeyboardPins keyboardpins = {{P0_8, P0_9, P0_10, P0_11}, {P0_16, P0_17, P0_18}}; |
sillevl | 4:2c91c9eccf3a | 13 | LcdPins lcdpins = {P1_30, P1_31, P0_23, P0_24, P0_25, P0_26}; |
sillevl | 2:f8e46daca111 | 14 | |
sillevl | 4:2c91c9eccf3a | 15 | Pinouts pinouts = { |
sillevl | 7:baf207d88603 | 16 | buttonpin, |
sillevl | 7:baf207d88603 | 17 | keypin, |
sillevl | 7:baf207d88603 | 18 | ledpins, |
sillevl | 7:baf207d88603 | 19 | buzzerpin, |
sillevl | 4:2c91c9eccf3a | 20 | keyboardpins, |
sillevl | 7:baf207d88603 | 21 | lcdpins |
sillevl | 4:2c91c9eccf3a | 22 | }; |
sillevl | 2:f8e46daca111 | 23 | |
sillevl | 1:c80248c83025 | 24 | int main() |
sillevl | 1:c80248c83025 | 25 | { |
sillevl | 4:2c91c9eccf3a | 26 | Airsofttimer airsofttimer(pinouts); |
sillevl | 1:c80248c83025 | 27 | } |
sillevl | 2:f8e46daca111 | 28 | |
sillevl | 2:f8e46daca111 | 29 | |
sillevl | 4:2c91c9eccf3a | 30 | //DigitalOut heartbeatLed(LED1); |
sillevl | 4:2c91c9eccf3a | 31 | //DigitalOut led2(LED2); |
sillevl | 4:2c91c9eccf3a | 32 | //DigitalOut led3(LED3); |
sillevl | 4:2c91c9eccf3a | 33 | //DigitalOut led4(LED4); |
sillevl | 2:f8e46daca111 | 34 |