cpu/stm32/wl: common subghz debug pin initialization

This commit is contained in:
Francisco Molina 2021-07-21 11:26:17 +02:00
parent f2995240d4
commit 8a8e023d04
No known key found for this signature in database
GPG Key ID: 3E94EAC3DBDEEDA8
3 changed files with 9 additions and 8 deletions

View File

@ -78,6 +78,7 @@ static const uart_conf_t uart_config[] = {
#define UART_NUMOF ARRAY_SIZE(uart_config) #define UART_NUMOF ARRAY_SIZE(uart_config)
/** @} */ /** @} */
/** /**
* @name SPI configuration * @name SPI configuration
* @{ * @{
@ -95,10 +96,10 @@ static const spi_conf_t spi_config[] = {
.cs_af = GPIO_AF_UNDEF, .cs_af = GPIO_AF_UNDEF,
.rccmask = RCC_APB3ENR_SUBGHZSPIEN, .rccmask = RCC_APB3ENR_SUBGHZSPIEN,
.apbbus = APB3, .apbbus = APB3,
} },
/* SUBGHZ DEBUG PINS use the SPI1 pins */ /* 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, .dev = SPI1,
.mosi_pin = GPIO_PIN(PORT_A, 7), .mosi_pin = GPIO_PIN(PORT_A, 7),
.miso_pin = GPIO_PIN(PORT_A, 6), .miso_pin = GPIO_PIN(PORT_A, 6),

View File

@ -155,9 +155,9 @@ static void _gpio_init_ain(void)
/** /**
* @brief Initialize HW debug pins for Sub-GHz Radio * @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 */ /* SUBGHZSPI Debug */
gpio_init(CPU_STM32WL_SUBGHZSPI_DEBUG_MOSIOUT, GPIO_OUT); gpio_init(CPU_STM32WL_SUBGHZSPI_DEBUG_MOSIOUT, GPIO_OUT);
gpio_init_af(CPU_STM32WL_SUBGHZSPI_DEBUG_MOSIOUT, gpio_init_af(CPU_STM32WL_SUBGHZSPI_DEBUG_MOSIOUT,
@ -232,7 +232,7 @@ void cpu_init(void)
/* trigger static peripheral initialization */ /* trigger static peripheral initialization */
periph_init(); periph_init();
if (IS_ACTIVE(CONFIG_STM32_WL55JC_SUBGHZ_DEBUG)) { if (IS_ACTIVE(CONFIG_STM32_WLX5XX_SUBGHZ_DEBUG)) {
_wl55jc_init_subghz_debug_pins(); _wlx5xx_init_subghz_debug_pins();
} }
} }

View File

@ -119,7 +119,7 @@ extern "C" {
* @brief Set this to 1 to enable hardware debugging. * @brief Set this to 1 to enable hardware debugging.
*/ */
#ifdef DOXYGEN #ifdef DOXYGEN
#define CONFIG_STM32_WL55JC_SUBGHZ_DEBUG #define CONFIG_STM32_WLX5XX_SUBGHZ_DEBUG
#endif #endif
/** @} */ /** @} */