mirror of
https://github.com/apache/nuttx.git
synced 2026-08-19 20:48:19 +00:00
typosarch/arm/src/lpc17xx/lpc17_spi.h
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2747 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
9207b2dee1
commit
2bfc4c660c
1 changed files with 4 additions and 3 deletions
|
|
@ -696,7 +696,7 @@ FAR struct spi_dev_s *up_spiinitialize(int port)
|
|||
lpc17_configgpio(GPIO_SSP0_MOSI);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPC17_SSP0
|
||||
#ifdef CONFIG_LPC17_SSP1
|
||||
lpc17_configgpio(GPIO_SSP1_SCK);
|
||||
lpc17_configgpio(GPIO_SSP1_MISO);
|
||||
lpc17_configgpio(GPIO_SSP1_MOSI);
|
||||
|
|
@ -711,7 +711,7 @@ FAR struct spi_dev_s *up_spiinitialize(int port)
|
|||
putreg32(regval, LPC17_SYSCON_PCLKSEL1);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPC17_SSP0
|
||||
#ifdef CONFIG_LPC17_SSP1
|
||||
regval = getreg32(LPC17_SYSCON_PCLKSEL0);
|
||||
regval &= ~SYSCON_PCLKSEL0_SSP1_MASK;
|
||||
regval |= (SSP_PCLKSET_DIV << SYSCON_PCLKSEL0_SSP1_SHIFT);
|
||||
|
|
@ -724,7 +724,8 @@ FAR struct spi_dev_s *up_spiinitialize(int port)
|
|||
regval &= ~(SYSCON_PCONP_PCSSP0|SYSCON_PCONP_PCSSP1);
|
||||
#ifdef CONFIG_LPC17_SSP0
|
||||
regval |= SYSCON_PCONP_PCSSP0;
|
||||
#else
|
||||
#endif
|
||||
#ifdef CONFIG_LPC17_SSP1
|
||||
regval |= SYSCON_PCONP_PCSSP1;
|
||||
#endif
|
||||
putreg32(regval, LPC17_SYSCON_PCONP);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue