This section describes the programming interface of the VREF HAL driver.
struct vref_user_config_t |
VREF status return codes
Enumerator |
---|
kStatus_VREF_Success |
Success.
|
kStatus_VREF_InvalidArgument |
Invalid argument existed.
|
kStatus_VREF_Failed |
Execution failed.
|
Enumerator |
---|
kVrefModeBandgapOnly |
Bandgap on only.
For stabilization and startup
|
kVrefModeTightRegulationBuffer |
Tight regulation buffer enabled.
|
void VREF_HAL_Init |
( |
VREF_Type * |
base | ) |
|
- Parameters
-
base | VREF module base number. |
- Parameters
-
base | VREF module base number. |
userConfigPtr | Pointer to the initialization structure. See the "vref_user_config_t". |
static void VREF_HAL_Enable |
( |
VREF_Type * |
base | ) |
|
|
inlinestatic |
- Parameters
-
base | VREF module base number. |
static void VREF_HAL_Disable |
( |
VREF_Type * |
base | ) |
|
|
inlinestatic |
- Parameters
-
base | VREF module base number. |
static void VREF_HAL_SetInternalRegulatorCmd |
( |
VREF_Type * |
base, |
|
|
bool |
enable |
|
) |
| |
|
inlinestatic |
Cannot be enabled in very low-power modes!
- Parameters
-
base | VREF module base number. |
enable | Enables or disables internal regulator
- true : Internal regulator enable
- false: Internal regulator disable
|
static void VREF_HAL_SetTrimVal |
( |
VREF_Type * |
base, |
|
|
uint8_t |
trimValue |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | VREF module base number. |
trimValue | Value of trim register to set output reference voltage (max 0x3F (6-bit)). |
static uint8_t VREF_HAL_GetTrimVal |
( |
VREF_Type * |
base | ) |
|
|
inlinestatic |
- Parameters
-
base | VREF module base number. |
- Returns
- Six-bit value of trim setting.
static void VREF_HAL_WaitVoltageStable |
( |
VREF_Type * |
base | ) |
|
|
inlinestatic |
- Parameters
-
base | VREF module base number. |
- Parameters
-
base | VREF module base number. |
mode | Defines mode to be set.
- kVrefModeBandgapOnly : Set Bandgap on only
- kVrefModeHighPowerBuffer : Set High power buffer mode
- kVrefModeLowPowerBuffer : Set Low power buffer mode
- kVrefModeTightRegulationBuffer: Set Tight regulation buffer mode
|