37 #if defined( CSEN_COUNT ) && ( CSEN_COUNT > 0 )
397 #define CSEN_INIT_DEFAULT \
404 csenPCPrescaleDiv1, \
406 csenInputSelAPORT1CH0TO7, \
407 csenInputSelAPORT1CH8TO15, \
408 csenInputSelAPORT1CH16TO23, \
409 csenInputSelAPORT1CH24TO31, \
410 csenInputSelAPORT3CH0TO7, \
411 csenInputSelAPORT3CH8TO15, \
412 csenInputSelAPORT3CH16TO23, \
413 csenInputSelAPORT3CH24TO31, \
499 #define CSEN_INITMODE_DEFAULT \
501 csenSampleModeSingle, \
507 csenCmpModeDisabled, \
509 csenSingleSelDefault, \
520 csenResetPhaseSel0, \
720 return csen->
IF & ien;
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1YCH11
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3XCH6
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1XCH14
CSEN_ResetPhaseSel_TypeDef
#define _CSEN_DMCFG_CRMODE_DM12
CSEN_InputSel_TypeDef input0To7
#define _CSEN_DMCFG_CRMODE_DM16
#define _CSEN_PRSSEL_PRSSEL_PRSCH3
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3XCH8
#define _CSEN_CTRL_STM_PRS
#define _CSEN_EMACTRL_EMASAMPLE_W2
#define _CSEN_EMACTRL_EMASAMPLE_W32
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1YCH15
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3YCH21
#define _CSEN_CTRL_SARCR_CLK10
__STATIC_INLINE void CSEN_Start(CSEN_TypeDef *csen)
Start scan sequence and/or single conversion.
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3XCH12
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1YCH17
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3XCH18
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1YCH9
__STATIC_INLINE uint32_t CSEN_DataGet(CSEN_TypeDef *csen)
Get last conversion result.
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1YCH21
#define _CSEN_TIMCTRL_PCPRESC_DIV1
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3XCH26
CSEN_GainSel_TypeDef gainSel
RAM and peripheral bit-field set and clear API.
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1XCH30
#define _CSEN_TIMCTRL_PCPRESC_DIV16
#define _CSEN_SINGLECTRL_SINGLESEL_DEFAULT
#define CSEN_CTRL_CHOPEN_ENABLE
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3XCH14
#define _CSEN_PRSSEL_PRSSEL_PRSCH0
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3YCH27
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3YCH23
#define _CSEN_PRSSEL_PRSSEL_PRSCH1
CSEN_ConvSel_TypeDef convSel
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3XCH24
CSEN_SingleSel_TypeDef singleSel
CSEN_ResetPhaseSel_TypeDef resetPhase
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.
#define _CSEN_PRSSEL_PRSSEL_PRSCH6
#define _CSEN_EMACTRL_EMASAMPLE_W16
__STATIC_INLINE void CSEN_IntDisable(CSEN_TypeDef *csen, uint32_t flags)
Disable one or more CSEN interrupts.
#define _CSEN_TIMCTRL_PCPRESC_DIV64
#define CSEN_CTRL_CM_SCAN
#define _CSEN_EMACTRL_EMASAMPLE_W64
#define _CSEN_TIMCTRL_PCPRESC_DIV2
CSEN_CmpMode_TypeDef cmpMode
#define CSEN_CTRL_CMPPOL_GT
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1YCH29
#define _CSEN_CTRL_ACU_ACC16
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1XCH18
#define _CSEN_SCANINPUTSEL0_INPUT0TO7SEL_APORT3CH8TO15
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1XCH10
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3YCH7
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3YCH15
CSEN_SARRes_TypeDef sarRes
#define CSEN_CTRL_CMPPOL_LTE
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1XCH12
__STATIC_INLINE bool CSEN_IsBusy(CSEN_TypeDef *csen)
Return CSEN conversion busy status.
CSEN_TrigSel_TypeDef trigSel
#define _CSEN_TIMCTRL_PCPRESC_DIV128
void CSEN_Init(CSEN_TypeDef *csen, const CSEN_Init_TypeDef *init)
Initialize CSEN.
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1YCH19
#define _CSEN_SCANINPUTSEL0_INPUT0TO7SEL_APORT1CH16TO23
#define _CSEN_SCANINPUTSEL0_INPUT0TO7SEL_APORT3CH24TO31
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3XCH28
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3YCH19
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1XCH2
#define _CSEN_CTRL_ACU_ACC64
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1YCH13
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3XCH20
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3YCH31
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1YCH25
#define _CSEN_SCANINPUTSEL0_INPUT0TO7SEL_DEFAULT
__STATIC_INLINE void CSEN_Enable(CSEN_TypeDef *csen)
Enables the CSEN.
CSEN_EMASample_TypeDef emaSample
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3YCH17
#define _CSEN_DMCFG_CRMODE_DM10
#define _CSEN_CTRL_ACU_ACC1
__STATIC_INLINE uint32_t CSEN_EMAGet(CSEN_TypeDef *csen)
Get last exponential moving average.
#define _CSEN_SCANINPUTSEL0_INPUT0TO7SEL_APORT3CH16TO23
#define _CSEN_PRSSEL_PRSSEL_PRSCH5
#define CSEN_CTRL_EMACMPEN
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1YCH27
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3YCH29
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1YCH5
#define _CSEN_EMA_EMA_MASK
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3XCH16
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1XCH0
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3YCH9
#define _CSEN_CTRL_SARCR_CLK16
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1XCH22
#define _CSEN_PRSSEL_PRSSEL_PRSCH2
CSEN_PCPrescale_TypeDef pcPrescale
#define _CSEN_CTRL_ACU_ACC8
#define _CSEN_CTRL_SARCR_CLK14
#define _CSEN_CTRL_EN_SHIFT
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3YCH11
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1XCH8
#define _CSEN_SCANINPUTSEL0_INPUT0TO7SEL_APORT1CH8TO15
#define _CSEN_EMACTRL_EMASAMPLE_W8
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3YCH5
void CSEN_DMBaselineSet(CSEN_TypeDef *csen, uint32_t up, uint32_t down)
Set the DM integrator initial value.
__STATIC_INLINE void CSEN_IntEnable(CSEN_TypeDef *csen, uint32_t flags)
Enable one or more CSEN interrupts.
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3XCH4
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1XCH24
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1XCH16
__STATIC_INLINE void CSEN_IntClear(CSEN_TypeDef *csen, uint32_t flags)
Clear one or more pending CSEN interrupts.
#define _CSEN_SCANINPUTSEL0_INPUT0TO7SEL_APORT1CH24TO31
__STATIC_INLINE uint32_t CSEN_IntGetEnabled(CSEN_TypeDef *csen)
Get enabled and pending CSEN interrupt flags. Useful for handling more interrupt sources in the same ...
#define _CSEN_CTRL_STM_TIMER
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3YCH1
__STATIC_INLINE void CSEN_IntSet(CSEN_TypeDef *csen, uint32_t flags)
Set one or more pending CSEN interrupts from SW.
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3YCH3
CSEN_PRSSel_TypeDef prsSel
#define _CSEN_CTRL_SARCR_CLK12
#define _CSEN_SCANINPUTSEL0_INPUT0TO7SEL_APORT1CH0TO7
#define CSEN_CTRL_CONVSEL_DM
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1XCH6
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3YCH25
#define _CSEN_EMACTRL_EMASAMPLE_W1
#define _CSEN_PRSSEL_PRSSEL_PRSCH10
#define _CSEN_CTRL_STM_START
void CSEN_Reset(CSEN_TypeDef *csen)
Reset CSEN to same state as after a HW reset.
CSEN_AccMode_TypeDef accMode
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1YCH23
#define _CSEN_PRSSEL_PRSSEL_PRSCH4
#define _CSEN_PRSSEL_PRSSEL_PRSCH11
#define _CSEN_EMACTRL_EMASAMPLE_W4
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1XCH26
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1XCH28
__STATIC_INLINE uint32_t CSEN_IntGet(CSEN_TypeDef *csen)
Get pending CSEN interrupt flags.
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1YCH31
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1YCH7
CSEN_SampleMode_TypeDef sampleMode
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1YCH1
#define CSEN_CTRL_CONVSEL_SAR
#define _CSEN_SCANINPUTSEL0_INPUT0TO7SEL_APORT3CH0TO7
#define _CSEN_TIMCTRL_PCPRESC_DIV32
#define _CSEN_PRSSEL_PRSSEL_PRSCH9
#define _CSEN_DMCFG_CRMODE_DM14
__STATIC_INLINE void BUS_RegBitWrite(volatile uint32_t *addr, unsigned int bit, unsigned int val)
Perform a single-bit write operation on a peripheral register.
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3XCH22
__STATIC_INLINE void CSEN_EMASet(CSEN_TypeDef *csen, uint32_t ema)
Set exponential moving average initial value.
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3XCH10
#define CSEN_CTRL_CM_CONTSCAN
void CSEN_InitMode(CSEN_TypeDef *csen, const CSEN_InitMode_TypeDef *init)
Initialize a CSEN measurement mode.
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1XCH4
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3YCH13
__STATIC_INLINE void CSEN_Disable(CSEN_TypeDef *csen)
Disables the CSEN.
#define _CSEN_PRSSEL_PRSSEL_PRSCH8
#define _CSEN_CTRL_ACU_ACC4
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1XCH20
#define _CSEN_CTRL_ACU_ACC32
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3XCH30
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3XCH2
#define _CSEN_CTRL_ACU_ACC2
#define _CSEN_PRSSEL_PRSSEL_PRSCH7
#define _CSEN_SINGLECTRL_SINGLESEL_APORT3XCH0
CSEN_DriveSel_TypeDef driveSel
#define _CSEN_TIMCTRL_PCPRESC_DIV4
#define CSEN_CTRL_MCEN_ENABLE
#define _CSEN_STATUS_CSENBUSY_MASK
#define CSEN_CTRL_CM_CONTSGL
#define _CSEN_SINGLECTRL_SINGLESEL_APORT1YCH3
#define _CSEN_TIMCTRL_PCPRESC_DIV8