From 8a8e023d04d07548f77d28acd3b1d3fbff9a5191 Mon Sep 17 00:00:00 2001 From: Francisco Molina Date: Wed, 21 Jul 2021 11:26:17 +0200 Subject: [PATCH] cpu/stm32/wl: common subghz debug pin initialization --- boards/nucleo-wl55jc/include/periph_conf.h | 7 ++++--- cpu/stm32/cpu_init.c | 8 ++++---- cpu/stm32/include/periph/wl/periph_cpu.h | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/boards/nucleo-wl55jc/include/periph_conf.h b/boards/nucleo-wl55jc/include/periph_conf.h index 8d187699eb..2d6551ca52 100644 --- a/boards/nucleo-wl55jc/include/periph_conf.h +++ b/boards/nucleo-wl55jc/include/periph_conf.h @@ -78,6 +78,7 @@ static const uart_conf_t uart_config[] = { #define UART_NUMOF ARRAY_SIZE(uart_config) /** @} */ + /** * @name SPI configuration * @{ @@ -95,10 +96,10 @@ static const spi_conf_t spi_config[] = { .cs_af = GPIO_AF_UNDEF, .rccmask = RCC_APB3ENR_SUBGHZSPIEN, .apbbus = APB3, - } + }, /* SUBGHZ DEBUG PINS use the SPI1 pins */ -#if !IS_ACTIVE(CONFIG_STM32_WL55JC_SUBGHZ_DEBUG) - ,{ +#if !IS_ACTIVE(CONFIG_STM32_WLX5XX_SUBGHZ_DEBUG) + { .dev = SPI1, .mosi_pin = GPIO_PIN(PORT_A, 7), .miso_pin = GPIO_PIN(PORT_A, 6), diff --git a/cpu/stm32/cpu_init.c b/cpu/stm32/cpu_init.c index 0e625850b0..3a6e19e862 100644 --- a/cpu/stm32/cpu_init.c +++ b/cpu/stm32/cpu_init.c @@ -155,9 +155,9 @@ static void _gpio_init_ain(void) /** * @brief Initialize HW debug pins for Sub-GHz Radio */ -void _wl55jc_init_subghz_debug_pins(void) +void _wlx5xx_init_subghz_debug_pins(void) { -#if IS_ACTIVE(CONFIG_STM32_WL55JC_SUBGHZ_DEBUG) +#if IS_ACTIVE(CONFIG_STM32_WLX5XX_SUBGHZ_DEBUG) /* SUBGHZSPI Debug */ gpio_init(CPU_STM32WL_SUBGHZSPI_DEBUG_MOSIOUT, GPIO_OUT); gpio_init_af(CPU_STM32WL_SUBGHZSPI_DEBUG_MOSIOUT, @@ -232,7 +232,7 @@ void cpu_init(void) /* trigger static peripheral initialization */ periph_init(); - if (IS_ACTIVE(CONFIG_STM32_WL55JC_SUBGHZ_DEBUG)) { - _wl55jc_init_subghz_debug_pins(); + if (IS_ACTIVE(CONFIG_STM32_WLX5XX_SUBGHZ_DEBUG)) { + _wlx5xx_init_subghz_debug_pins(); } } diff --git a/cpu/stm32/include/periph/wl/periph_cpu.h b/cpu/stm32/include/periph/wl/periph_cpu.h index afb34a5527..9b5e66fdd9 100644 --- a/cpu/stm32/include/periph/wl/periph_cpu.h +++ b/cpu/stm32/include/periph/wl/periph_cpu.h @@ -119,7 +119,7 @@ extern "C" { * @brief Set this to 1 to enable hardware debugging. */ #ifdef DOXYGEN -#define CONFIG_STM32_WL55JC_SUBGHZ_DEBUG +#define CONFIG_STM32_WLX5XX_SUBGHZ_DEBUG #endif /** @} */