AirsoftTimer software based on mbed

Dependencies:   mbed TextLCD keypad

Committer:
sillevl
Date:
Thu Feb 09 12:28:56 2017 +0000
Revision:
27:f29805113454
Parent:
20:b89791ecceec
ARCHIVE WIP, not working (crashes, cause unknown)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sillevl 5:be598835bab0 1 #include "Board.h"
sillevl 5:be598835bab0 2
sillevl 5:be598835bab0 3 Board::Board(Pinouts pinouts){
sillevl 5:be598835bab0 4 lcd = new LCD(pinouts.lcd.rs, pinouts.lcd.e, pinouts.lcd.p4, pinouts.lcd.p5, pinouts.lcd.p6, pinouts.lcd.p7, LCD::LCD20x4);
sillevl 5:be598835bab0 5 leds = new Leds(pinouts.leds.left, pinouts.leds.right);
sillevl 5:be598835bab0 6 button = new Button(pinouts.button);
sillevl 5:be598835bab0 7 key = new Key(pinouts.key);
sillevl 5:be598835bab0 8 keyboard = new Keyboard(pinouts.keyboard);
sillevl 5:be598835bab0 9 buzzer = new Buzzer(pinouts.buzzer);
sillevl 17:19dbb1dbb640 10
sillevl 17:19dbb1dbb640 11 keyboard->attach(this, &Board::keyboardButton);
sillevl 17:19dbb1dbb640 12 keyboard->start(); // energize the keypad via c0-c3
sillevl 17:19dbb1dbb640 13 }
sillevl 17:19dbb1dbb640 14
sillevl 17:19dbb1dbb640 15 uint32_t Board::keyboardButton(uint32_t index){
sillevl 19:2eba101d9c2c 16 _callback.call(Keyboard::KEYTABLE[index]);
sillevl 17:19dbb1dbb640 17 return 0;
sillevl 16:e8e96bf22df1 18 }
sillevl 16:e8e96bf22df1 19