From 32ff91057f7b62b61c72b0eae0daedf2d63f9b4c Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 19 Feb 2014 14:47:04 -0600 Subject: [PATCH] SAMD20: Move some common SERCOM logic to a separate file where it can be shared --- configs/samd20-xplained/src/sam_spi.c | 3 ++- configs/samd20-xplained/src/samd20-xplained.h | 6 ------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/configs/samd20-xplained/src/sam_spi.c b/configs/samd20-xplained/src/sam_spi.c index 4c6b9b008e6..605a601e961 100644 --- a/configs/samd20-xplained/src/sam_spi.c +++ b/configs/samd20-xplained/src/sam_spi.c @@ -279,6 +279,7 @@ int sam_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) (void)sam_portwrite(PORT_OLED_DATA, !cmd); } #endif - return OK; + + return OK; } #endif diff --git a/configs/samd20-xplained/src/samd20-xplained.h b/configs/samd20-xplained/src/samd20-xplained.h index 4bf014ddc7a..14f32d3327c 100644 --- a/configs/samd20-xplained/src/samd20-xplained.h +++ b/configs/samd20-xplained/src/samd20-xplained.h @@ -128,11 +128,9 @@ # define PORT_SD_CD (PORT_INTERRUPT | PORT_INT_CHANGE | PORT_PULL_UP | \ PORTF | PORT_PIN5) -# define IRQ_SD_CD SAM_IRQ_PB5 # define PORT_SD_CS (PORT_OUTPUT | PORT_PULL_NONE | PORT_OUTPUT_SET | \ PORTA | PORT_PIN5) -# define SD_CSNO 0 # elif defined(CONFIG_SAMD20_XPLAINED_IOMODULE_EXT2) @@ -143,11 +141,9 @@ # define PORT_CD (PORT_INTERRUPT | PORT_INT_CHANGE | PORT_PULL_UP | \ PORTB | PORT_PIN15) -# define IRQ_CD SAM_IRQ_PB15 # define PORT_SD_CS (PORT_OUTPUT | PORT_PULL_NONE | PORT_OUTPUT_SET | \ PORTA | PORT_PIN17) -# define SD_CSNO 2 # else # error Which connector is the I/O1 module installed in? @@ -200,7 +196,6 @@ PORTB | PORT_PIN5) # define PORT_OLED_CS (PORT_OUTPUT | PORT_PULL_NONE | PORT_OUTPUT_SET | \ PORTA | PORT_PIN5) -# define OLED_CSNO 0 # elif defined(CONFIG_SAMD20_XPLAINED_OLED1MODULE_EXT2) @@ -215,7 +210,6 @@ PORTB | PORT_PIN15) # define PORT_OLED_CS (PORT_OUTPUT | PORT_PULL_NONE | PORT_OUTPUT_SET | \ PORTA | PORT_PIN17) -# define OLED_CSNO 2 # else # error Which connector is the OLED1 module installed in?