mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 04:19:37 +08:00
SAMV7: Fix to SPI-Master driver. Without this the chip select decoding feature will not work properly
This commit is contained in:
committed by
Gregory Nutt
parent
96aba62fda
commit
77caf4180f
@@ -626,7 +626,7 @@ static inline uint32_t spi_cs2pcs(struct sam_spics_s *spics)
|
|||||||
#ifndef CONFIG_SAMV7_SPI_CS_DECODING
|
#ifndef CONFIG_SAMV7_SPI_CS_DECODING
|
||||||
return ((uint32_t)1 << (spics->cs)) - 1;
|
return ((uint32_t)1 << (spics->cs)) - 1;
|
||||||
#else
|
#else
|
||||||
return spics->cs;
|
return spics->cs - 1;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user