diff --git a/Node Firmware/IP400/Inc/config.h b/Node Firmware/IP400/Inc/config.h index cbfcdd1..4c61119 100644 --- a/Node Firmware/IP400/Inc/config.h +++ b/Node Firmware/IP400/Inc/config.h @@ -26,7 +26,7 @@ // the board type is selected here... #define PI_BOARD 0 // pi board #define NUCLEO_BOARD 1 // Nucleo board -#define _BOARD_TYPE PI_BOARD // board type in use +#define _BOARD_TYPE NUCLEO_BOARD // board type in use // gps receiver enabled #if _BOARD_TYPE == PI_BOARD diff --git a/Node Firmware/IP400/Inc/led.h b/Node Firmware/IP400/Inc/led.h index db31764..11a938d 100644 --- a/Node Firmware/IP400/Inc/led.h +++ b/Node Firmware/IP400/Inc/led.h @@ -23,9 +23,8 @@ #ifndef INC_LED_H_ #define INC_LED_H_ -// config -#define REVERSE_LEADS 1 // reverse Bi-color LED leads on some boards - +#include + // LED functions enum { @@ -41,31 +40,37 @@ enum { }; #if _BOARD_TYPE == PI_BOARD -// define the LED ports -#define LED_Pin GPIO_PIN_15 -#define LED_GPIO_Port GPIOB -#if REVERSE_LEADS -// green on PA9, red on PB0 -#define LED_Green_Pin GPIO_PIN_9 -#define LED_Green_GPIO_Port GPIOA -#define LED_Red_Pin GPIO_PIN_0 -#define LED_Red_GPIO_Port GPIOB -#else -// green on PB0, red on PA9 +// bidirectional LED #define LED_Green_Pin GPIO_PIN_0 #define LED_Green_GPIO_Port GPIOB #define LED_Red_Pin GPIO_PIN_9 #define LED_Red_GPIO_Port GPIOA -#endif -// +// Tx LED #define TXLED_Pin GPIO_PIN_15 #define TXLED_GPIO_Port GPIOB -// + +// PA enable pin #define PA_ENA_Pin GPIO_PIN_0 #define PA_ENA_GPIO_Port GPIOA #endif +#if _BOARD_TYPE == TELEM_BOARD +// define the LED ports +#define LED_Green_Pin GPIO_PIN_14 +#define LED_Green_GPIO_Port GPIOB +#define LED_Red_Pin GPIO_PIN_15 +#define LED_Red_GPIO_Port GPIOB + +// Tx LED +#define TXLED_Pin GPIO_PIN_0 +#define TXLED_GPIO_Port GPIOA + +// PA enable pin +#define PA_ENA_Pin GPIO_PIN_7 +#define PA_ENA_GPIO_Port GPIOA +#endif + void SetLEDMode(uint8_t mode); diff --git a/Node Firmware/IP400/Src/frame.c b/Node Firmware/IP400/Src/frame.c index 785aabc..0f6c99b 100644 --- a/Node Firmware/IP400/Src/frame.c +++ b/Node Firmware/IP400/Src/frame.c @@ -30,7 +30,7 @@ #include #include -#if _BOARD_TYPE==NUCLEO_BOARD +#if _BOARD_TYPE == NUCLEO_BOARD #include #endif diff --git a/Node Firmware/IP400/Src/ip.c b/Node Firmware/IP400/Src/ip.c index ba72e06..f10ec9f 100644 --- a/Node Firmware/IP400/Src/ip.c +++ b/Node Firmware/IP400/Src/ip.c @@ -51,6 +51,7 @@ union { #define NETMASK 0xF8 // mask for last byte +#ifdef __OLDIPSCHEME /* * Create an IP 10.x.x.x from the compressed callsign field */ @@ -97,6 +98,7 @@ void GetIP172Addr(IP400_MAC *fr, SOCKADDR_IN *ipaddr) // port number from source ipaddr->sin_port = 0; } +#endif /* * Create an IP 172.16.x.x from the compressed callsign field and unique ID diff --git a/Node Firmware/IP400/Src/spi.c b/Node Firmware/IP400/Src/spi.c index 5df354a..04d6392 100644 --- a/Node Firmware/IP400/Src/spi.c +++ b/Node Firmware/IP400/Src/spi.c @@ -33,11 +33,6 @@ #include "spi.h" #include "dataq.h" #include "tasks.h" -#include "led.h" - -// conditionals -#define __ENABLE_SPI_ON_TXENA 0 // enable spi sync output on TX enable for E04 modules -#define __ENABLE_SPI_ON_PB1 0 // enable SPI sync output on PB0 for IP400 module #define SPI_MAX_TIME 200 // 200 ms max no activity timeout #define NO_SPI_TIMEOUT (SPI_MAX_TIME/SPI_TASK_SCHED) // timeout in schedule ticks @@ -226,10 +221,6 @@ void SPI_Task_Exec(void) // scope trigger on nucleo board #if _BOARD_TYPE==NUCLEO_BOARD // board type in use HAL_GPIO_TogglePin(SCOPE_GPIO_Port, SCOPE_Pin); -#else -#if __ENABLE_SPI_ON_TXENA - HAL_GPIO_TogglePin(PA_ENA_GPIO_Port, PA_ENA_Pin); -#endif #endif /*