SPI bit order: Add configuration setting to indicate if an architecture-specif SPI implementation does or does not support LSB bit order.
This commit is contained in:
parent
d787b41705
commit
caea59b340
4 changed files with 36 additions and 8 deletions
|
|
@ -51,6 +51,7 @@ config ARCH_CHIP_DM320
|
|||
config ARCH_CHIP_EFM32
|
||||
bool "Energy Micro"
|
||||
select ARCH_HAVE_CMNVECTOR
|
||||
select ARCH_HAVE_SPI_BITORDER
|
||||
select ARMV7M_CMNVECTOR
|
||||
---help---
|
||||
Energy Micro EFM32 microcontrollers (ARM Cortex-M).
|
||||
|
|
@ -206,14 +207,15 @@ config ARCH_CHIP_SAM34
|
|||
config ARCH_CHIP_SAMV7
|
||||
bool "Atmel SAMV7"
|
||||
select ARCH_HAVE_CMNVECTOR
|
||||
select ARMV7M_CMNVECTOR
|
||||
select ARCH_CORTEXM7
|
||||
select ARCH_HAVE_MPU
|
||||
select ARM_HAVE_MPU_UNIFIED
|
||||
select ARCH_HAVE_RAMFUNCS
|
||||
select ARCH_HAVE_TICKLESS
|
||||
select ARMV7M_HAVE_STACKCHECK
|
||||
select ARCH_HAVE_I2CRESET
|
||||
select ARCH_HAVE_SPI_CS_CONTROL
|
||||
select ARM_HAVE_MPU_UNIFIED
|
||||
select ARMV7M_CMNVECTOR
|
||||
select ARMV7M_HAVE_STACKCHECK
|
||||
---help---
|
||||
Atmel SAMV7 (ARM Cortex-M7) architectures
|
||||
|
||||
|
|
@ -221,11 +223,12 @@ config ARCH_CHIP_STM32
|
|||
bool "STMicro STM32 F1/F2/F3/F4"
|
||||
select ARCH_HAVE_CMNVECTOR
|
||||
select ARCH_HAVE_MPU
|
||||
select ARM_HAVE_MPU_UNIFIED
|
||||
select ARCH_HAVE_I2CRESET
|
||||
select ARCH_HAVE_HEAPCHECK
|
||||
select ARCH_HAVE_TICKLESS
|
||||
select ARCH_HAVE_TIMEKEEPING
|
||||
select ARCH_HAVE_SPI_BITORDER
|
||||
select ARM_HAVE_MPU_UNIFIED
|
||||
select ARMV7M_HAVE_STACKCHECK
|
||||
---help---
|
||||
STMicro STM32 architectures (ARM Cortex-M3/4).
|
||||
|
|
@ -233,12 +236,13 @@ config ARCH_CHIP_STM32
|
|||
config ARCH_CHIP_STM32F7
|
||||
bool "STMicro STM32 F7"
|
||||
select ARCH_HAVE_CMNVECTOR
|
||||
select ARMV7M_CMNVECTOR
|
||||
select ARCH_CORTEXM7
|
||||
select ARCH_HAVE_MPU
|
||||
select ARM_HAVE_MPU_UNIFIED
|
||||
select ARCH_HAVE_I2CRESET
|
||||
select ARCH_HAVE_HEAPCHECK
|
||||
select ARCH_HAVE_SPI_BITORDER
|
||||
select ARM_HAVE_MPU_UNIFIED
|
||||
select ARMV7M_CMNVECTOR
|
||||
select ARMV7M_HAVE_STACKCHECK
|
||||
---help---
|
||||
STMicro STM32 architectures (ARM Cortex-M7).
|
||||
|
|
@ -246,13 +250,14 @@ config ARCH_CHIP_STM32F7
|
|||
config ARCH_CHIP_STM32L4
|
||||
bool "STMicro STM32 L4"
|
||||
select ARCH_HAVE_CMNVECTOR
|
||||
select ARMV7M_CMNVECTOR
|
||||
select ARCH_CORTEXM4
|
||||
select ARCH_HAVE_MPU
|
||||
select ARM_HAVE_MPU_UNIFIED
|
||||
select ARCH_HAVE_I2CRESET
|
||||
select ARCH_HAVE_HEAPCHECK
|
||||
select ARCH_HAVE_TICKLESS
|
||||
select ARCH_HAVE_SPI_BITORDER
|
||||
select ARM_HAVE_MPU_UNIFIED
|
||||
select ARMV7M_CMNVECTOR
|
||||
select ARMV7M_HAVE_STACKCHECK
|
||||
---help---
|
||||
STMicro STM32 architectures (ARM Cortex-M4).
|
||||
|
|
|
|||
|
|
@ -67,6 +67,10 @@
|
|||
# error CONFIG_SPI_HWFEATURES=y and CONFIG_SPI_BITORDER=y required by this driver
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_ARCH_HAVE_SPI_BITORDER
|
||||
# warning This platform does not support SPI LSB-bit order
|
||||
#endif
|
||||
|
||||
/* Cisplay resolution */
|
||||
|
||||
#if defined CONFIG_MEMLCD_LS013B7DH01
|
||||
|
|
|
|||
|
|
@ -55,27 +55,42 @@ config SPI_HWFEATURES
|
|||
basically the OR of any specific hardware feature and eanbles
|
||||
the SPI hwfeatures() interface method.
|
||||
|
||||
config ARCH_HAVE_SPI_CRCGENERATION
|
||||
bool
|
||||
default n
|
||||
|
||||
config SPI_CRCGENERATION
|
||||
bool
|
||||
default n
|
||||
select SPI_HWFEATURES
|
||||
depends on ARCH_HAVE_SPI_CRCGENERATION
|
||||
---help---
|
||||
Selected by MCU Kconfig logic if implementation supports automatic
|
||||
generation of SPI CRCs. Enables the HWFEAT_CRCGENERATION option
|
||||
as well as the hwfeartures() interface method.
|
||||
|
||||
config ARCH_HAVE_SPI_CS_CONTROL
|
||||
bool
|
||||
default n
|
||||
|
||||
config SPI_CS_CONTROL
|
||||
bool "SPI CS Behavior Control"
|
||||
default n
|
||||
select SPI_HWFEATURES
|
||||
depends on ARCH_HAVE_SPI_CS_CONTROL
|
||||
---help---
|
||||
Enables possibilities to define the behavior of CS.
|
||||
Also enables the hwfeatures() interface method.
|
||||
|
||||
config ARCH_HAVE_SPI_BITORDER
|
||||
bool
|
||||
default n
|
||||
|
||||
config SPI_BITORDER
|
||||
bool "SPI Bit Order Control"
|
||||
default n
|
||||
select SPI_HWFEATURES
|
||||
depends on ARCH_HAVE_SPI_BITORDER
|
||||
---help---
|
||||
Enables capability to select MSB- or LSB-first hardware feature for
|
||||
data transfers.
|
||||
|
|
|
|||
|
|
@ -65,6 +65,10 @@
|
|||
# error CONFIG_SPI_HWFEATURES=y and CONFIG_SPI_BITORDER=y required by this driver
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_ARCH_HAVE_SPI_BITORDER
|
||||
# warning This platform does not support SPI LSB-bit order
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_WL_PN532_DEBUG
|
||||
# define pn532err _err
|
||||
# define pn532info _info
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue