aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/STM32F3xx
diff options
context:
space:
mode:
authorRomain Reignier <rom.reignier@gmail.com>2018-03-12 21:18:36 +0100
committerRomain Reignier <rom.reignier@gmail.com>2018-03-12 21:20:46 +0100
commit6c3554ef8152e48e9ef668cfa321f7c7e01f5361 (patch)
tree94ad8aa3db171599f77c7b1369cd47edf005e727 /testhal/STM32/STM32F3xx
parent6ca20973e2889ce228b41c47231a5339d8e95970 (diff)
downloadChibiOS-Contrib-6c3554ef8152e48e9ef668cfa321f7c7e01f5361.tar.gz
ChibiOS-Contrib-6c3554ef8152e48e9ef668cfa321f7c7e01f5361.tar.bz2
ChibiOS-Contrib-6c3554ef8152e48e9ef668cfa321f7c7e01f5361.zip
testhal: stm32: update to latest ChibiOS API
Diffstat (limited to 'testhal/STM32/STM32F3xx')
-rw-r--r--testhal/STM32/STM32F3xx/COMP/Makefile8
-rw-r--r--testhal/STM32/STM32F3xx/COMP/halconf.h40
-rw-r--r--testhal/STM32/STM32F3xx/COMP/mcuconf.h40
-rw-r--r--testhal/STM32/STM32F3xx/EEProm/Makefile6
-rw-r--r--testhal/STM32/STM32F3xx/EEProm/main.c3
5 files changed, 68 insertions, 29 deletions
diff --git a/testhal/STM32/STM32F3xx/COMP/Makefile b/testhal/STM32/STM32F3xx/COMP/Makefile
index 90ada53..e19b2ee 100644
--- a/testhal/STM32/STM32F3xx/COMP/Makefile
+++ b/testhal/STM32/STM32F3xx/COMP/Makefile
@@ -10,7 +10,7 @@ endif
# C specific options here (added to USE_OPT).
ifeq ($(USE_COPT),)
- USE_COPT =
+ USE_COPT =
endif
# C++ specific options here (added to USE_OPT).
@@ -69,7 +69,7 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x400
endif
-# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
+# Enables the use of FPU (no, softfp, hard).
ifeq ($(USE_FPU),)
USE_FPU = no
endif
@@ -99,7 +99,9 @@ include $(CHIBIOS)/os/hal/osal/rt/osal.mk
include $(CHIBIOS)/os/rt/rt.mk
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
# Other files (optional).
-#include $(CHIBIOS)/test/rt/test.mk
+#include $(CHIBIOS)/test/lib/test.mk
+#include $(CHIBIOS)/test/rt/rt_test.mk
+#include $(CHIBIOS)/test/oslib/oslib_test.mk
# Define linker script file here
LDSCRIPT= $(STARTUPLD)/STM32F303xC.ld
diff --git a/testhal/STM32/STM32F3xx/COMP/halconf.h b/testhal/STM32/STM32F3xx/COMP/halconf.h
index 2471ec7..77a7055 100644
--- a/testhal/STM32/STM32F3xx/COMP/halconf.h
+++ b/testhal/STM32/STM32F3xx/COMP/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -52,6 +52,13 @@
#endif
/**
+ * @brief Enables the cryptographic subsystem.
+ */
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
+#endif
+
+/**
* @brief Enables the DAC subsystem.
*/
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
@@ -62,7 +69,7 @@
* @brief Enables the EXT subsystem.
*/
#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT TRUE
+#define HAL_USE_EXT FALSE
#endif
/**
@@ -115,6 +122,13 @@
#endif
/**
+ * @brief Enables the QSPI subsystem.
+ */
+#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
+#define HAL_USE_QSPI FALSE
+#endif
+
+/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
@@ -202,6 +216,28 @@
#endif
/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
/* I2C driver related settings. */
/*===========================================================================*/
diff --git a/testhal/STM32/STM32F3xx/COMP/mcuconf.h b/testhal/STM32/STM32F3xx/COMP/mcuconf.h
index 0d37614..a270b6f 100644
--- a/testhal/STM32/STM32F3xx/COMP/mcuconf.h
+++ b/testhal/STM32/STM32F3xx/COMP/mcuconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -67,6 +67,25 @@
#define STM32_USBPRE STM32_USBPRE_DIV1P5
/*
+ * IRQ system settings.
+ */
+#define STM32_IRQ_EXTI0_PRIORITY 6
+#define STM32_IRQ_EXTI1_PRIORITY 6
+#define STM32_IRQ_EXTI2_PRIORITY 6
+#define STM32_IRQ_EXTI3_PRIORITY 6
+#define STM32_IRQ_EXTI4_PRIORITY 6
+#define STM32_IRQ_EXTI5_9_PRIORITY 6
+#define STM32_IRQ_EXTI10_15_PRIORITY 6
+#define STM32_IRQ_EXTI16_PRIORITY 6
+#define STM32_IRQ_EXTI17_PRIORITY 6
+#define STM32_IRQ_EXTI18_PRIORITY 6
+#define STM32_IRQ_EXTI19_PRIORITY 6
+#define STM32_IRQ_EXTI20_PRIORITY 6
+#define STM32_IRQ_EXTI21_22_29_PRIORITY 6
+#define STM32_IRQ_EXTI30_32_PRIORITY 6
+#define STM32_IRQ_EXTI33_PRIORITY 6
+
+/*
* ADC driver system settings.
*/
#define STM32_ADC_DUAL_MODE FALSE
@@ -111,25 +130,6 @@
#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
/*
- * EXT driver system settings.
- */
-#define STM32_EXT_EXTI0_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI1_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI2_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI3_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI4_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI16_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI17_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI18_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI19_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI20_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI33_IRQ_PRIORITY 6
-
-/*
* GPT driver system settings.
*/
#define STM32_GPT_USE_TIM1 FALSE
diff --git a/testhal/STM32/STM32F3xx/EEProm/Makefile b/testhal/STM32/STM32F3xx/EEProm/Makefile
index 90ada53..bd22f9f 100644
--- a/testhal/STM32/STM32F3xx/EEProm/Makefile
+++ b/testhal/STM32/STM32F3xx/EEProm/Makefile
@@ -10,7 +10,7 @@ endif
# C specific options here (added to USE_OPT).
ifeq ($(USE_COPT),)
- USE_COPT =
+ USE_COPT =
endif
# C++ specific options here (added to USE_OPT).
@@ -69,7 +69,7 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x400
endif
-# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
+# Enables the use of FPU (no, softfp, hard).
ifeq ($(USE_FPU),)
USE_FPU = no
endif
@@ -99,7 +99,7 @@ include $(CHIBIOS)/os/hal/osal/rt/osal.mk
include $(CHIBIOS)/os/rt/rt.mk
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
# Other files (optional).
-#include $(CHIBIOS)/test/rt/test.mk
+#include $(CHIBIOS)/test/rt/rt_test.mk
# Define linker script file here
LDSCRIPT= $(STARTUPLD)/STM32F303xC.ld
diff --git a/testhal/STM32/STM32F3xx/EEProm/main.c b/testhal/STM32/STM32F3xx/EEProm/main.c
index 130a600..4460ef6 100644
--- a/testhal/STM32/STM32F3xx/EEProm/main.c
+++ b/testhal/STM32/STM32F3xx/EEProm/main.c
@@ -24,6 +24,7 @@
#define EEPROM_SPIDCONFIG spi1cfg
static const SPIConfig EEPROM_SPIDCONFIG = {
+ false,
NULL,
GPIOA,
12,
@@ -36,7 +37,7 @@ static SPIEepromFileConfig eeCfg = {
EEPROM_SIZE,
EEPROM_SIZE,
EEPROM_PAGE_SIZE,
- MS2ST(EEPROM_WRITE_TIME_MS),
+ TIME_MS2I(EEPROM_WRITE_TIME_MS),
&EEPROM_SPID,
&EEPROM_SPIDCONFIG,
};