aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/ATSAMA5D2/SPI/main.c
diff options
context:
space:
mode:
authoredolomb <none@example.com>2018-03-16 15:04:54 +0000
committeredolomb <none@example.com>2018-03-16 15:04:54 +0000
commitae18581dd903c5b0bf1d07e7465cbebfb14597f8 (patch)
tree7467cfa82957e1cac59189698abd56ed05624463 /testhal/ATSAMA5D2/SPI/main.c
parent8e1851be0ef7d20563085907460f9bb77ed2ebba (diff)
downloadChibiOS-ae18581dd903c5b0bf1d07e7465cbebfb14597f8.tar.gz
ChibiOS-ae18581dd903c5b0bf1d07e7465cbebfb14597f8.tar.bz2
ChibiOS-ae18581dd903c5b0bf1d07e7465cbebfb14597f8.zip
- Updated demos
- Minor changes git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11779 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'testhal/ATSAMA5D2/SPI/main.c')
-rw-r--r--testhal/ATSAMA5D2/SPI/main.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/testhal/ATSAMA5D2/SPI/main.c b/testhal/ATSAMA5D2/SPI/main.c
index 33e590bc4..312ca8819 100644
--- a/testhal/ATSAMA5D2/SPI/main.c
+++ b/testhal/ATSAMA5D2/SPI/main.c
@@ -92,14 +92,11 @@ int main(void) {
chSysInit();
/*
- * Activates the serial driver 0 using the driver default configuration.
+ * Activates the serial driver 1 using the driver default configuration.
*/
sdStart(&SD1, &sdcfg);
spiStart(&SPID1, &mst_spicfg); /* Setup transfer parameters. */
- /* Redirecting UART1 RX on PD2 and UART1 TX on PD3. */
- palSetGroupMode(PIOD, PAL_PORT_BIT(2) | PAL_PORT_BIT(3), 0U,
- PAL_SAMA_FUNC_PERIPH_A | PAL_MODE_SECURE);
/* Redirecting SPI1 pins. */
palSetGroupMode(PIOD, PAL_PORT_BIT(25) | PAL_PORT_BIT(26) |
@@ -111,7 +108,7 @@ int main(void) {
while (true) {
if(!palReadPad(PIOB, PIOB_USER_PB)) {
/* SPI operation in loopback*/
- spiStartExchange(&SPID1, BUFFER_SIZE, &txbuf, &rxbuf);
+ spiExchange(&SPID1, BUFFER_SIZE, &txbuf, &rxbuf);
/* D-Cache L1 is enabled */
cacheInvalidateRegion(&rxbuf, sizeof(rxbuf));