t
Dependencies: DM_FATFileSystem DM_HttpServer DM_USBHost EthernetInterface USBDevice mbed-rpc mbed-rtos
Fork of DMSupport by
Diff: DMBoard.cpp
- Revision:
- 4:6fdcdf7aff8d
- Parent:
- 3:2fa7755f2cef
- Child:
- 5:c77fdb6e3438
--- a/DMBoard.cpp Wed Dec 03 16:17:10 2014 +0000 +++ b/DMBoard.cpp Mon Dec 08 12:48:44 2014 +0000 @@ -22,6 +22,10 @@ #include "AR1021.h" #endif +#if defined(DM_BOARD_ENABLE_MEASSURING_PINS) + #include "meas.h" +#endif + /****************************************************************************** * Defines and typedefs *****************************************************************************/ @@ -218,6 +222,10 @@ // Make sure that the logger is always initialized even if // other initialization tasks fail _logger.init(); + +#if defined(DM_BOARD_ENABLE_MEASSURING_PINS) + _INTERNAL_INIT_MEAS(); +#endif #if defined(DM_BOARD_DISABLE_STANDARD_PRINTF) // Kill all ouput of calls to printf() so that there is no @@ -245,7 +253,19 @@ #if defined(DM_BOARD_USE_TOUCH) //if (... configuration says AR1021...) { _touch = new AR1021(P2_27, P2_26, P2_22, P2_23, P2_25); - if (!_touch->init(Display::instance().width(), Display::instance().height())) { +// if (!_touch->init(Display::instance().width(), Display::instance().height())) { +// err = TouchError; +// break; +// } + int att; + for (att = 1; att <= 3; att++) { + if (_touch->init(Display::instance().width(), Display::instance().height())) { + break; + } + _logger.printf("Failed to init touch, trying again...\n"); + wait_ms(500); + } + if (att > 3) { err = TouchError; break; }