AirsoftTimer software based on mbed
Dependencies: mbed TextLCD keypad
Diff: Airsofttimer.h
- Revision:
- 4:2c91c9eccf3a
- Parent:
- 0:4a0929f1b4fd
- Child:
- 5:be598835bab0
--- a/Airsofttimer.h Fri Dec 12 20:07:28 2014 +0000 +++ b/Airsofttimer.h Sat Dec 13 10:11:24 2014 +0000 @@ -1,30 +1,36 @@ -#ifndef _AIRSOFTTIMER_H -#define _AIRSOFTTIMER_H +#ifndef AIRSOFTTIMER_H +#define AIRSOFTTIMER_H #include "mbed.h" -#include "TextLCD.h" +#include "board/LCD.h" +#include "board/Leds.h" +#include "board/Key.h" +#include "board/Buzzer.h" +#include "board/Button.h" +#include "board/Keyboard.h" -// PUT THIS ALL IN A CLASS !!!!!!! - -// pinnames see: http://mbed.org/users/mbed_official/code/mbed/file/0954ebd79f59/LPC1768/PinNames.h +struct Pinouts{ + PinName button; + PinName key; + LedPins leds; + PinName buzzer; + KeyboardPins keyboard; + LcdPins lcd; +}; class Airsofttimer { - Airsofttimer(); - //TextLCD lcd(p10, p12, p15, p16, p29, p30); // rs, e, d4-d7 - - PinName buttonPin; //P0.4 - PinName keyPin; //P0.5 - PinName ledAPin; //P2.4 - PinName ledBPin; //P2.5 - PinName buzzerPin; //P2.3 - PinName keyboardRowPins[4]; // ROWS=P0.8 -> P0.11 - PinName keyboardColPins[3]; // COLS=P0.16 -> P0.18 - PinName lcdPins[6]; // E=P1.31, RS=P1.30, D4=P0.23 -> D7=P0.26 - -//lcd.printf("AirsoftTimer\n"); + static const char* LOGO[]; + public: + Airsofttimer(Pinouts pinouts); + + + private: + void init(); + LCD* lcd; + };