AirsoftTimer software based on mbed
Dependencies: mbed TextLCD keypad
board/Board.cpp
- Committer:
- sillevl
- Date:
- 2017-02-09
- Revision:
- 27:f29805113454
- Parent:
- 20:b89791ecceec
File content as of revision 27:f29805113454:
#include "Board.h" Board::Board(Pinouts pinouts){ lcd = new LCD(pinouts.lcd.rs, pinouts.lcd.e, pinouts.lcd.p4, pinouts.lcd.p5, pinouts.lcd.p6, pinouts.lcd.p7, LCD::LCD20x4); leds = new Leds(pinouts.leds.left, pinouts.leds.right); button = new Button(pinouts.button); key = new Key(pinouts.key); keyboard = new Keyboard(pinouts.keyboard); buzzer = new Buzzer(pinouts.buzzer); keyboard->attach(this, &Board::keyboardButton); keyboard->start(); // energize the keypad via c0-c3 } uint32_t Board::keyboardButton(uint32_t index){ _callback.call(Keyboard::KEYTABLE[index]); return 0; }