Repository: incubator-mynewt-core Updated Branches: refs/heads/develop 3758239db -> e85352c61
spitest; also consider SPI_0_MASTER/SPI_0_SLAVE setting. Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/e85352c6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/e85352c6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/e85352c6 Branch: refs/heads/develop Commit: e85352c61cb373fa27b6e526111f9971e94fc2c4 Parents: 3310a9a Author: Marko Kiiskila <ma...@runtime.io> Authored: Fri Oct 14 17:19:04 2016 -0700 Committer: Marko Kiiskila <ma...@runtime.io> Committed: Fri Oct 14 17:23:22 2016 -0700 ---------------------------------------------------------------------- apps/spitest/src/main.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/e85352c6/apps/spitest/src/main.c ---------------------------------------------------------------------- diff --git a/apps/spitest/src/main.c b/apps/spitest/src/main.c index b59cd2a..3388333 100755 --- a/apps/spitest/src/main.c +++ b/apps/spitest/src/main.c @@ -60,7 +60,13 @@ struct os_sem g_test_sem; /* For LED toggling */ int g_led_pin; -#if MYNEWT_VAL(SPI_MASTER) +#if MYNEWT_VAL(SPI_MASTER) || MYNEWT_VAL(SPI_0_MASTER) +#define SPI_MASTER 1 +#endif +#if MYNEWT_VAL(SPI_SLAVE) || MYNEWT_VAL(SPI_0_SLAVE) +#define SPI_SLAVE 1 +#endif +#ifdef SPI_MASTER uint8_t g_spi_tx_buf[32]; uint8_t g_spi_rx_buf[32]; uint32_t g_spi_xfr_num; @@ -124,7 +130,7 @@ sblinky_spi_cfg(int spi_num) } #endif -#if MYNEWT_VAL(SPI_SLAVE) +#ifdef SPI_SLAVE uint8_t g_spi_tx_buf[32]; uint8_t g_spi_rx_buf[32]; uint32_t g_spi_xfr_num; @@ -168,7 +174,7 @@ sblinky_spi_cfg(int spi_num) } #endif -#if MYNEWT_VAL(SPI_MASTER) +#ifdef SPI_MASTER void task1_handler(void *arg) { @@ -264,7 +270,7 @@ task1_handler(void *arg) } #endif -#if MYNEWT_VAL(SPI_SLAVE) +#ifdef SPI_SLAVE void task1_handler(void *arg) {