4 errors
Dependencies: KS0108_PCF8574 mbed
Diff: menbed/menbed.cpp
- Revision:
- 3:ec80bb6ff5da
- Parent:
- 0:936f1c020120
diff -r 66e4ebaba5df -r ec80bb6ff5da menbed/menbed.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/menbed/menbed.cpp Tue Sep 11 10:21:10 2012 +0000 @@ -0,0 +1,57 @@ +#include "mbed.h" +#include "include/menbed.h" + +Menbed::Menbed (PinName select, PinName down, PinName up, PinName cancel, + MenbedMenu *rootMenu, + MenbedDisplay *display) +{ + MenbedButtonHandlerTimespec *timespec = new MenbedButtonHandlerTimespec(); + + displayer = new MenbedDisplayer (display); + navigator = new MenbedNavigator (rootMenu, displayer); + buttonHandler = new MenbedButtonHandler (select, down, up, cancel, timespec, navigator); + refresher = new MenbedRefresher (navigator); +} + +Menbed::Menbed (PinName select, PinName down, PinName up, + MenbedMenu *rootMenu, + MenbedDisplay *display) +{ + MenbedButtonHandlerTimespec *timespec = new MenbedButtonHandlerTimespec(); + + displayer = new MenbedDisplayer (display); + navigator = new MenbedNavigator (rootMenu, displayer); + buttonHandler = new MenbedButtonHandler (select, down, up, timespec, navigator); + refresher = new MenbedRefresher (navigator); +} + +Menbed::Menbed (PinName select, PinName down, + MenbedMenu *rootMenu, + MenbedDisplay *display) +{ + MenbedButtonHandlerTimespec *timespec = new MenbedButtonHandlerTimespec(); + + displayer = new MenbedDisplayer (display); + navigator = new MenbedNavigator (rootMenu, displayer); + buttonHandler = new MenbedButtonHandler (select, down, timespec, navigator); + refresher = new MenbedRefresher (navigator); +} + +Menbed::Menbed(PinName select, PinName down, PinName up, PinName cancel, + MenbedButtonHandlerTimespec *timespec, + MenbedMenu *rootMenu, + MenbedDisplay *display) +{ + displayer = new MenbedDisplayer (display); + navigator = new MenbedNavigator (rootMenu, displayer); + buttonHandler = new MenbedButtonHandler (select, down, up, cancel, timespec, navigator); + refresher = new MenbedRefresher (navigator); +} + +Menbed::~Menbed() +{ + delete refresher; + delete buttonHandler; + delete navigator; + delete displayer; +} \ No newline at end of file