[bsp][stm32][l475-atk-pandora]Add support for nRF24L01 extension module

This commit is contained in:
Willian Chan 2019-06-29 18:39:21 +08:00
parent c574c49b2f
commit 639f46363f
2 changed files with 74 additions and 54 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", GPIOD, GPIO_PIN_5);
return RT_EOK;
}
INIT_COMPONENT_EXPORT(rt_hw_nrf24l01_init);
#endif

View File

@ -29,24 +29,6 @@ menu "Onboard Peripheral Drivers"
select RT_USING_DFS_ELMFAT
default n
config BSP_USING_ICM20608
bool "Enable icm20608 (i2c3)"
select BSP_USING_I2C
select BSP_USING_I2C3
select PKG_USING_SENSORS_DRIVERS
select PKG_USING_MPU6XXX
select PKG_USING_MPU6XXX_LATEST_VERSION
default n
config BSP_USING_AHT10
bool "Enable aht10 (i2c4)"
select BSP_USING_I2C
select BSP_USING_I2C4
select PKG_USING_SENSORS_DRIVERS
select PKG_USING_AHT10
select PKG_USING_AHT10_LATEST_VERSION
default n
endmenu
menu "On-chip Peripheral Drivers"
@ -130,42 +112,55 @@ menu "On-chip Peripheral Drivers"
bool "Enable QSPI DMA support"
default n
menuconfig BSP_USING_I2C
bool "Enable I2C BUS"
menuconfig BSP_USING_I2C1
bool "Enable I2C1 BUS (software simulation)"
default n
select RT_USING_I2C
select RT_USING_I2C_BITOPS
select RT_USING_PIN
if BSP_USING_I2C
menuconfig BSP_USING_I2C3
bool "Enable I2C3 BUS (software simulation)"
default y
if BSP_USING_I2C3
comment "Notice: PC0 --> 32; PC1 --> 33"
config BSP_I2C3_SCL_PIN
int "i2c3 scl pin number"
range 1 176
default 32
config BSP_I2C3_SDA_PIN
int "I2C3 sda pin number"
range 1 176
default 33
endif
if BSP_USING_I2C1
config BSP_I2C1_SCL_PIN
int "i2c1 scl pin number"
range 1 176
default 15
config BSP_I2C1_SDA_PIN
int "I2C1 sda pin number"
range 1 176
default 16
endif
menuconfig BSP_USING_I2C4
bool "Enable I2C4 BUS (AHT10)"
default n
if BSP_USING_I2C4
comment "Notice: PC1 --> 33; PD6 --> 54"
config BSP_I2C4_SCL_PIN
int "i2c4 scl pin number"
range 1 176
default 54
config BSP_I2C4_SDA_PIN
int "I2C4 sda pin number"
range 1 176
default 33
endif
menuconfig BSP_USING_I2C2
bool "Enable I2C2 BUS (software simulation)"
default n
select RT_USING_I2C
select RT_USING_I2C_BITOPS
select RT_USING_PIN
if BSP_USING_I2C2
config BSP_I2C2_SCL_PIN
int "i2c2 scl pin number"
range 1 176
default 47
config BSP_I2C2_SDA_PIN
int "I2C2 sda pin number"
range 1 176
default 48
endif
menuconfig BSP_USING_I2C3
bool "Enable I2C3 BUS (software simulation)"
default n
select RT_USING_I2CS
select RT_USING_I2C_BITOPS
select RT_USING_PIN
if BSP_USING_I2C3
config BSP_I2C3_SCL_PIN
int "i2c3 scl pin number"
range 1 176
default 92
config BSP_I2C3_SDA_PIN
int "I2C3 sda pin number"
range 1 176
default 93
endif
menuconfig BSP_USING_TIM
@ -246,15 +241,17 @@ menu "On-chip Peripheral Drivers"
select RT_USING_WDT
default n
config BSP_USING_USBD_FS
bool "Enable OTGFS as USB device"
select RT_USING_USB_DEVICE
default n
endmenu
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