mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
SAMD20: Move some common SERCOM logic to a separate file where it can be shared
This commit is contained in:
@@ -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);
|
(void)sam_portwrite(PORT_OLED_DATA, !cmd);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return OK;
|
|
||||||
|
return OK;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -128,11 +128,9 @@
|
|||||||
|
|
||||||
# define PORT_SD_CD (PORT_INTERRUPT | PORT_INT_CHANGE | PORT_PULL_UP | \
|
# define PORT_SD_CD (PORT_INTERRUPT | PORT_INT_CHANGE | PORT_PULL_UP | \
|
||||||
PORTF | PORT_PIN5)
|
PORTF | PORT_PIN5)
|
||||||
# define IRQ_SD_CD SAM_IRQ_PB5
|
|
||||||
|
|
||||||
# define PORT_SD_CS (PORT_OUTPUT | PORT_PULL_NONE | PORT_OUTPUT_SET | \
|
# define PORT_SD_CS (PORT_OUTPUT | PORT_PULL_NONE | PORT_OUTPUT_SET | \
|
||||||
PORTA | PORT_PIN5)
|
PORTA | PORT_PIN5)
|
||||||
# define SD_CSNO 0
|
|
||||||
|
|
||||||
# elif defined(CONFIG_SAMD20_XPLAINED_IOMODULE_EXT2)
|
# elif defined(CONFIG_SAMD20_XPLAINED_IOMODULE_EXT2)
|
||||||
|
|
||||||
@@ -143,11 +141,9 @@
|
|||||||
|
|
||||||
# define PORT_CD (PORT_INTERRUPT | PORT_INT_CHANGE | PORT_PULL_UP | \
|
# define PORT_CD (PORT_INTERRUPT | PORT_INT_CHANGE | PORT_PULL_UP | \
|
||||||
PORTB | PORT_PIN15)
|
PORTB | PORT_PIN15)
|
||||||
# define IRQ_CD SAM_IRQ_PB15
|
|
||||||
|
|
||||||
# define PORT_SD_CS (PORT_OUTPUT | PORT_PULL_NONE | PORT_OUTPUT_SET | \
|
# define PORT_SD_CS (PORT_OUTPUT | PORT_PULL_NONE | PORT_OUTPUT_SET | \
|
||||||
PORTA | PORT_PIN17)
|
PORTA | PORT_PIN17)
|
||||||
# define SD_CSNO 2
|
|
||||||
|
|
||||||
# else
|
# else
|
||||||
# error Which connector is the I/O1 module installed in?
|
# error Which connector is the I/O1 module installed in?
|
||||||
@@ -200,7 +196,6 @@
|
|||||||
PORTB | PORT_PIN5)
|
PORTB | PORT_PIN5)
|
||||||
# define PORT_OLED_CS (PORT_OUTPUT | PORT_PULL_NONE | PORT_OUTPUT_SET | \
|
# define PORT_OLED_CS (PORT_OUTPUT | PORT_PULL_NONE | PORT_OUTPUT_SET | \
|
||||||
PORTA | PORT_PIN5)
|
PORTA | PORT_PIN5)
|
||||||
# define OLED_CSNO 0
|
|
||||||
|
|
||||||
# elif defined(CONFIG_SAMD20_XPLAINED_OLED1MODULE_EXT2)
|
# elif defined(CONFIG_SAMD20_XPLAINED_OLED1MODULE_EXT2)
|
||||||
|
|
||||||
@@ -215,7 +210,6 @@
|
|||||||
PORTB | PORT_PIN15)
|
PORTB | PORT_PIN15)
|
||||||
# define PORT_OLED_CS (PORT_OUTPUT | PORT_PULL_NONE | PORT_OUTPUT_SET | \
|
# define PORT_OLED_CS (PORT_OUTPUT | PORT_PULL_NONE | PORT_OUTPUT_SET | \
|
||||||
PORTA | PORT_PIN17)
|
PORTA | PORT_PIN17)
|
||||||
# define OLED_CSNO 2
|
|
||||||
|
|
||||||
# else
|
# else
|
||||||
# error Which connector is the OLED1 module installed in?
|
# error Which connector is the OLED1 module installed in?
|
||||||
|
|||||||
Reference in New Issue
Block a user