aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/multi/SPI/cfg-stm32f407_discovery
diff options
context:
space:
mode:
Diffstat (limited to 'testhal/STM32/multi/SPI/cfg-stm32f407_discovery')
-rw-r--r--testhal/STM32/multi/SPI/cfg-stm32f407_discovery/portab.c16
-rw-r--r--testhal/STM32/multi/SPI/cfg-stm32f407_discovery/portab.h8
2 files changed, 22 insertions, 2 deletions
diff --git a/testhal/STM32/multi/SPI/cfg-stm32f407_discovery/portab.c b/testhal/STM32/multi/SPI/cfg-stm32f407_discovery/portab.c
index 89a3a439f..02ff7047b 100644
--- a/testhal/STM32/multi/SPI/cfg-stm32f407_discovery/portab.c
+++ b/testhal/STM32/multi/SPI/cfg-stm32f407_discovery/portab.c
@@ -34,10 +34,25 @@
/* Module exported variables. */
/*===========================================================================*/
+void spi_circular_cb(SPIDriver *spip);
+
+/*
+ * Circular SPI configuration (21MHz, CPHA=0, CPOL=0, MSb first).
+ */
+const SPIConfig c_spicfg = {
+ true,
+ spi_circular_cb,
+ GPIOB,
+ 12,
+ 0,
+ 0
+};
+
/*
* Maximum speed SPI configuration (21MHz, CPHA=0, CPOL=0, MSb first).
*/
const SPIConfig hs_spicfg = {
+ false,
NULL,
GPIOB,
12,
@@ -49,6 +64,7 @@ const SPIConfig hs_spicfg = {
* Low speed SPI configuration (328.125kHz, CPHA=0, CPOL=0, MSb first).
*/
const SPIConfig ls_spicfg = {
+ false,
NULL,
GPIOB,
12,
diff --git a/testhal/STM32/multi/SPI/cfg-stm32f407_discovery/portab.h b/testhal/STM32/multi/SPI/cfg-stm32f407_discovery/portab.h
index cb2e2d1e3..73293a0cf 100644
--- a/testhal/STM32/multi/SPI/cfg-stm32f407_discovery/portab.h
+++ b/testhal/STM32/multi/SPI/cfg-stm32f407_discovery/portab.h
@@ -29,11 +29,14 @@
/* Module constants. */
/*===========================================================================*/
-#define PORTAB_LINE_LED1 LINE_LED5
-//#define PORTAB_LINE_LED2
+#define PORTAB_LINE_LED1 LINE_LED3
+#define PORTAB_LINE_LED2 LINE_LED4
#define PORTAB_LED_OFF PAL_LOW
#define PORTAB_LED_ON PAL_HIGH
+#define PORTAB_LINE_BUTTON LINE_BUTTON
+#define PORTAB_BUTTON_PRESSED PAL_HIGH
+
#define PORTAB_SPI1 SPID2
/*===========================================================================*/
@@ -56,6 +59,7 @@
/* External declarations. */
/*===========================================================================*/
+extern const SPIConfig c_spicfg;
extern const SPIConfig hs_spicfg;
extern const SPIConfig ls_spicfg;