delete px4_includes.h header and update boards/ to use syslog

This commit is contained in:
Daniel Agar
2019-01-23 18:25:18 -05:00
parent 376e078c24
commit 2ffb49b734
86 changed files with 190 additions and 563 deletions
+7 -25
View File
@@ -79,24 +79,6 @@
* Pre-Processor Definitions
****************************************************************************/
/* Configuration ************************************************************/
/* Debug ********************************************************************/
#ifdef CONFIG_CPP_HAVE_VARARGS
# ifdef CONFIG_DEBUG
# define message(...) syslog(__VA_ARGS__)
# else
# define message(...) printf(__VA_ARGS__)
# endif
#else
# ifdef CONFIG_DEBUG
# define message syslog
# else
# define message printf
# endif
#endif
/**
* Ideally we'd be able to get these from up_internal.h,
* but since we want to be able to disable the NuttX use
@@ -135,7 +117,7 @@ __EXPORT void board_peripheral_reset(int ms)
// Wait for the peripheral rail to reach GND.
usleep(ms * 1000);
warnx("reset done, %d ms", ms);
syslog(LOG_DEBUG, "reset done, %d ms\n", ms);
// Re-enable power.
// Switch the peripheral rail back on.
@@ -271,7 +253,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
// Configure the DMA allocator.
if (board_dma_alloc_init() < 0) {
message("DMA alloc FAILED");
syslog(LOG_ERR, "DMA alloc FAILED\n");
}
// Set up the serial DMA polling.
@@ -311,7 +293,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
spi1 = stm32_spibus_initialize(1);
if (!spi1) {
message("[boot] FAILED to initialize SPI port 1\n");
syslog(LOG_ERR, "[boot] FAILED to initialize SPI port 1\n");
led_on(LED_RED);
return -ENODEV;
}
@@ -330,7 +312,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
spi2 = stm32_spibus_initialize(2);
if (!spi2) {
message("[boot] FAILED to initialize SPI port 2\n");
syslog(LOG_ERR, "[boot] FAILED to initialize SPI port 2\n");
led_on(LED_RED);
return -ENODEV;
}
@@ -354,8 +336,8 @@ __EXPORT int board_app_initialize(uintptr_t arg)
if (!sdio) {
led_on(LED_RED);
message("[boot] Failed to initialize SDIO slot %d\n",
CONFIG_NSH_MMCSDSLOTNO);
syslog(LOG_ERR, "[boot] Failed to initialize SDIO slot %d\n",
CONFIG_NSH_MMCSDSLOTNO);
return -ENODEV;
}
@@ -364,7 +346,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
if (ret != OK) {
led_on(LED_RED);
message("[boot] Failed to bind SDIO to the MMC/SD driver: %d\n", ret);
syslog(LOG_ERR, "[boot] Failed to bind SDIO to the MMC/SD driver: %d\n", ret);
return ret;
}