Add define to move uart on debug header even when compiled in release mode

This commit is contained in:
Mario Hüttel 2020-11-01 21:22:28 +01:00
parent 88360fe307
commit 32c8e2e937
4 changed files with 8 additions and 8 deletions

View File

@ -58,7 +58,7 @@ DEFINES += -DBASE64_LOOKUP_TABLE_SECTION="\".ccm.bss\""
DEBUG_DEFINES = -DDEBUGBUILD
RELEASE_DEFINES =
RELEASE_DEFINES = -DUART_ON_DEBUG_HEADER
###################################################################################
ifeq ($(CROSS_COMPILE),)

View File

@ -29,7 +29,7 @@
#define DIGIO_RCC_MASK RCC_AHB1ENR_GPIOBEN
#define DIGIO_PINS 4,5,6,7
#ifdef DEBUGBUILD
#if defined(DEBUGBUILD) || defined(UART_ON_DEBUG_HEADER)
#define DIGIO_INOUT_DEFAULT 0,0,0,0
#define DIGIO_ALTFUNC_DEFAULT 0,0,0,0
#else
@ -41,7 +41,7 @@
#define BEEPER_RCC_MASK RCC_AHB1ENR_GPIOBEN
void digio_setup_default_all();
void digio_setup_default_all(void);
void digio_setup_pin(uint8_t num, uint8_t in_out, uint8_t alt_func);
void digio_set(uint8_t num, int val);
@ -51,7 +51,7 @@ int digio_get(uint8_t num);
#define LED_RCC_MASK RCC_AHB1ENR_GPIOBEN
#define LED_PINS 2,3
void led_setup();
void led_setup(void);
void led_set(uint8_t num, int val);
int led_get(uint8_t num);
@ -60,9 +60,9 @@ int led_get(uint8_t num);
#define LOUDSPEAKER_PIN 1
#define LOUDSPEAKER_MULTIFREQ 1
void loudspeaker_setup();
void loudspeaker_setup(void);
void loudspeaker_set(uint16_t val);
uint16_t loudspeaker_get();
uint16_t loudspeaker_get(void);
#endif /* __DIGIO_H__ */

View File

@ -12,7 +12,7 @@
#define SHELL_UART_RX_DMA_TRIGGER 4U
#define SHELL_UART_TX_DMA_TRIGGER 4U
#ifdef DEBUGBUILD
#if defined(DEBUGBUILD) || defined(UART_ON_DEBUG_HEADER)
#define SHELL_UART_PORT GPIOA
#define SHELL_UART_PORT_RCC_MASK RCC_AHB1ENR_GPIOAEN

View File

@ -67,7 +67,7 @@ static inline void uart_gpio_config(void)
* else the Pins on the DIGIO header are configured in the digio module
*/
#ifdef DEBUGBUILD
#if defined(DEBUGBUILD) || defined(UART_ON_DEBUG_HEADER)
rcc_manager_enable_clock(&RCC->AHB1ENR, BITMASK_TO_BITNO(SHELL_UART_PORT_RCC_MASK));
SHELL_UART_PORT->MODER &= MODER_DELETE(SHELL_UART_TX_PIN) & MODER_DELETE(SHELL_UART_RX_PIN);
SHELL_UART_PORT->MODER |= ALTFUNC(SHELL_UART_RX_PIN) | ALTFUNC(SHELL_UART_TX_PIN);