Fix nRF24L01+ driver integration for the STM32 Tiny. From Laurent Latil.
This commit is contained in:
parent
c355b04fbb
commit
b8be2d909f
@ -88,15 +88,34 @@ CONFIG_ARCH_HAVE_MPU=y
|
||||
#
|
||||
# ARMV7M Configuration Options
|
||||
#
|
||||
# CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set
|
||||
CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y
|
||||
# CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set
|
||||
# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set
|
||||
CONFIG_ARMV7M_TOOLCHAIN_GNU_EABI=y
|
||||
# CONFIG_SERIAL_TERMIOS is not set
|
||||
# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABI is not set
|
||||
# CONFIG_ARMV7M_OABI_TOOLCHAIN is not set
|
||||
CONFIG_SERIAL_TERMIOS=y
|
||||
|
||||
#
|
||||
# STM32 Configuration Options
|
||||
#
|
||||
# CONFIG_ARCH_CHIP_STM32L151C6 is not set
|
||||
# CONFIG_ARCH_CHIP_STM32L151C8 is not set
|
||||
# CONFIG_ARCH_CHIP_STM32L151CB is not set
|
||||
# CONFIG_ARCH_CHIP_STM32L151R6 is not set
|
||||
# CONFIG_ARCH_CHIP_STM32L151R8 is not set
|
||||
# CONFIG_ARCH_CHIP_STM32L151RB is not set
|
||||
# CONFIG_ARCH_CHIP_STM32L151V6 is not set
|
||||
# CONFIG_ARCH_CHIP_STM32L151V8 is not set
|
||||
# CONFIG_ARCH_CHIP_STM32L151VB is not set
|
||||
# CONFIG_ARCH_CHIP_STM32L152C6 is not set
|
||||
# CONFIG_ARCH_CHIP_STM32L152C8 is not set
|
||||
# CONFIG_ARCH_CHIP_STM32L152CB is not set
|
||||
# CONFIG_ARCH_CHIP_STM32L152R6 is not set
|
||||
# CONFIG_ARCH_CHIP_STM32L152R8 is not set
|
||||
# CONFIG_ARCH_CHIP_STM32L152RB is not set
|
||||
# CONFIG_ARCH_CHIP_STM32L152V6 is not set
|
||||
# CONFIG_ARCH_CHIP_STM32L152V8 is not set
|
||||
# CONFIG_ARCH_CHIP_STM32L152VB is not set
|
||||
# CONFIG_ARCH_CHIP_STM32F100C8 is not set
|
||||
# CONFIG_ARCH_CHIP_STM32F100CB is not set
|
||||
# CONFIG_ARCH_CHIP_STM32F100R8 is not set
|
||||
@ -109,8 +128,8 @@ CONFIG_ARMV7M_TOOLCHAIN_GNU_EABI=y
|
||||
# CONFIG_ARCH_CHIP_STM32F100VC is not set
|
||||
# CONFIG_ARCH_CHIP_STM32F100VD is not set
|
||||
# CONFIG_ARCH_CHIP_STM32F100VE is not set
|
||||
CONFIG_ARCH_CHIP_STM32F103C8=y
|
||||
# CONFIG_ARCH_CHIP_STM32F103C4 is not set
|
||||
CONFIG_ARCH_CHIP_STM32F103C8=y
|
||||
# CONFIG_ARCH_CHIP_STM32F103RET6 is not set
|
||||
# CONFIG_ARCH_CHIP_STM32F103VCT6 is not set
|
||||
# CONFIG_ARCH_CHIP_STM32F103VET6 is not set
|
||||
@ -142,9 +161,18 @@ CONFIG_ARCH_CHIP_STM32F103C8=y
|
||||
# CONFIG_ARCH_CHIP_STM32F427V is not set
|
||||
# CONFIG_ARCH_CHIP_STM32F427Z is not set
|
||||
# CONFIG_ARCH_CHIP_STM32F427I is not set
|
||||
# CONFIG_STM32_STM32L15XX is not set
|
||||
# CONFIG_STM32_ENERGYLITE is not set
|
||||
CONFIG_STM32_STM32F10XX=y
|
||||
# CONFIG_STM32_VALUELINE is not set
|
||||
# CONFIG_STM32_CONNECTIVITYLINE is not set
|
||||
CONFIG_STM32_PERFORMANCELINE=y
|
||||
# CONFIG_STM32_HIGHDENSITY is not set
|
||||
CONFIG_STM32_MEDIUMDENSITY=y
|
||||
# CONFIG_STM32_LOWDENSITY is not set
|
||||
# CONFIG_STM32_STM32F20XX is not set
|
||||
# CONFIG_STM32_STM32F30XX is not set
|
||||
# CONFIG_STM32_STM32F40XX is not set
|
||||
# CONFIG_STM32_DFU is not set
|
||||
|
||||
#
|
||||
@ -162,11 +190,10 @@ CONFIG_STM32_MEDIUMDENSITY=y
|
||||
# CONFIG_STM32_DAC2 is not set
|
||||
# CONFIG_STM32_I2C1 is not set
|
||||
# CONFIG_STM32_I2C2 is not set
|
||||
# CONFIG_STM32_IWDG is not set
|
||||
# CONFIG_STM32_PWR is not set
|
||||
# CONFIG_STM32_SDIO is not set
|
||||
# CONFIG_STM32_SPI1 is not set
|
||||
# CONFIG_STM32_SPI2 is not set
|
||||
CONFIG_STM32_SPI2=y
|
||||
# CONFIG_STM32_TIM1 is not set
|
||||
# CONFIG_STM32_TIM2 is not set
|
||||
# CONFIG_STM32_TIM3 is not set
|
||||
@ -181,19 +208,19 @@ CONFIG_STM32_USART1=y
|
||||
# CONFIG_STM32_UART4 is not set
|
||||
# CONFIG_STM32_UART5 is not set
|
||||
# CONFIG_STM32_USB is not set
|
||||
# CONFIG_STM32_IWDG is not set
|
||||
# CONFIG_STM32_WWDG is not set
|
||||
CONFIG_STM32_SPI=y
|
||||
|
||||
#
|
||||
# Alternate Pin Mapping
|
||||
#
|
||||
# CONFIG_STM32_TIM3_NO_REMAP is not set
|
||||
# CONFIG_STM32_TIM3_FULL_REMAP is not set
|
||||
# CONFIG_STM32_TIM3_PARTIAL_REMAP is not set
|
||||
# CONFIG_STM32_USART1_REMAP is not set
|
||||
# CONFIG_STM32_JTAG_DISABLE is not set
|
||||
CONFIG_STM32_JTAG_FULL_ENABLE=y
|
||||
# CONFIG_STM32_JTAG_NOJNTRST_ENABLE is not set
|
||||
# CONFIG_STM32_JTAG_SW_ENABLE is not set
|
||||
CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y
|
||||
# CONFIG_STM32_FORCEPOWER is not set
|
||||
# CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set
|
||||
CONFIG_STM32_USART=y
|
||||
@ -204,6 +231,12 @@ CONFIG_STM32_USART=y
|
||||
# CONFIG_USART1_RS485 is not set
|
||||
# CONFIG_STM32_USART_SINGLEWIRE is not set
|
||||
|
||||
#
|
||||
# SPI Configuration
|
||||
#
|
||||
# CONFIG_STM32_SPI_INTERRUPTS is not set
|
||||
# CONFIG_STM32_SPI_DMA is not set
|
||||
|
||||
#
|
||||
# USB Host Configuration
|
||||
#
|
||||
@ -293,13 +326,7 @@ CONFIG_SCHED_WAITPID=y
|
||||
# CONFIG_SCHED_ATEXIT is not set
|
||||
# CONFIG_SCHED_ONEXIT is not set
|
||||
CONFIG_USER_ENTRYPOINT="nsh_main"
|
||||
CONFIG_DISABLE_OS_API=y
|
||||
# CONFIG_DISABLE_CLOCK is not set
|
||||
# CONFIG_DISABLE_POSIX_TIMERS is not set
|
||||
# CONFIG_DISABLE_PTHREAD is not set
|
||||
# CONFIG_DISABLE_SIGNALS is not set
|
||||
# CONFIG_DISABLE_MQUEUE is not set
|
||||
# CONFIG_DISABLE_ENVIRON is not set
|
||||
# CONFIG_DISABLE_OS_API is not set
|
||||
|
||||
#
|
||||
# Signal Numbers
|
||||
@ -308,6 +335,7 @@ CONFIG_SIG_SIGUSR1=1
|
||||
CONFIG_SIG_SIGUSR2=2
|
||||
CONFIG_SIG_SIGALARM=3
|
||||
CONFIG_SIG_SIGCONDTIMEDOUT=16
|
||||
CONFIG_SIG_SIGWORK=17
|
||||
|
||||
#
|
||||
# Sizes of configurable things (0 disables)
|
||||
@ -335,7 +363,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048
|
||||
#
|
||||
# Device Drivers
|
||||
#
|
||||
CONFIG_DISABLE_POLL=y
|
||||
# CONFIG_DISABLE_POLL is not set
|
||||
CONFIG_DEV_NULL=y
|
||||
# CONFIG_DEV_ZERO is not set
|
||||
# CONFIG_LOOP is not set
|
||||
@ -344,10 +372,14 @@ CONFIG_DEV_NULL=y
|
||||
# CONFIG_PWM is not set
|
||||
# CONFIG_I2C is not set
|
||||
CONFIG_ARCH_HAVE_I2CRESET=y
|
||||
# CONFIG_SPI is not set
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_OWNBUS=y
|
||||
CONFIG_SPI_EXCHANGE=y
|
||||
# CONFIG_SPI_CMDDATA is not set
|
||||
# CONFIG_RTC is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
# CONFIG_ANALOG is not set
|
||||
# CONFIG_AUDIO_DEVICES is not set
|
||||
# CONFIG_BCH is not set
|
||||
# CONFIG_INPUT is not set
|
||||
# CONFIG_LCD is not set
|
||||
@ -357,13 +389,13 @@ CONFIG_ARCH_HAVE_I2CRESET=y
|
||||
# CONFIG_PM is not set
|
||||
# CONFIG_POWER is not set
|
||||
# CONFIG_SENSORS is not set
|
||||
# CONFIG_SERCOMM_CONSOLE is not set
|
||||
CONFIG_SERIAL=y
|
||||
# CONFIG_DEV_LOWCONSOLE is not set
|
||||
# CONFIG_16550_UART is not set
|
||||
CONFIG_ARCH_HAVE_USART1=y
|
||||
CONFIG_MCU_SERIAL=y
|
||||
CONFIG_STANDARD_SERIAL=y
|
||||
CONFIG_SERIAL_NPOLLWAITERS=2
|
||||
CONFIG_USART1_SERIAL_CONSOLE=y
|
||||
# CONFIG_NO_SERIAL_CONSOLE is not set
|
||||
|
||||
@ -378,7 +410,13 @@ CONFIG_USART1_PARITY=0
|
||||
CONFIG_USART1_2STOP=0
|
||||
# CONFIG_USBDEV is not set
|
||||
# CONFIG_USBHOST is not set
|
||||
# CONFIG_WIRELESS is not set
|
||||
CONFIG_WIRELESS=y
|
||||
# CONFIG_WL_CC1101 is not set
|
||||
CONFIG_WL_NRF24L01=y
|
||||
CONFIG_WL_NRF24L01_DFLT_ADDR_WIDTH=5
|
||||
CONFIG_WL_NRF24L01_CHECK_PARAMS=y
|
||||
CONFIG_WL_NRF24L01_RXSUPPORT=y
|
||||
CONFIG_WL_NRF24L01_RXFIFO_LEN=128
|
||||
|
||||
#
|
||||
# System Logging Device Options
|
||||
@ -406,6 +444,7 @@ CONFIG_USART1_2STOP=0
|
||||
# CONFIG_FS_FAT is not set
|
||||
# CONFIG_FS_NXFFS is not set
|
||||
# CONFIG_FS_ROMFS is not set
|
||||
# CONFIG_FS_SMARTFS is not set
|
||||
# CONFIG_FS_BINFS is not set
|
||||
|
||||
#
|
||||
@ -427,6 +466,11 @@ CONFIG_USART1_2STOP=0
|
||||
CONFIG_MM_REGIONS=1
|
||||
# CONFIG_GRAN is not set
|
||||
|
||||
#
|
||||
# Audio Support
|
||||
#
|
||||
# CONFIG_AUDIO is not set
|
||||
|
||||
#
|
||||
# Binary Formats
|
||||
#
|
||||
@ -452,6 +496,7 @@ CONFIG_LIB_HOMEDIR="/"
|
||||
# CONFIG_LIBM is not set
|
||||
# CONFIG_NOPRINTF_FIELDWIDTH is not set
|
||||
# CONFIG_LIBC_FLOATINGPOINT is not set
|
||||
CONFIG_LIB_RAND_ORDER=1
|
||||
# CONFIG_EOL_IS_CR is not set
|
||||
# CONFIG_EOL_IS_LF is not set
|
||||
# CONFIG_EOL_IS_BOTH_CRLF is not set
|
||||
@ -469,8 +514,14 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
|
||||
#
|
||||
# Non-standard Library Support
|
||||
#
|
||||
# CONFIG_SCHED_WORKQUEUE is not set
|
||||
CONFIG_SCHED_WORKQUEUE=y
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_SCHED_WORKPRIORITY=192
|
||||
CONFIG_SCHED_WORKPERIOD=50000
|
||||
CONFIG_SCHED_WORKSTACKSIZE=2048
|
||||
# CONFIG_SCHED_LPWORK is not set
|
||||
# CONFIG_LIB_KBDCODEC is not set
|
||||
# CONFIG_LIB_SLCDCODEC is not set
|
||||
|
||||
#
|
||||
# Basic CXX Support
|
||||
@ -505,8 +556,9 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
|
||||
# CONFIG_EXAMPLES_IGMP is not set
|
||||
# CONFIG_EXAMPLES_LCDRW is not set
|
||||
# CONFIG_EXAMPLES_MM is not set
|
||||
# CONFIG_EXAMPLES_MOUNT is not set
|
||||
# CONFIG_EXAMPLES_MODBUS is not set
|
||||
# CONFIG_EXAMPLES_MOUNT is not set
|
||||
CONFIG_EXAMPLES_NRF24L01TERM=y
|
||||
CONFIG_EXAMPLES_NSH=y
|
||||
# CONFIG_EXAMPLES_NULL is not set
|
||||
# CONFIG_EXAMPLES_NX is not set
|
||||
@ -526,6 +578,10 @@ CONFIG_EXAMPLES_NSH=y
|
||||
# CONFIG_EXAMPLES_ROMFS is not set
|
||||
# CONFIG_EXAMPLES_SENDMAIL is not set
|
||||
# CONFIG_EXAMPLES_SERLOOP is not set
|
||||
# CONFIG_EXAMPLES_SLCD is not set
|
||||
# CONFIG_EXAMPLES_SMART_TEST is not set
|
||||
# CONFIG_EXAMPLES_SMART is not set
|
||||
# CONFIG_EXAMPLES_TCPECHO is not set
|
||||
# CONFIG_EXAMPLES_TELNETD is not set
|
||||
# CONFIG_EXAMPLES_THTTPD is not set
|
||||
# CONFIG_EXAMPLES_TIFF is not set
|
||||
@ -622,6 +678,11 @@ CONFIG_NSH_DISABLE_LOSETUP=y
|
||||
# CONFIG_NSH_DISABLE_USLEEP is not set
|
||||
# CONFIG_NSH_DISABLE_WGET is not set
|
||||
# CONFIG_NSH_DISABLE_XD is not set
|
||||
|
||||
#
|
||||
# Configure Command Options
|
||||
#
|
||||
# CONFIG_NSH_CMDOPT_DF_H is not set
|
||||
CONFIG_NSH_CODECS_BUFSIZE=128
|
||||
CONFIG_NSH_FILEIOSIZE=1024
|
||||
CONFIG_NSH_LINELEN=80
|
||||
@ -634,7 +695,7 @@ CONFIG_NSH_CONSOLE=y
|
||||
# USB Trace Support
|
||||
#
|
||||
# CONFIG_NSH_CONDEV is not set
|
||||
# CONFIG_NSH_ARCHINIT is not set
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
|
||||
#
|
||||
# NxWidgets/NxWM
|
||||
@ -659,9 +720,8 @@ CONFIG_NSH_CONSOLE=y
|
||||
# CONFIG_SYSTEM_INSTALL is not set
|
||||
|
||||
#
|
||||
# RAM Test
|
||||
# FLASH Erase-all Command
|
||||
#
|
||||
# CONFIG_SYSTEM_RAMTEST is not set
|
||||
|
||||
#
|
||||
# readline()
|
||||
|
@ -59,8 +59,6 @@
|
||||
|
||||
static int stm32tiny_wl_irq_attach(xcpt_t isr);
|
||||
|
||||
static void stm32tiny_wl_irq_enable(bool enable);
|
||||
|
||||
static void stm32tiny_wl_chip_enable(bool enable);
|
||||
|
||||
/************************************************************************************
|
||||
@ -70,7 +68,6 @@ static void stm32tiny_wl_chip_enable(bool enable);
|
||||
static FAR struct nrf24l01_config_s nrf_cfg =
|
||||
{
|
||||
.irqattach = stm32tiny_wl_irq_attach,
|
||||
.irqenable = stm32tiny_wl_irq_enable,
|
||||
.chipenable = stm32tiny_wl_chip_enable,
|
||||
};
|
||||
|
||||
@ -82,19 +79,12 @@ static xcpt_t g_isr;
|
||||
|
||||
static int stm32tiny_wl_irq_attach(xcpt_t isr)
|
||||
{
|
||||
vdbg("IRQ attached\n");
|
||||
|
||||
vdbg("Attach IRQ\n");
|
||||
g_isr = isr;
|
||||
stm32_gpiosetevent(GPIO_NRF24L01_IRQ, false, true, false, g_isr);
|
||||
return OK;
|
||||
}
|
||||
|
||||
static void stm32tiny_wl_irq_enable(bool enable)
|
||||
{
|
||||
vdbg("IRQ_enabled:%d\n", enable);
|
||||
stm32_gpiosetevent(GPIO_NRF24L01_IRQ, false, true, false, enable? g_isr:NULL);
|
||||
}
|
||||
|
||||
static void stm32tiny_wl_chip_enable(bool enable)
|
||||
{
|
||||
vdbg("CE:%d\n", enable);
|
||||
|
Loading…
Reference in New Issue
Block a user