stm32: fix NRF24L01 initialization for stm32_tiny
This commit is contained in:
parent
c442725f23
commit
126be360fa
@ -161,4 +161,18 @@
|
||||
#define LED_ASSERTION 6 /* LED1 + LED2 */
|
||||
#define LED_PANIC 7 /* LED1 / LED2 blinking */
|
||||
|
||||
/* NRF24L01 Driver **********************************************************/
|
||||
|
||||
/* NRF24L01 chip enable: PB.1 */
|
||||
|
||||
#define GPIO_NRF24L01_CE (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\
|
||||
GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN1)
|
||||
|
||||
/* NRF24L01 IRQ line: PA.0 */
|
||||
|
||||
#define GPIO_NRF24L01_IRQ (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_PORTA|GPIO_PIN0)
|
||||
|
||||
#define BOARD_NRF24L01_GPIO_CE GPIO_NRF24L01_CE
|
||||
#define BOARD_NRF24L01_GPIO_IRQ GPIO_NRF24L01_IRQ
|
||||
|
||||
#endif /* __ARCH_ARM_STM32_STM32_TINY_INCLUDE_BOARD_H */
|
||||
|
@ -84,9 +84,9 @@
|
||||
|
||||
int board_app_initialize(uintptr_t arg)
|
||||
{
|
||||
#ifdef CONFIG_PWM
|
||||
int ret;
|
||||
int ret = OK;
|
||||
|
||||
#ifdef CONFIG_PWM
|
||||
/* Initialize PWM and register the PWM device. */
|
||||
|
||||
ret = stm32_pwm_setup();
|
||||
@ -99,12 +99,12 @@ int board_app_initialize(uintptr_t arg)
|
||||
#if defined(CONFIG_WL_NRF24L01)
|
||||
/* Initialize the NRF24L01 wireless module */
|
||||
|
||||
ret = board_nrf24l01_initialize(&g_nrf24l01_cfg, 2);
|
||||
ret = board_nrf24l01_initialize(2);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: board_nrf24l01_initialize failed: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
return OK;
|
||||
return ret;
|
||||
}
|
||||
|
@ -76,15 +76,6 @@
|
||||
#define GPIO_NRF24L01_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\
|
||||
GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN12)
|
||||
|
||||
/* NRF24L01 chip enable: PB.1 */
|
||||
|
||||
#define GPIO_NRF24L01_CE (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\
|
||||
GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN1)
|
||||
|
||||
/* NRF24L01 IRQ line: PA.0 */
|
||||
|
||||
#define GPIO_NRF24L01_IRQ (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_PORTA|GPIO_PIN0)
|
||||
|
||||
/* PWM
|
||||
*
|
||||
* Let's use the LED. It is connected to PB.5, which can be used as PWM output of channel 2 of timer 3
|
||||
|
Loading…
Reference in New Issue
Block a user