mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 04:19:37 +08:00
mrf24j40: always use SPI MODE(0,0)
Other SPI modes are not supported. From doc: "The MRF24J40 supports SPI (mode 0,0) which requires that SCK idles in a low state."
This commit is contained in:
@@ -76,6 +76,8 @@
|
|||||||
|
|
||||||
#define MRF24J40_SYMBOL_DURATION_PS 16000000
|
#define MRF24J40_SYMBOL_DURATION_PS 16000000
|
||||||
|
|
||||||
|
#define MRF24J40_SPIMODE SPIDEV_MODE0
|
||||||
|
|
||||||
/* Clock configuration macros */
|
/* Clock configuration macros */
|
||||||
|
|
||||||
#define MRF24J40_BEACONINTERVAL_NSEC(beaconorder) \
|
#define MRF24J40_BEACONINTERVAL_NSEC(beaconorder) \
|
||||||
@@ -90,10 +92,6 @@
|
|||||||
# error High priority work queue required in this driver
|
# error High priority work queue required in this driver
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_IEEE802154_MRF24J40_SPIMODE
|
|
||||||
# define CONFIG_IEEE802154_MRF24J40_SPIMODE SPIDEV_MODE0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_IEEE802154_MRF24J40_FREQUENCY
|
#ifndef CONFIG_IEEE802154_MRF24J40_FREQUENCY
|
||||||
# define CONFIG_IEEE802154_MRF24J40_FREQUENCY 8000000
|
# define CONFIG_IEEE802154_MRF24J40_FREQUENCY 8000000
|
||||||
#endif
|
#endif
|
||||||
@@ -174,7 +172,7 @@ static inline void mrf24j40_spi_lock(FAR struct spi_dev_s *spi)
|
|||||||
{
|
{
|
||||||
SPI_LOCK(spi, 1);
|
SPI_LOCK(spi, 1);
|
||||||
SPI_SETBITS(spi, 8);
|
SPI_SETBITS(spi, 8);
|
||||||
SPI_SETMODE(spi, CONFIG_IEEE802154_MRF24J40_SPIMODE);
|
SPI_SETMODE(spi, MRF24J40_SPIMODE);
|
||||||
SPI_SETFREQUENCY(spi, CONFIG_IEEE802154_MRF24J40_FREQUENCY);
|
SPI_SETFREQUENCY(spi, CONFIG_IEEE802154_MRF24J40_FREQUENCY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user