![]() |
![]() |
|
CC23x0r2DriverLibrary
|
|
Macros | |
| #define | LPCMP_DIVISION_PATH_N SYS0_LPCMPCFG_DIVPATH_NSIDE |
| Apply voltage divider to the negative input. More... | |
| #define | LPCMP_DIVISION_PATH_P SYS0_LPCMPCFG_DIVPATH_PSIDE |
| Apply voltage divider to the positive input. More... | |
| #define | LPCMP_DIVISION_FACTOR_1_1 SYS0_LPCMPCFG_DIV_VAL0 |
| Apply a 1/1 voltage division ratio. More... | |
| #define | LPCMP_DIVISION_FACTOR_3_4 SYS0_LPCMPCFG_DIV_VAL1 |
| Apply a 3/4 voltage division ratio. More... | |
| #define | LPCMP_DIVISION_FACTOR_1_2 SYS0_LPCMPCFG_DIV_VAL2 |
| Apply a 1/2 voltage division ratio. More... | |
| #define | LPCMP_DIVISION_FACTOR_1_3 SYS0_LPCMPCFG_DIV_VAL3 |
| Apply a 1/3 voltage division ratio. More... | |
| #define | LPCMP_DIVISION_FACTOR_1_4 SYS0_LPCMPCFG_DIV_VAL4 |
| Apply a 1/4 voltage division ratio. More... | |
| #define | LPCMP_POLARITY_FALL SYS0_LPCMPCFG_EDGCFG_FALL |
| Select falling edge for event generation. More... | |
| #define | LPCMP_POLARITY_RISE SYS0_LPCMPCFG_EDGCFG_RISE |
| Select rising edge for event generation. More... | |
| #define | LPCMP_NEG_INPUT_VDDD SYS0_LPCMPCFG_NSEL_VDDD |
| Select VDDD as negative input. More... | |
| #define | LPCMP_NEG_INPUT_VDDS SYS0_LPCMPCFG_NSEL_VDDA |
| Select VDDS(VDDA) as negative input. More... | |
| #define | LPCMP_NEG_INPUT_A2 SYS0_LPCMPCFG_NSEL_VA_PAD_A2 |
| Select PAD_A2 as negative input. More... | |
| #define | LPCMP_NEG_INPUT_A3 SYS0_LPCMPCFG_NSEL_VA_PAD_A3 |
| Select PAD_A3 as negative input. More... | |
| #define | LPCMP_NEG_INPUT_OPEN SYS0_LPCMPCFG_NSEL_OPEN |
| Leave negative input floating. More... | |
| #define | LPCMP_POS_INPUT_A1 SYS0_LPCMPCFG_PSEL_VA_PAD_A1 |
| Select PAD_A1 as positive input. More... | |
| #define | LPCMP_POS_INPUT_A2 SYS0_LPCMPCFG_PSEL_VA_PAD_A2 |
| Select PAD_A2 as positive input. More... | |
| #define | LPCMP_POS_INPUT_A3 SYS0_LPCMPCFG_PSEL_VA_PAD_A3 |
| Select PAD_A3 as positive input. More... | |
| #define | LPCMP_POS_INPUT_VDDS SYS0_LPCMPCFG_PSEL_VDDA |
| Selects VDDS(VDDA) as positive input. More... | |
| #define | LPCMP_POS_INPUT_OPEN SYS0_LPCMPCFG_PSEL_OPEN |
| Leave negative positive floating. More... | |
Functions | |
| __STATIC_INLINE void | LPCMPEnable (void) |
| Enables LPCMP. More... | |
| __STATIC_INLINE void | LPCMPDisable (void) |
| Disables LPCMP. More... | |
| __STATIC_INLINE void | LPCMPEnableEvent (void) |
| Enables LPCMP event generation. More... | |
| __STATIC_INLINE void | LPCMPDisableEvent (void) |
| Disables LPCMP event generation. More... | |
| __STATIC_INLINE void | LPCMPClearEvent (void) |
| Clear LPCMP event flag. More... | |
| __STATIC_INLINE void | LPCMPEnableWakeup (void) |
| Enables LPCMP as wakeup source from standby. More... | |
| __STATIC_INLINE void | LPCMPDisableWakeup (void) |
| Disables LPCMP as wakeup source from standby. More... | |
| __STATIC_INLINE void | LPCMPSelectNegativeInput (uint32_t input) |
| Selects the negative input of LPCMP. More... | |
| __STATIC_INLINE bool | LPCMPIsOutputHigh (void) |
| Verifies if the raw output of LPCMP is high. More... | |
| __STATIC_INLINE void | LPCMPSelectPositiveInput (uint32_t input) |
| Selects the positive input of LPCMP. More... | |
| __STATIC_INLINE void | LPCMPSetPolarity (uint32_t polarity) |
| Selects the edge polarity of LPCMP output on which an event is triggered. More... | |
| __STATIC_INLINE void | LPCMPSetDividerRatio (uint32_t divider) |
| Selects the ratio used by LPCMP voltage divider. More... | |
| __STATIC_INLINE void | LPCMPSetDividerPath (uint32_t path) |
| Selects the input path on which the LPCMP voltage divider is applied. More... | |
| #define LPCMP_DIVISION_PATH_N SYS0_LPCMPCFG_DIVPATH_NSIDE |
Apply voltage divider to the negative input.
| #define LPCMP_DIVISION_PATH_P SYS0_LPCMPCFG_DIVPATH_PSIDE |
Apply voltage divider to the positive input.
Referenced by LPCMPSetDividerPath().
| #define LPCMP_DIVISION_FACTOR_1_1 SYS0_LPCMPCFG_DIV_VAL0 |
Apply a 1/1 voltage division ratio.
| #define LPCMP_DIVISION_FACTOR_3_4 SYS0_LPCMPCFG_DIV_VAL1 |
Apply a 3/4 voltage division ratio.
| #define LPCMP_DIVISION_FACTOR_1_2 SYS0_LPCMPCFG_DIV_VAL2 |
Apply a 1/2 voltage division ratio.
| #define LPCMP_DIVISION_FACTOR_1_3 SYS0_LPCMPCFG_DIV_VAL3 |
Apply a 1/3 voltage division ratio.
| #define LPCMP_DIVISION_FACTOR_1_4 SYS0_LPCMPCFG_DIV_VAL4 |
Apply a 1/4 voltage division ratio.
| #define LPCMP_POLARITY_FALL SYS0_LPCMPCFG_EDGCFG_FALL |
Select falling edge for event generation.
Referenced by LPCMPSetPolarity().
| #define LPCMP_POLARITY_RISE SYS0_LPCMPCFG_EDGCFG_RISE |
Select rising edge for event generation.
| #define LPCMP_NEG_INPUT_VDDD SYS0_LPCMPCFG_NSEL_VDDD |
Select VDDD as negative input.
| #define LPCMP_NEG_INPUT_VDDS SYS0_LPCMPCFG_NSEL_VDDA |
Select VDDS(VDDA) as negative input.
| #define LPCMP_NEG_INPUT_A2 SYS0_LPCMPCFG_NSEL_VA_PAD_A2 |
Select PAD_A2 as negative input.
| #define LPCMP_NEG_INPUT_A3 SYS0_LPCMPCFG_NSEL_VA_PAD_A3 |
Select PAD_A3 as negative input.
| #define LPCMP_NEG_INPUT_OPEN SYS0_LPCMPCFG_NSEL_OPEN |
Leave negative input floating.
| #define LPCMP_POS_INPUT_A1 SYS0_LPCMPCFG_PSEL_VA_PAD_A1 |
Select PAD_A1 as positive input.
| #define LPCMP_POS_INPUT_A2 SYS0_LPCMPCFG_PSEL_VA_PAD_A2 |
Select PAD_A2 as positive input.
| #define LPCMP_POS_INPUT_A3 SYS0_LPCMPCFG_PSEL_VA_PAD_A3 |
Select PAD_A3 as positive input.
| #define LPCMP_POS_INPUT_VDDS SYS0_LPCMPCFG_PSEL_VDDA |
Selects VDDS(VDDA) as positive input.
| #define LPCMP_POS_INPUT_OPEN SYS0_LPCMPCFG_PSEL_OPEN |
Leave negative positive floating.
| __STATIC_INLINE void LPCMPEnable | ( | void | ) |
Enables LPCMP.
This function enables LPCMP and it must be called after having configured the peripheral's inputs, voltage divider and event generation logic.
| __STATIC_INLINE void LPCMPDisable | ( | void | ) |
Disables LPCMP.
This function disables LPCMP after it has been enabled using LPCMPEnable().
| __STATIC_INLINE void LPCMPEnableEvent | ( | void | ) |
Enables LPCMP event generation.
This function enables LPCMP event generation to the event fabric. Polarity must be selected using LPCMPSetPolarity() to determine on which edge type of LPCMP output an event should be generated. LPCMP doesn't have a dedicated interrupt line, therefore a configurable interrupt line must be configured to propagate LPCMP events.
| __STATIC_INLINE void LPCMPDisableEvent | ( | void | ) |
Disables LPCMP event generation.
This function disables LPCMP event generation to the event fabric.
| __STATIC_INLINE void LPCMPClearEvent | ( | void | ) |
Clear LPCMP event flag.
This function clears LPCMP event flag and should be called from the ISR registered to service LPCMP interrupts.
| __STATIC_INLINE void LPCMPEnableWakeup | ( | void | ) |
Enables LPCMP as wakeup source from standby.
This function enables LPCMP as one of the sources that can wakeup the device from standby.
| __STATIC_INLINE void LPCMPDisableWakeup | ( | void | ) |
Disables LPCMP as wakeup source from standby.
This function disables LPCMP as one of the sources that can wakeup the device from standby.
| __STATIC_INLINE void LPCMPSelectNegativeInput | ( | uint32_t | input | ) |
Selects the negative input of LPCMP.
This function selects one of the available sources as the negative input of LPCMP. This function must be called before enabling LPCMP using LPCMPEnable().
| input | LPCMP negative input source: |
| __STATIC_INLINE bool LPCMPIsOutputHigh | ( | void | ) |
Verifies if the raw output of LPCMP is high.
This function returns a boolean value indicating whether the raw output of LPCMP is high or low
true : LPCMP raw output is high.false : LPCMP raw output is low. | __STATIC_INLINE void LPCMPSelectPositiveInput | ( | uint32_t | input | ) |
Selects the positive input of LPCMP.
This function selects one of the available sources as the positive input of LPCMP. This function must be called before enabling LPCMP using LPCMPEnable().
| input | LPCMP positive input source: |
| __STATIC_INLINE void LPCMPSetPolarity | ( | uint32_t | polarity | ) |
Selects the edge polarity of LPCMP output on which an event is triggered.
This function selects whether a rising or falling edge of LPCMP output will trigger an event propagated through the event fabric.
| polarity | Edge polarity of LPCMP output on which the event is triggered: |
References LPCMP_POLARITY_FALL.
| __STATIC_INLINE void LPCMPSetDividerRatio | ( | uint32_t | divider | ) |
Selects the ratio used by LPCMP voltage divider.
This function selects the ratio used by LPCMP voltage divider to divide one of the two comparator inputs. Use LPCMPSetDividerPath() to select if the ratio should be applied to the negative or positive input of LPCMP.
| divider | Divider ratio used by LPCMP voltage divider: |
| __STATIC_INLINE void LPCMPSetDividerPath | ( | uint32_t | path | ) |
Selects the input path on which the LPCMP voltage divider is applied.
This function selects the input path on which the LPCMP voltage divider is applied. Use LPCMPSetDividerRatio() to set the division ratio applied by the LPCMP voltage divider on the selected path.
| path | Input path the LPCMP voltage divider is applied to: |
References LPCMP_DIVISION_PATH_P.