projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into telegps-v0.3
[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 ff107e40dd0339fb01eed124f30c282116e1bf7a..a889137cbb7a4e1f84437f601d76e78f8cc22ce8 100644
(file)
--- a/
src/lpc/ao_spi_lpc.c
+++ b/
src/lpc/ao_spi_lpc.c
@@
-42,7
+42,7
@@
static uint8_t spi_dev_null;
/* recv a byte */ \
get lpc_ssp->dr; \
} \
/* recv a byte */ \
get lpc_ssp->dr; \
} \
- } while (0)
;
+ } while (0)
void
ao_spi_send(void *block, uint16_t len, uint8_t id)
void
ao_spi_send(void *block, uint16_t len, uint8_t id)
@@
-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 */