RP - Fix SPI DR reversed between TX & RX. Fix minor typo.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14302 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
e134412309
commit
58fba1644b
|
@ -109,6 +109,7 @@
|
|||
#define PAL_MODE_ALTERNATE_SIO (PAL_MODE_ALTERNATE(5U))
|
||||
#define PAL_MODE_ALTERNATE_PIO0 (PAL_MODE_ALTERNATE(6U))
|
||||
#define PAL_MODE_ALTERNATE_PIO1 (PAL_MODE_ALTERNATE(7U))
|
||||
#define PAL_MODE_ALTERNATE_CLK (PAL_MODE_ALTERNATE(8U))
|
||||
#define PAL_MODE_ALTERNATE_USB (PAL_MODE_ALTERNATE(9U))
|
||||
/** @} */
|
||||
|
||||
|
@ -388,7 +389,7 @@ __STATIC_INLINE void __pal_lld_pad_set_mode(ioportid_t port,
|
|||
|
||||
ctrlbits = (mode & 0x007FFFFFU) >> 0U;
|
||||
oebits = (mode & 0x00800000U) >> 23U;
|
||||
padbits = (mode & 0xF0000000U) >> 24;
|
||||
padbits = (mode & 0xF0000000U) >> 24U;
|
||||
|
||||
/* Setting up GPIO direction first.*/
|
||||
if (oebits != 0U) {
|
||||
|
|
|
@ -203,12 +203,12 @@ void spi_lld_start(SPIDriver *spip) {
|
|||
}
|
||||
|
||||
/* DMA setup.*/
|
||||
dmaChannelSetDestinationX(spip->dmarx, (uint32_t)&spip->spi->SSPDR);
|
||||
dmaChannelSetSourceX(spip->dmatx, (uint32_t)&spip->spi->SSPDR);
|
||||
dmaChannelSetSourceX(spip->dmarx, (uint32_t)&spip->spi->SSPDR);
|
||||
dmaChannelSetDestinationX(spip->dmatx, (uint32_t)&spip->spi->SSPDR);
|
||||
}
|
||||
|
||||
/* Configuration-dependent DMA settings.*/
|
||||
dss = (spip->config->SSPCR0 & SPI_SSPCR0_DSS_Msk) >> SPI_SSPCR0_DSS_Pos;
|
||||
dss = (spip->config->SSPCR0 & SPI_SSPCR0_DSS_Msk)/* >> SPI_SSPCR0_DSS_Pos*/;
|
||||
if (dss <= SPI_SSPCR0_DSS_8BIT) {
|
||||
/* Frame width is 8 bits or smaller.*/
|
||||
spip->rxdmamode = (spip->rxdmamode & ~DMA_CTRL_TRIG_DATA_SIZE_Msk) |
|
||||
|
|
Loading…
Reference in New Issue