mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-07-18 20:28:59 +08:00
In NxWM unit test, call boardctl(BOARDIOC_INIT) if available and appropriate.
This commit is contained in:
parent
de7d74a153
commit
e69358670c
@ -43,6 +43,8 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cunistd>
|
#include <cunistd>
|
||||||
|
|
||||||
|
#include <sys/boardctl.h>
|
||||||
|
|
||||||
#ifdef CONFIG_NXWM_TOUCHSCREEN_CONFIGDATA
|
#ifdef CONFIG_NXWM_TOUCHSCREEN_CONFIGDATA
|
||||||
# include "platform/configdata.hr"
|
# include "platform/configdata.hr"
|
||||||
#endif
|
#endif
|
||||||
@ -675,6 +677,16 @@ int nxwm_main(int argc, char *argv[])
|
|||||||
up_cxxinitialize();
|
up_cxxinitialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Should we perform board-specific initialization? There are two ways
|
||||||
|
// that board initialization can occur: 1) automatically via
|
||||||
|
// board_initialize() durring bootup if CONFIG_BOARD_INITIALIZE, or
|
||||||
|
// 2) here via a call to boardctl() if the interface is enabledi
|
||||||
|
// (CONFIG_LIB_BOARDCTL=y).
|
||||||
|
|
||||||
|
#if defined(CONFIG_LIB_BOARDCTL) && !defined(CONFIG_BOARD_INITIALIZE)
|
||||||
|
(void)boardctl(BOARDIOC_INIT, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Initialize memory monitor logic
|
// Initialize memory monitor logic
|
||||||
|
|
||||||
initMemoryUsage();
|
initMemoryUsage();
|
||||||
@ -688,6 +700,7 @@ int nxwm_main(int argc, char *argv[])
|
|||||||
printf("nxwm_main: ERROR: Failed to initialize the NSH library\n");
|
printf("nxwm_main: ERROR: Failed to initialize the NSH library\n");
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
showTestCaseMemory("nxwm_main: After initializing the NSH library");
|
showTestCaseMemory("nxwm_main: After initializing the NSH library");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user