mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user