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:
raiden00pl 2024-01-28 15:44:40 +01:00 committed by Xiang Xiao
parent 32df0dbbaa
commit 60807efc85

View File

@ -76,6 +76,8 @@
#define MRF24J40_SYMBOL_DURATION_PS 16000000
#define MRF24J40_SPIMODE SPIDEV_MODE0
/* Clock configuration macros */
#define MRF24J40_BEACONINTERVAL_NSEC(beaconorder) \
@ -90,10 +92,6 @@
# error High priority work queue required in this driver
#endif
#ifndef CONFIG_IEEE802154_MRF24J40_SPIMODE
# define CONFIG_IEEE802154_MRF24J40_SPIMODE SPIDEV_MODE0
#endif
#ifndef CONFIG_IEEE802154_MRF24J40_FREQUENCY
# define CONFIG_IEEE802154_MRF24J40_FREQUENCY 8000000
#endif
@ -174,7 +172,7 @@ static inline void mrf24j40_spi_lock(FAR struct spi_dev_s *spi)
{
SPI_LOCK(spi, 1);
SPI_SETBITS(spi, 8);
SPI_SETMODE(spi, CONFIG_IEEE802154_MRF24J40_SPIMODE);
SPI_SETMODE(spi, MRF24J40_SPIMODE);
SPI_SETFREQUENCY(spi, CONFIG_IEEE802154_MRF24J40_FREQUENCY);
}