[bsp][stm32][f103-dofly-m3s]Add support for nRF24L01 extension module

Signed-off-by: Willian Chan <chentingwei@rt-thread.com>
This commit is contained in:
Willian Chan 2019-06-29 18:22:13 +08:00
parent ee33d475d1
commit 130d330300
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,23 @@
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2019-06-29 WillianChan first version
*/
#include <rtthread.h>
#ifdef PKG_USING_NRF24L01
#include "drv_spi.h"
static int rt_hw_nrf24l01_init(void)
{
rt_hw_spi_device_attach("spi2", "spi20", GPIOG, GPIO_PIN_7);
return RT_EOK;
}
INIT_COMPONENT_EXPORT(rt_hw_nrf24l01_init);
#endif

View File

@ -130,6 +130,13 @@ endmenu
menu "Board extended module Drivers" menu "Board extended module Drivers"
config BSP_USING_NRF24L01
bool "Enable NRF24L01"
select BSP_USING_SPI
select BSP_USING_SPI2
select PKG_USING_NRF24L01
default n
endmenu endmenu
endmenu endmenu