Updated to latest V1.1

This commit is contained in:
adrcs 2025-04-27 14:47:47 -06:00 committed by GitHub
parent 7a7995e422
commit 921ab8ea96
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 26 additions and 28 deletions

View file

@ -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

View file

@ -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 <config.h>
// 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);

View file

@ -30,7 +30,7 @@
#include <config.h>
#include <stm32wl3x_hal_mrsubg.h>
#if _BOARD_TYPE==NUCLEO_BOARD
#if _BOARD_TYPE == NUCLEO_BOARD
#include <stm32wl3x_nucleo.h>
#endif

View file

@ -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

View file

@ -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
/*