From 2d9c01867f8818c5f8aa507e045f2bf9ef84bf2f Mon Sep 17 00:00:00 2001 From: Guillaume Revaillot Date: Sun, 22 Sep 2019 11:28:33 +0200 Subject: [PATCH] stm32g0: update sysconfig based on latest stm32g0x1 RM add pin clamping diode control, available on g041 and g031 --- include/libopencm3/stm32/g0/syscfg.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/include/libopencm3/stm32/g0/syscfg.h b/include/libopencm3/stm32/g0/syscfg.h index 9093f795..50dd930b 100644 --- a/include/libopencm3/stm32/g0/syscfg.h +++ b/include/libopencm3/stm32/g0/syscfg.h @@ -113,6 +113,30 @@ /** @defgroup syscfg_cfgr2 CFGR2 SYSCFG configuration register 2 @{*/ +/** SYSCFG_CFGR2_PB2_CDEN PB2 clamping diode enable */ +#define SYSCFG_CFGR2_PB2_CDEN (1 << 23) + +/** SYSCFG_CFGR2_PB1_CDEN PB1 clamping diode enable */ +#define SYSCFG_CFGR2_PB1_CDEN (1 << 22) + +/** SYSCFG_CFGR2_PB0_CDEN PB0 clamping diode enable */ +#define SYSCFG_CFGR2_PB0_CDEN (1 << 21) + +/** SYSCFG_CFGR2_PA13_CDEN PA13 clamping diode enable */ +#define SYSCFG_CFGR2_PA13_CDEN (1 << 20) + +/** SYSCFG_CFGR2_PA6_CDEN PA6 clamping diode enable */ +#define SYSCFG_CFGR2_PA6_CDEN (1 << 19) + +/** SYSCFG_CFGR2_PA5_CDEN PA5 clamping diode enable */ +#define SYSCFG_CFGR2_PA5_CDEN (1 << 18) + +/** SYSCFG_CFGR2_PA3_CDEN PA3 clamping diode enable */ +#define SYSCFG_CFGR2_PA3_CDEN (1 << 17) + +/** SYSCFG_CFGR2_PA1_CDEN PA1 clamping diode enable */ +#define SYSCFG_CFGR2_PA1_CDEN (1 << 16) + /** SYSCFG_CFGR2_SRAM_PEF SRAM parity error flag */ #define SYSCFG_CFGR2_SRAM_PEF (1 << 8)