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
+2 -20
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
@@ -204,7 +186,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 */
@@ -282,7 +264,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 */
+1 -1
View File
@@ -208,7 +208,7 @@ int fmuk66_sdhc_initialize(void)
return ret;
}
syslog(LOG_INFO, "Successfully bound SDHC to the MMC/SD driver\n");
syslog(LOG_ERR, "Successfully bound SDHC to the MMC/SD driver\n");
/* Handle the initial card state */
+4 -20
View File
@@ -51,25 +51,9 @@
#include "chip.h"
#include <kinetis.h>
#include "board_config.h"
#include <systemlib/err.h>
#include <systemlib/px4_macros.h>
#if defined(CONFIG_KINETIS_SPI0) || defined(CONFIG_KINETIS_SPI1) || \
defined(CONFIG_KINETIS_SPI2)
#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
#if defined(CONFIG_KINETIS_SPI0) || defined(CONFIG_KINETIS_SPI1) || defined(CONFIG_KINETIS_SPI2)
/* Define CS GPIO array */
static const uint32_t spi0selects_gpio[] = PX4_MEMORY_BUS_CS_GPIO;
@@ -208,7 +192,7 @@ __EXPORT int fmuk66_spi_bus_initialize(void)
spi_sensors = px4_spibus_initialize(PX4_SPI_BUS_SENSORS);
if (!spi_sensors) {
message("[boot] FAILED to initialize SPI port %d\n", PX4_SPI_BUS_SENSORS);
syslog(LOG_ERR, "[boot] FAILED to initialize SPI port %d\n", PX4_SPI_BUS_SENSORS);
return -ENODEV;
}
@@ -228,7 +212,7 @@ __EXPORT int fmuk66_spi_bus_initialize(void)
spi_memory = px4_spibus_initialize(PX4_SPI_BUS_MEMORY);
if (!spi_memory) {
message("[boot] FAILED to initialize SPI port %d\n", PX4_SPI_BUS_MEMORY);
syslog(LOG_ERR, "[boot] FAILED to initialize SPI port %d\n", PX4_SPI_BUS_MEMORY);
return -ENODEV;
}
@@ -248,7 +232,7 @@ __EXPORT int fmuk66_spi_bus_initialize(void)
spi_ext = px4_spibus_initialize(PX4_SPI_BUS_EXTERNAL);
if (!spi_ext) {
message("[boot] FAILED to initialize SPI port %d\n", PX4_SPI_BUS_EXTERNAL);
syslog(LOG_ERR, "[boot] FAILED to initialize SPI port %d\n", PX4_SPI_BUS_EXTERNAL);
return -ENODEV;
}