From 75513154d2c3737ea4663eb0bf45c5e549891863 Mon Sep 17 00:00:00 2001 From: Augusto Zanellato Date: Wed, 15 Mar 2023 16:48:39 +0100 Subject: [PATCH] Add hardware CRC support to STM32G4 --- targets/TARGET_STM/TARGET_STM32G4/objects.h | 2 ++ targets/targets.json | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/targets/TARGET_STM/TARGET_STM32G4/objects.h b/targets/TARGET_STM/TARGET_STM32G4/objects.h index 183cf54165..69db11a34e 100644 --- a/targets/TARGET_STM/TARGET_STM32G4/objects.h +++ b/targets/TARGET_STM/TARGET_STM32G4/objects.h @@ -136,6 +136,8 @@ struct qspi_s { //#include "common_objects.h" #include "gpio_object.h" +#define HAL_CRC_IS_SUPPORTED(polynomial, width) ((width) == 7 || (width) == 8 || (width) == 16 || (width) == 32) + #ifdef __cplusplus } #endif diff --git a/targets/targets.json b/targets/targets.json index ec59258f6e..ead71ded90 100644 --- a/targets/targets.json +++ b/targets/targets.json @@ -3018,7 +3018,8 @@ "MPU", "SERIAL_ASYNCH", "TRNG", - "CAN" + "CAN", + "CRC" ] }, "MCU_STM32G431xB": {