From 49d1458e83e217e8e50ecf9b89eab427d0c9affc Mon Sep 17 00:00:00 2001 From: spacecoaster Date: Sun, 21 Sep 2014 15:47:24 +0000 Subject: [KINETIS] K20x SPI demo converted to use DMA. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7301 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/KINETIS/RT-MCHCK-K20-SPI/main.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'demos/KINETIS/RT-MCHCK-K20-SPI/main.c') diff --git a/demos/KINETIS/RT-MCHCK-K20-SPI/main.c b/demos/KINETIS/RT-MCHCK-K20-SPI/main.c index 08633ded7..e65089bba 100644 --- a/demos/KINETIS/RT-MCHCK-K20-SPI/main.c +++ b/demos/KINETIS/RT-MCHCK-K20-SPI/main.c @@ -26,12 +26,10 @@ void spicb(SPIDriver *spip) { /* * SPI1 configuration structure. - * The slave select line is the PCS4 pin also assigned to GPIOC pin 0. */ static const SPIConfig spi1cfg = { spicb, /* HW dependent part.*/ - KINETIS_SPI_PCS4, GPIOC, 0, KINETIS_SPI_TAR_8BIT_SLOW @@ -76,13 +74,12 @@ int main(void) { chSysInit(); /* - * Activates SPID1. Slave select is configured on GPIOC pin 0. This is - * PCS4 for the KINETIS DSPI managed slave select. + * Activates SPID1. Slave select is configured on GPIOC pin 0. */ - palSetPadMode(GPIOC, 5, PAL_MODE_ALTERNATIVE_2); /* SCK */ - palSetPadMode(GPIOC, 6, PAL_MODE_ALTERNATIVE_2); /* MOSI */ - palSetPadMode(GPIOD, 3, PAL_MODE_ALTERNATIVE_2); /* MISO */ - palSetPadMode(GPIOC, 0, PAL_MODE_ALTERNATIVE_2); /* SS */ + palSetPadMode(GPIOC, 5, PAL_MODE_ALTERNATIVE_2); /* SCK */ + palSetPadMode(GPIOC, 6, PAL_MODE_ALTERNATIVE_2); /* MOSI */ + palSetPadMode(GPIOD, 3, PAL_MODE_ALTERNATIVE_2); /* MISO */ + palSetPadMode(GPIOC, 0, PAL_MODE_OUTPUT_PUSHPULL); /* SS */ /* * Initializes the SPI driver 1. -- cgit v1.2.3