Fix SSI mode setting logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2678 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
9ccd158477
commit
7f47029021
@ -1223,10 +1223,10 @@ static void ssi_setmodeinternal(struct lm3s_ssidev_s *priv, enum spi_mode_e mode
|
||||
return;
|
||||
}
|
||||
|
||||
/* Then set the selected mode */
|
||||
/* Then set the selected mode: Freescale SPI format, mode0-3 */
|
||||
|
||||
regval = ssi_getreg(priv, LM3S_SSI_CR0_OFFSET);
|
||||
regval &= ~SSI_CR0_FRF_MASK;
|
||||
regval &= ~(SSI_CR0_FRF_MASK|SSI_CR0_SPH|SSI_CR0_SPO);
|
||||
regval |= modebits;
|
||||
ssi_putreg(priv, LM3S_SSI_CR0_OFFSET, regval);
|
||||
ssivdbg("CR0: %08x\n", regval);
|
||||
|
Loading…
Reference in New Issue
Block a user