projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/lpc: Filter ADC inputs
[fw/altos]
/
src
/
lpc
/
ao_spi_lpc.c
diff --git
a/src/lpc/ao_spi_lpc.c
b/src/lpc/ao_spi_lpc.c
index 12d448723cdb81cb722c64ea06df140622ada329..c3587698e1d26f55ac1b7b583b2ab76f7707b6ed 100644
(file)
--- a/
src/lpc/ao_spi_lpc.c
+++ b/
src/lpc/ao_spi_lpc.c
@@
-182,7
+182,7
@@
ao_spi_init(void)
#endif
#if SPI_MOSI1_P0_21
#endif
#if SPI_MOSI1_P0_21
- lpc_ioconf.pio
1
_21 = ao_lpc_alternate(LPC_IOCONF_FUNC_PIO0_21_MOSI1);
+ lpc_ioconf.pio
0
_21 = ao_lpc_alternate(LPC_IOCONF_FUNC_PIO0_21_MOSI1);
#define HAS_MOSI1
#endif
#if SPI_MOSI1_P1_22
#define HAS_MOSI1
#endif
#if SPI_MOSI1_P1_22
@@
-199,7
+199,8
@@
ao_spi_init(void)
/* Turn on the clock */
lpc_scb.ssp1clkdiv = 1;
/* Turn on the clock */
lpc_scb.ssp1clkdiv = 1;
- /* De-assert reset */
+ /* Reset the device */
+ lpc_scb.presetctrl &= ~(1 << LPC_SCB_PRESETCTRL_SSP1_RST_N);
lpc_scb.presetctrl |= (1 << LPC_SCB_PRESETCTRL_SSP1_RST_N);
ao_spi_channel_init(1);
#endif /* HAS_SPI_1 */
lpc_scb.presetctrl |= (1 << LPC_SCB_PRESETCTRL_SSP1_RST_N);
ao_spi_channel_init(1);
#endif /* HAS_SPI_1 */