From 129429b7c3be3266a5163fa685fdd4a9da8c6d42 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 7 Nov 2021 09:27:46 +0000 Subject: [PATCH] SPIv2 is not the default. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15032 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- os/hal/templates/hal_lld.h | 5 +++++ os/hal/templates/platform.mk | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/os/hal/templates/hal_lld.h b/os/hal/templates/hal_lld.h index 7f6a7d067..cf834e797 100644 --- a/os/hal/templates/hal_lld.h +++ b/os/hal/templates/hal_lld.h @@ -29,6 +29,11 @@ /* Driver constants. */ /*===========================================================================*/ +/** + * @brief Requires use of SPIv2 driver model. + */ +#define HAL_LLD_SELECT_SPI_V2 TRUE + /** * @brief Specifies implementation of dynamic clock management. */ diff --git a/os/hal/templates/platform.mk b/os/hal/templates/platform.mk index 32cf64eeb..1b09c5500 100644 --- a/os/hal/templates/platform.mk +++ b/os/hal/templates/platform.mk @@ -59,7 +59,7 @@ ifneq ($(findstring HAL_USE_SIO TRUE,$(HALCONF)),) PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_sio_lld.c endif ifneq ($(findstring HAL_USE_SPI TRUE,$(HALCONF)),) -PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_spi_lld.c +PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_spi_v2_lld.c endif ifneq ($(findstring HAL_USE_TRNG TRUE,$(HALCONF)),) PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_trng_lld.c @@ -94,7 +94,7 @@ PLATFORMSRC = ${CHIBIOS}/os/hal/templates/hal_lld.c \ ${CHIBIOS}/os/hal/templates/hal_sdc_lld.c \ ${CHIBIOS}/os/hal/templates/hal_serial_lld.c \ ${CHIBIOS}/os/hal/templates/hal_sio_lld.c \ - ${CHIBIOS}/os/hal/templates/hal_spi_lld.c \ + ${CHIBIOS}/os/hal/templates/hal_spi_v2_lld.c \ ${CHIBIOS}/os/hal/templates/hal_st_lld.c \ ${CHIBIOS}/os/hal/templates/hal_trng_lld.c \ ${CHIBIOS}/os/hal/templates/hal_uart_lld.c \