aboutsummaryrefslogtreecommitdiffstats
path: root/testhal
diff options
context:
space:
mode:
Diffstat (limited to 'testhal')
-rw-r--r--testhal/STM32/STM32F1xx/SPI/main.c2
-rw-r--r--testhal/STM32/STM32F37x/SPI/main.c2
-rw-r--r--testhal/STM32/STM32F3xx/CAN/mcuconf.h2
-rw-r--r--testhal/STM32/STM32F4xx/DMA_STORM/main.c1
-rw-r--r--testhal/STM32/STM32F7xx/SPI/main.c2
-rw-r--r--testhal/STM32/STM32L0xx/SPI/main.c2
-rw-r--r--testhal/STM32/STM32L1xx/SPI/main.c2
-rw-r--r--testhal/STM32/multi/SPI/cfg-stm32f091_nucleo64/portab.c16
-rw-r--r--testhal/STM32/multi/SPI/cfg-stm32f091_nucleo64/portab.h3
-rw-r--r--testhal/STM32/multi/SPI/cfg-stm32f303_discovery/portab.c16
-rw-r--r--testhal/STM32/multi/SPI/cfg-stm32f303_discovery/portab.h8
-rw-r--r--testhal/STM32/multi/SPI/cfg-stm32f407_discovery/portab.c16
-rw-r--r--testhal/STM32/multi/SPI/cfg-stm32f407_discovery/portab.h8
-rw-r--r--testhal/STM32/multi/SPI/cfg-stm32h743_nucleo144/portab.h1
14 files changed, 76 insertions, 5 deletions
diff --git a/testhal/STM32/STM32F1xx/SPI/main.c b/testhal/STM32/STM32F1xx/SPI/main.c
index 1c510fef0..691c83b51 100644
--- a/testhal/STM32/STM32F1xx/SPI/main.c
+++ b/testhal/STM32/STM32F1xx/SPI/main.c
@@ -21,6 +21,7 @@
* Maximum speed SPI configuration (18MHz, CPHA=0, CPOL=0, MSb first).
*/
static const SPIConfig hs_spicfg = {
+ false,
NULL,
GPIOA,
GPIOA_SPI1NSS,
@@ -32,6 +33,7 @@ static const SPIConfig hs_spicfg = {
* Low speed SPI configuration (281.250kHz, CPHA=0, CPOL=0, MSb first).
*/
static const SPIConfig ls_spicfg = {
+ false,
NULL,
GPIOA,
GPIOA_SPI1NSS,
diff --git a/testhal/STM32/STM32F37x/SPI/main.c b/testhal/STM32/STM32F37x/SPI/main.c
index 2d6409abf..48970f6f2 100644
--- a/testhal/STM32/STM32F37x/SPI/main.c
+++ b/testhal/STM32/STM32F37x/SPI/main.c
@@ -21,6 +21,7 @@
* Maximum speed SPI configuration (18MHz, CPHA=0, CPOL=0, MSb first).
*/
static const SPIConfig hs_spicfg = {
+ false,
NULL,
GPIOB,
10,
@@ -32,6 +33,7 @@ static const SPIConfig hs_spicfg = {
* Low speed SPI configuration (140.625kHz, CPHA=0, CPOL=0, MSb first).
*/
static const SPIConfig ls_spicfg = {
+ false,
NULL,
GPIOB,
10,
diff --git a/testhal/STM32/STM32F3xx/CAN/mcuconf.h b/testhal/STM32/STM32F3xx/CAN/mcuconf.h
index 3da290a6d..0c8b738d7 100644
--- a/testhal/STM32/STM32F3xx/CAN/mcuconf.h
+++ b/testhal/STM32/STM32F3xx/CAN/mcuconf.h
@@ -115,7 +115,7 @@
/*
* CAN driver system settings.
*/
-#define STM32_CAN_USE_CAN1 FALSE
+#define STM32_CAN_USE_CAN1 TRUE
#define STM32_CAN_CAN1_IRQ_PRIORITY 11
/*
diff --git a/testhal/STM32/STM32F4xx/DMA_STORM/main.c b/testhal/STM32/STM32F4xx/DMA_STORM/main.c
index 67ec7fb3e..13fc7ef63 100644
--- a/testhal/STM32/STM32F4xx/DMA_STORM/main.c
+++ b/testhal/STM32/STM32F4xx/DMA_STORM/main.c
@@ -86,6 +86,7 @@ static const ADCConversionGroup adcgrpcfg2 = {
* Maximum speed SPI configuration (21MHz, CPHA=0, CPOL=0, MSb first).
*/
static const SPIConfig hs_spicfg = {
+ false,
NULL,
GPIOB,
12,
diff --git a/testhal/STM32/STM32F7xx/SPI/main.c b/testhal/STM32/STM32F7xx/SPI/main.c
index 411020808..90001f1c2 100644
--- a/testhal/STM32/STM32F7xx/SPI/main.c
+++ b/testhal/STM32/STM32F7xx/SPI/main.c
@@ -29,6 +29,7 @@
* Maximum speed SPI configuration (27MHz, CPHA=0, CPOL=0, MSb first).
*/
static const SPIConfig hs_spicfg = {
+ false,
NULL,
GPIOB,
GPIOB_ARD_D15,
@@ -40,6 +41,7 @@ static const SPIConfig hs_spicfg = {
* Low speed SPI configuration (421.875kHz, CPHA=0, CPOL=0, MSb first).
*/
static const SPIConfig ls_spicfg = {
+ false,
NULL,
GPIOB,
GPIOB_ARD_D14,
diff --git a/testhal/STM32/STM32L0xx/SPI/main.c b/testhal/STM32/STM32L0xx/SPI/main.c
index 6c5de1173..7cacee323 100644
--- a/testhal/STM32/STM32L0xx/SPI/main.c
+++ b/testhal/STM32/STM32L0xx/SPI/main.c
@@ -21,6 +21,7 @@
* Maximum speed SPI configuration (16MHz, CPHA=0, CPOL=0, MSb first).
*/
static const SPIConfig hs_spicfg = {
+ false,
NULL,
GPIOB,
12,
@@ -32,6 +33,7 @@ static const SPIConfig hs_spicfg = {
* Low speed SPI configuration (250kHz, CPHA=0, CPOL=0, MSb first).
*/
static const SPIConfig ls_spicfg = {
+ false,
NULL,
GPIOB,
12,
diff --git a/testhal/STM32/STM32L1xx/SPI/main.c b/testhal/STM32/STM32L1xx/SPI/main.c
index f70d4f7c8..cac88f4f6 100644
--- a/testhal/STM32/STM32L1xx/SPI/main.c
+++ b/testhal/STM32/STM32L1xx/SPI/main.c
@@ -21,6 +21,7 @@
* Maximum speed SPI configuration (16MHz, CPHA=0, CPOL=0, MSb first).
*/
static const SPIConfig hs_spicfg = {
+ false,
NULL,
GPIOB,
12,
@@ -32,6 +33,7 @@ static const SPIConfig hs_spicfg = {
* Low speed SPI configuration (256kHz, CPHA=0, CPOL=0, MSb first).
*/
static const SPIConfig ls_spicfg = {
+ false,
NULL,
GPIOB,
12,
diff --git a/testhal/STM32/multi/SPI/cfg-stm32f091_nucleo64/portab.c b/testhal/STM32/multi/SPI/cfg-stm32f091_nucleo64/portab.c
index 8c5f7426e..7b2b98439 100644
--- a/testhal/STM32/multi/SPI/cfg-stm32f091_nucleo64/portab.c
+++ b/testhal/STM32/multi/SPI/cfg-stm32f091_nucleo64/portab.c
@@ -34,10 +34,25 @@
/* Module exported variables. */
/*===========================================================================*/
+void spi_circular_cb(SPIDriver *spip);
+
+/*
+ * Circular SPI configuration (18MHz, CPHA=0, CPOL=0, MSb first).
+ */
+const SPIConfig c_spicfg = {
+ true,
+ spi_circular_cb,
+ GPIOB,
+ 12,
+ 0,
+ SPI_CR2_DS_2 | SPI_CR2_DS_1 | SPI_CR2_DS_0
+};
+
/*
* Maximum speed SPI configuration (18MHz, 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 (140.625kHz, CPHA=0, CPOL=0, MSb first).
*/
const SPIConfig ls_spicfg = {
+ false,
NULL,
GPIOB,
12,
diff --git a/testhal/STM32/multi/SPI/cfg-stm32f091_nucleo64/portab.h b/testhal/STM32/multi/SPI/cfg-stm32f091_nucleo64/portab.h
index 3283d07a9..fee7874b7 100644
--- a/testhal/STM32/multi/SPI/cfg-stm32f091_nucleo64/portab.h
+++ b/testhal/STM32/multi/SPI/cfg-stm32f091_nucleo64/portab.h
@@ -33,6 +33,8 @@
//#define PORTAB_LINE_LED2
#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 +58,7 @@
/* External declarations. */
/*===========================================================================*/
+extern const SPIConfig c_spicfg;
extern const SPIConfig hs_spicfg;
extern const SPIConfig ls_spicfg;
diff --git a/testhal/STM32/multi/SPI/cfg-stm32f303_discovery/portab.c b/testhal/STM32/multi/SPI/cfg-stm32f303_discovery/portab.c
index 0cc734175..e5a3687bc 100644
--- a/testhal/STM32/multi/SPI/cfg-stm32f303_discovery/portab.c
+++ b/testhal/STM32/multi/SPI/cfg-stm32f303_discovery/portab.c
@@ -33,10 +33,25 @@
/* Module exported variables. */
/*===========================================================================*/
+void spi_circular_cb(SPIDriver *spip);
+
+/*
+ * Circular SPI configuration (18MHz, CPHA=0, CPOL=0, MSb first).
+ */
+const SPIConfig c_spicfg = {
+ true,
+ spi_circular_cb,
+ GPIOB,
+ 12,
+ 0,
+ SPI_CR2_DS_2 | SPI_CR2_DS_1 | SPI_CR2_DS_0
+};
+
/*
* Maximum speed SPI configuration (18MHz, CPHA=0, CPOL=0, MSb first).
*/
const SPIConfig hs_spicfg = {
+ false,
NULL,
GPIOB,
12,
@@ -48,6 +63,7 @@ const SPIConfig hs_spicfg = {
* Low speed SPI configuration (140.625kHz, CPHA=0, CPOL=0, MSb first).
*/
const SPIConfig ls_spicfg = {
+ false,
NULL,
GPIOB,
12,
diff --git a/testhal/STM32/multi/SPI/cfg-stm32f303_discovery/portab.h b/testhal/STM32/multi/SPI/cfg-stm32f303_discovery/portab.h
index 4840cf265..01344c9d8 100644
--- a/testhal/STM32/multi/SPI/cfg-stm32f303_discovery/portab.h
+++ b/testhal/STM32/multi/SPI/cfg-stm32f303_discovery/portab.h
@@ -29,11 +29,14 @@
/* Module constants. */
/*===========================================================================*/
-#define PORTAB_LINE_LED1 LINE_LED10_RED
-//#define PORTAB_LINE_LED2 LINE_LED3_RED
+#define PORTAB_LINE_LED1 LINE_LED4_BLUE
+#define PORTAB_LINE_LED2 LINE_LED3_RED
#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 SPID1
/*===========================================================================*/
@@ -56,6 +59,7 @@
/* External declarations. */
/*===========================================================================*/
+extern const SPIConfig c_spicfg;
extern const SPIConfig hs_spicfg;
extern const SPIConfig ls_spicfg;
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;
diff --git a/testhal/STM32/multi/SPI/cfg-stm32h743_nucleo144/portab.h b/testhal/STM32/multi/SPI/cfg-stm32h743_nucleo144/portab.h
index b36241ad9..b60b8584e 100644
--- a/testhal/STM32/multi/SPI/cfg-stm32h743_nucleo144/portab.h
+++ b/testhal/STM32/multi/SPI/cfg-stm32h743_nucleo144/portab.h
@@ -35,6 +35,7 @@
#define PORTAB_LED_ON PAL_HIGH
#define PORTAB_LINE_BUTTON LINE_BUTTON
#define PORTAB_BUTTON_PRESSED PAL_HIGH
+
#define PORTAB_SPI1 SPID1
/*===========================================================================*/