This repository has been archived on 2024-05-28. You can view files and clone it, but cannot push or open issues or pull requests.
stm32u5_cargo/stm32u5/includes/u575xx/reg_sec_comp_gen.h
2023-11-14 16:25:09 -05:00

44 lines
2.0 KiB
C
Executable File

#include <stdint.h>
typedef struct {
uint32_t comp1_en : 1; // 0 Comparator 1 enable bit
uint32_t reserve0 : 3; // 1 Reserve
uint32_t comp1_inmsel: 4; // 4 Comparator 1 Input Minus connection configuration bit
uint32_t comp1_inpsel: 2; // 8 Comparator1 input plus selection bit
uint32_t reserve1 : 1; // 10 Reserve
uint32_t comp1_winmode: 1; // 11 COMP1_WINMODE
uint32_t reserve2 : 2; // 12 Reserve
uint32_t comp1_winout: 1; // 14 COMP1_WINOUT
uint32_t comp1_polarity: 1; // 15 Comparator 1 polarity selection bit
uint32_t comp1_hyst: 2; // 16 Comparator 1 hysteresis selection bits
uint32_t comp1_pwrmode: 2; // 18 COMP1_PWRMODE
uint32_t comp1_blanksel: 5; // 20 COMP1_BLANKSEL
uint32_t reserve3 : 5; // 25 Reserve
uint32_t comp1_value: 1; // 30 Comparator 1 output status bit
uint32_t comp1_lock: 1; // 31 COMP1_CSR register lock bit
} reg_sec_comp_comp1_csr_t;
typedef struct {
uint32_t com2_en : 1; // 0 Comparator 2 enable bit
uint32_t reserve0 : 3; // 1 Reserve
uint32_t com2_inmsel: 4; // 4 Comparator 2 Input Minus connection configuration bit
uint32_t com2_inpsel: 2; // 8 Comparator 2 input plus selection bit
uint32_t reserve1 : 1; // 10 Reserve
uint32_t com2_winmode: 1; // 11 COM2_WINMODE
uint32_t reserve2 : 2; // 12 Reserve
uint32_t com2_winout: 1; // 14 COM2_WINOUT
uint32_t com2_polarity: 1; // 15 Comparator 2 polarity selection bit
uint32_t com2_hyst : 2; // 16 Comparator 2 hysteresis selection bits
uint32_t com2_pwrmode: 2; // 18 COM2_PWRMODE
uint32_t com2_blanksel: 5; // 20 COM2_BLANKSEL
uint32_t reserve3 : 5; // 25 Reserve
uint32_t com2_value: 1; // 30 Comparator 2 output status bit
uint32_t com2_lock : 1; // 31 COMP2_CSR register lock bit
} reg_sec_comp_comp2_csr_t;
typedef struct {
volatile reg_sec_comp_comp1_csr_t comp1_csr;
volatile reg_sec_comp_comp2_csr_t comp2_csr;
} reg_sec_comp_t;