This section describes the programming interface of the PDB HAL driver.
|
enum | pdb_status_t {
kStatus_PDB_Success = 0U,
kStatus_PDB_InvalidArgument = 1U,
kStatus_PDB_Failed = 2U
} |
| PDB status return codes. More...
|
|
enum | pdb_load_value_mode_t {
kPdbLoadValueImmediately = 0U,
kPdbLoadValueAtModuloCounter = 1U,
kPdbLoadValueAtNextTrigger = 2U,
kPdbLoadValueAtModuloCounterOrNextTrigger = 3U
} |
| Defines the type of value load mode for the PDB module. More...
|
|
enum | pdb_clk_prescaler_div_t {
kPdbClkPreDivBy1 = 0U,
kPdbClkPreDivBy2 = 1U,
kPdbClkPreDivBy4 = 2U,
kPdbClkPreDivBy8 = 3U,
kPdbClkPreDivBy16 = 4U,
kPdbClkPreDivBy32 = 5U,
kPdbClkPreDivBy64 = 6U,
kPdbClkPreDivBy128 = 7U
} |
| Defines the type of prescaler divider for the PDB counter clock. More...
|
|
enum | pdb_trigger_src_t {
kPdbTrigger0 = 0U,
kPdbTrigger1 = 1U,
kPdbTrigger2 = 2U,
kPdbTrigger3 = 3U,
kPdbTrigger4 = 4U,
kPdbTrigger5 = 5U,
kPdbTrigger6 = 6U,
kPdbTrigger7 = 7U,
kPdbTrigger8 = 8U,
kPdbTrigger9 = 9U,
kPdbTrigger10 = 10U,
kPdbTrigger11 = 11U,
kPdbTrigger12 = 12U,
kPdbTrigger13 = 13U,
kPdbTrigger14 = 14U,
kPdbSoftTrigger = 15U
} |
| Defines the type of trigger source mode for the PDB. More...
|
|
enum | pdb_clk_prescaler_mult_factor_t {
kPdbClkPreMultFactorAs1 = 0U,
kPdbClkPreMultFactorAs10 = 1U,
kPdbClkPreMultFactorAs20 = 2U,
kPdbClkPreMultFactorAs40 = 3U
} |
| Defines the type of the multiplication source mode for PDB. More...
|
|
|
void | PDB_HAL_Init (PDB_Type *base) |
| Resets the PDB registers to a known state. More...
|
|
pdb_status_t | PDB_HAL_ConfigTimer (PDB_Type *base, const pdb_timer_config_t *configPtr) |
| Configures the PDB timer. More...
|
|
static void | PDB_HAL_SetSoftTriggerCmd (PDB_Type *base) |
| Triggers the DAC by software if enabled. More...
|
|
static void | PDB_HAL_Enable (PDB_Type *base) |
| Switches on to enable the PDB module. More...
|
|
static void | PDB_HAL_Disable (PDB_Type *base) |
| Switches to disable the PDB module. More...
|
|
static bool | PDB_HAL_GetTimerIntFlag (PDB_Type *base) |
| Gets the PDB delay interrupt flag. More...
|
|
static void | PDB_HAL_ClearTimerIntFlag (PDB_Type *base) |
| Clears the PDB delay interrupt flag. More...
|
|
static void | PDB_HAL_SetLoadValuesCmd (PDB_Type *base) |
| Loads the delay registers value for the PDB module. More...
|
|
static void | PDB_HAL_SetTimerModulusValue (PDB_Type *base, uint32_t value) |
| Sets the modulus value for the PDB module. More...
|
|
static uint32_t | PDB_HAL_GetTimerValue (PDB_Type *base) |
| Gets the PDB counter value of PDB timer. More...
|
|
static void | PDB_HAL_SetValueForTimerInterrupt (PDB_Type *base, uint32_t value) |
| Sets the interrupt delay milestone of the PDB counter. More...
|
|
void | PDB_HAL_SetAdcPreTriggerBackToBackEnable (PDB_Type *base, uint32_t chn, uint32_t preChnMask, bool enable) |
| Switches to enable the pre-trigger back-to-back mode. More...
|
|
void | PDB_HAL_SetAdcPreTriggerOutputEnable (PDB_Type *base, uint32_t chn, uint32_t preChnMask, bool enable) |
| Switches to enable the pre-trigger output. More...
|
|
void | PDB_HAL_SetAdcPreTriggerEnable (PDB_Type *base, uint32_t chn, uint32_t preChnMask, bool enable) |
| Switches to enable the pre-trigger. More...
|
|
static uint32_t | PDB_HAL_GetAdcPreTriggerFlags (PDB_Type *base, uint32_t chn, uint32_t preChnMask) |
| Gets the flag which indicates whether the PDB counter has reached the pre-trigger delay value. More...
|
|
void | PDB_HAL_ClearAdcPreTriggerFlags (PDB_Type *base, uint32_t chn, uint32_t preChnMask) |
| Clears the flag which indicates that the PDB counter has reached the pre-trigger delay value. More...
|
|
static uint32_t | PDB_HAL_GetAdcPreTriggerSeqErrFlags (PDB_Type *base, uint32_t chn, uint32_t preChnMask) |
| Gets the flag which indicates whether a sequence error is detected. More...
|
|
void | PDB_HAL_ClearAdcPreTriggerSeqErrFlags (PDB_Type *base, uint32_t chn, uint32_t preChnMask) |
| Clears the flag which indicates that a sequence error has been detected. More...
|
|
void | PDB_HAL_SetAdcPreTriggerDelayValue (PDB_Type *base, uint32_t chn, uint32_t preChn, uint32_t value) |
| Sets the pre-trigger delay value. More...
|
|
void | PDB_HAL_SetCmpPulseOutEnable (PDB_Type *base, uint32_t pulseChnMask, bool enable) |
| Switches to enable the pulse-out trigger. More...
|
|
static void | PDB_HAL_SetCmpPulseOutDelayForHigh (PDB_Type *base, uint32_t pulseChn, uint32_t value) |
| Sets the counter delay value for the pulse-out goes high. More...
|
|
static void | PDB_HAL_SetCmpPulseOutDelayForLow (PDB_Type *base, uint32_t pulseChn, uint32_t value) |
| Sets the counter delay value for the pulse-out goes low. More...
|
|
static void PDB_HAL_SetLoadValuesCmd |
( |
PDB_Type * |
base | ) |
|
|
inlinestatic |
This function sets the LDOK bit and loads the delay registers value. Writing one to this bit updates the internal registers MOD, IDLY, CHnDLYm, DACINTx, and POyDLY with the values written to their buffers. The MOD, IDLY, CHnDLYm, DACINTx, and POyDLY take effect according to the load mode settings.
After one is written to the LDOK bit, the values in the buffers of the above mentioned registers are not effective and cannot be written until the values in the buffers are loaded into their internal registers. The LDOK can be written only when the the PDB is enabled or as alone with it. It is automatically cleared either when the values in the buffers are loaded into the internal registers or when the PDB is disabled.
- Parameters
-
base | Register base address for the module. |