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
+4 -22
View File
@@ -74,24 +74,6 @@
* Pre-Processor Definitions
****************************************************************************/
/* Configuration ************************************************************/
/* Debug ********************************************************************/
#ifdef CONFIG_CPP_HAVE_VARARGS
# ifdef CONFIG_DEBUG
# define message(...) lowsyslog(__VA_ARGS__)
# else
# define message(...) printf(__VA_ARGS__)
# endif
#else
# ifdef CONFIG_DEBUG
# define message lowsyslog
# 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
@@ -125,7 +107,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 */
@@ -207,7 +189,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 */
@@ -236,7 +218,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
spi3 = px4_spibus_initialize(3);
if (!spi3) {
message("[boot] FAILED to initialize SPI port 3\n");
syslog(LOG_ERR, "[boot] FAILED to initialize SPI port 3\n");
led_on(LED_AMBER);
return -ENODEV;
}
@@ -255,7 +237,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
spi4 = px4_spibus_initialize(4);
if (!spi4) {
message("[boot] FAILED to initialize SPI port 4\n");
syslog(LOG_ERR, "[boot] FAILED to initialize SPI port 4\n");
led_on(LED_AMBER);
return -ENODEV;
}
+1 -2
View File
@@ -54,7 +54,6 @@
#include <chip.h>
#include <stm32.h>
#include "board_config.h"
#include <systemlib/err.h>
/************************************************************************************
* Public Functions
@@ -203,7 +202,7 @@ __EXPORT void board_spi_reset(int ms)
/* wait for the sensor rail to reach GND */
usleep(ms * 1000);
warnx("reset done, %d ms", ms);
syslog(LOG_DEBUG, "reset done, %d ms\n", ms);
/* wait a bit before starting SPI, different times didn't influence results */
usleep(100);