diff --git a/left/src/config.h b/left/src/config.h index 83e512b..6cd1516 100644 --- a/left/src/config.h +++ b/left/src/config.h @@ -1,8 +1,4 @@ #ifndef __CONFIG_H__ #define __CONFIG_H__ -// Macros: - -// #define DEBUG_OVER_SPI - #endif diff --git a/left/src/debug_over_spi.c b/left/src/debug_over_spi.c index bd5524b..d1665d8 100644 --- a/left/src/debug_over_spi.c +++ b/left/src/debug_over_spi.c @@ -1,10 +1,6 @@ -#ifdef DEBUG_OVER_SPI - #include "debug_over_spi.h" -#include "config.h" #include "fsl_gpio.h" - #define EXAMPLE_SPI_MASTER (SPI0) #define EXAMPLE_SPI_MASTER_SOURCE_CLOCK (kCLOCK_BusClk) @@ -52,5 +48,3 @@ void DebugOverSpi_Send(uint8_t *tx, uint8_t len) SPI_MasterTransferNonBlocking(EXAMPLE_SPI_MASTER, &handle, &xfer); } } - -#endif diff --git a/left/src/debug_over_spi.h b/left/src/debug_over_spi.h index 4fcd263..a97d8ae 100644 --- a/left/src/debug_over_spi.h +++ b/left/src/debug_over_spi.h @@ -1,5 +1,3 @@ -#ifdef DEBUG_OVER_SPI - #ifndef __DEBUG_OVER_SPI_H__ #define __DEBUG_OVER_SPI_H__ @@ -27,8 +25,3 @@ void DebugOverSpi_Send(uint8_t *tx, uint8_t len); #endif - -#else - #define DebugOverSpi_Init() - #define DebugOverSpi_Send(tx, len) -#endif diff --git a/left/src/init_peripherals.c b/left/src/init_peripherals.c index e39916e..79ec3dd 100644 --- a/left/src/init_peripherals.c +++ b/left/src/init_peripherals.c @@ -9,7 +9,6 @@ #include "led_pwm.h" #include "slave_protocol_handler.h" #include "i2c_watchdog.h" -#include "debug_over_spi.h" #include "main.h" i2c_slave_config_t slaveConfig; @@ -23,7 +22,6 @@ static void i2cSlaveCallback(I2C_Type *base, i2c_slave_transfer_t *xfer, void *u { dosBuffer[0] = xfer->event; dosBuffer[1] = userData; - DebugOverSpi_Send(dosBuffer, 2); switch (xfer->event) { case kI2C_SlaveTransmitEvent: @@ -86,6 +84,5 @@ void InitPeripherals(void) InitLedDriver(); TestLed_Init(); LedPwm_Init(); - DebugOverSpi_Init(); initI2c(); } diff --git a/left/src/main.c b/left/src/main.c index a1246de..f362a52 100644 --- a/left/src/main.c +++ b/left/src/main.c @@ -15,11 +15,7 @@ key_matrix_t keyMatrix = { {PORTB, GPIOB, kCLOCK_PortB, 11}, {PORTA, GPIOA, kCLOCK_PortA, 6}, {PORTA, GPIOA, kCLOCK_PortA, 8}, -#ifdef DEBUG_OVER_SPI - {PORTA, GPIOA, kCLOCK_PortA, 8}, -#else {PORTB, GPIOB, kCLOCK_PortB, 0}, -#endif {PORTB, GPIOB, kCLOCK_PortB, 6}, {PORTA, GPIOA, kCLOCK_PortA, 3}, {PORTA, GPIOA, kCLOCK_PortA, 12} @@ -28,11 +24,7 @@ key_matrix_t keyMatrix = { {PORTB, GPIOB, kCLOCK_PortB, 7}, {PORTB, GPIOB, kCLOCK_PortB, 10}, {PORTA, GPIOA, kCLOCK_PortA, 5}, -#ifdef DEBUG_OVER_SPI - {PORTA, GPIOA, kCLOCK_PortA, 5}, -#else {PORTA, GPIOA, kCLOCK_PortA, 7}, -#endif {PORTA, GPIOA, kCLOCK_PortA, 4} } };