From ae18581dd903c5b0bf1d07e7465cbebfb14597f8 Mon Sep 17 00:00:00 2001 From: edolomb Date: Fri, 16 Mar 2018 15:04:54 +0000 Subject: - Updated demos - Minor changes git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11779 110e8d01-0319-4d1e-a829-52ad28d1bb01 --- testhal/ATSAMA5D2/SPI/main.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'testhal/ATSAMA5D2/SPI/main.c') 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)); -- cgit v1.2.3