This document consists of sections titled with Driver Overview, Data Structures, Enumerations, Functions, etc., each with an overview list and detailed documentation. It is recommended to read the Driver Overview first for it includes a comprehensive description of the peripheral, driver and driver changes. Other sections give detailed information for APIs, enums, macros, etc., for your further reference.
|
enum | opamp_load_mode_t {
kOPAMP_LoadModeDelayLoad = 0U,
kOPAMP_LoadModeRealTimeLoad = 1U
} |
| Load mode definition. More...
|
|
enum | opamp_power_mode_t {
kOPAMP_PowerModeLowPower = 0U,
kOPAMP_PowerModeHighSpeed = 1U
} |
| Power mode definition. More...
|
|
enum | opamp_rotate_number_t {
kOPAMP_RotateConfigSet0 = 0U,
kOPAMP_RotateConfigSet0_1,
kOPAMP_RotateConfigSet0_2,
kOPAMP_RotateConfigSet0_3
} |
| Rotation number definition. More...
|
|
enum | opamp_work_mode_t {
kOPAMP_WorkModeBufferMode = 0U,
kOPAMP_WorkModeInternalGain2X,
kOPAMP_WorkModeInternalGain4X,
kOPAMP_WorkModeInternalGain8X,
kOPAMP_WorkModeInternalGain16X,
kOPAMP_WorkModeExternalGain = OPAMP_OPAMP_CONFIG_SET0_VNEG_EN_MASK
} |
| OPAMP work mode. More...
|
|
enum | opamp_vneg_t {
kOPAMP_VNEG0 = 0U,
kOPAMP_VNEG1 = 1U,
kOPAMP_VNEG2 = 2U,
kOPAMP_VNEG3 = 3U
} |
| VNEG input selection. More...
|
|
enum | opamp_vpos_t {
kOPAMP_VPOS0 = 0U,
kOPAMP_VPOS1 = 1U,
kOPAMP_VPOS2 = 2U,
kOPAMP_VPOS3 = 3U
} |
| VPOS input selection. More...
|
|
enum | opamp_config_set_index_t {
kOPAMP_ConfigSet0 = 0U,
kOPAMP_ConfigSet1,
kOPAMP_ConfigSet2,
kOPAMP_ConfigSet3
} |
| Configuration set index. More...
|
|
struct opamp_config_set_t |
uint8_t opamp_config_set_t::u8PreviousConfigSetWindow |
bool opamp_config_t::bEnableLoadCompletionInterrupt |
bool opamp_config_t::bEnableWriteProtection |
Enumerator |
---|
kOPAMP_LoadModeDelayLoad |
Or named loop load mode.
Loading happens on every loop configuration completion.
|
kOPAMP_LoadModeRealTimeLoad |
Or named fast load mode.
Loading happens on any configuration completion.
|
Enumerator |
---|
kOPAMP_PowerModeLowPower |
Lower current consumption with slower slew rate and narrower unity gain bandwidth performance.
|
kOPAMP_PowerModeHighSpeed |
Higher current consumption with higher slew rate and wider unity gain bandwidth performance.
|
Enumerator |
---|
kOPAMP_RotateConfigSet0 |
Only configuration set 0 participates in the rotation configuration mechanism.
|
kOPAMP_RotateConfigSet0_1 |
Configuration sets 0 and 1 participate in the rotation configuration mechanism.
|
kOPAMP_RotateConfigSet0_2 |
Configuration sets 0 to 2 participate in the rotation configuration mechanism.
|
kOPAMP_RotateConfigSet0_3 |
Configuration sets 0 to 3 participate in the rotation configuration mechanism.
|
Enumerator |
---|
kOPAMP_WorkModeBufferMode |
Buffer mode.
|
kOPAMP_WorkModeInternalGain2X |
Internal gain 2X mode.
|
kOPAMP_WorkModeInternalGain4X |
Internal gain 4X mode.
|
kOPAMP_WorkModeInternalGain8X |
Internal gain 8X mode.
|
kOPAMP_WorkModeInternalGain16X |
Internal gain 16X mode.
|
kOPAMP_WorkModeExternalGain |
External gain mode.
|
Enumerator |
---|
kOPAMP_VNEG0 |
Select VNEG0.
|
kOPAMP_VNEG1 |
Select VNEG1.
|
kOPAMP_VNEG2 |
Select VNEG2.
|
kOPAMP_VNEG3 |
Select VNEG3.
|
Enumerator |
---|
kOPAMP_VPOS0 |
Select VPOS0.
|
kOPAMP_VPOS1 |
Select VPOS1.
|
kOPAMP_VPOS2 |
Select VPOS2.
|
kOPAMP_VPOS3 |
Select VPOS3.
|
Enumerator |
---|
kOPAMP_ConfigSet0 |
Configuration set 0.
|
kOPAMP_ConfigSet1 |
Configuration set 1.
|
kOPAMP_ConfigSet2 |
Configuration set 2.
|
kOPAMP_ConfigSet3 |
Configuration set 3.
|
void OPAMP_Init |
( |
OPAMP_Type * |
base, |
|
|
const opamp_config_t * |
psConfig |
|
) |
| |
This function enables the OPAMP IP bus clock (optional, controlled by macro FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL), sets the configuration to OPAMP and enables the load.
- Parameters
-
base | OPAMP peripheral base address. |
psConfig | Pointer to configuration structure. |
The default value:
psConfig->bEnableLoadCompletionInterrupt = false;
psConfig->bEnableWriteProtection = false;
psConfig->sConfigSet0.u8PreviousConfigSetWindow = 15;
psConfig->sConfigSet1.u8PreviousConfigSetWindow = 15;
psConfig->sConfigSet2.u8PreviousConfigSetWindow = 15;
psConfig->sConfigSet3.u8PreviousConfigSetWindow = 15;
- Parameters
-
psConfig | Pointer to configuration structure. |
void OPAMP_Deinit |
( |
OPAMP_Type * |
base | ) |
|
This function only disables the OPAMP IP bus clock (optional, controlled by the macro FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL).
- Parameters
-
base | OPAMP peripheral base address. |
This function sets the new configuration, and enables the configuration load. If previous old configuration has not been loaded, this function returns kStatus_Fail. Application could use OPAMP_GetLoadCompletionFlag to check whether the old configuration has been loaded.
After calling this function, the new configuration will be loaed at the time decided by opamp_config_t::eLoadMode.
- Parameters
-
base | OPAMP peripheral base address. |
psConfig | Pointer to the configuration. |
- Return values
-
kStatus_Success | The configuration is set. |
kStatus_Fail | Could not set configuration because old configuration has not been loaded. |
This function only sets the rotation configuration set, application should call OPAMP_EnableConfigLoad to enable the load after set all desired configuration sets.
- Parameters
-
base | OPAMP peripheral base address. |
eIndex | Index of configuration set. |
psConfigSet | Pointer to the configure structure. |
static void OPAMP_EnableConfigLoad |
( |
OPAMP_Type * |
base | ) |
|
|
inlinestatic |
After configuration load enabled, the new set configuration will be loaded at the time determined by load mode. Application could monitor the load completion by OPAMP_GetLoadCompletionFlag or the interrupt. When load finished, the configuration load is disabled automatically.
- Parameters
-
base | OPAMP peripheral base address. |
static bool OPAMP_GetLoadCompletionFlag |
( |
OPAMP_Type * |
base | ) |
|
|
inlinestatic |
- Parameters
-
base | OPAMP peripheral base address. |
- Returns
- Return true if the flag is set, otherwise return false.
static void OPAMP_ClearLoadCompletionFlag |
( |
OPAMP_Type * |
base | ) |
|
|
inlinestatic |
- Parameters
-
base | OPAMP peripheral base address. |
static uint8_t OPAMP_GetCurrentCounterValue |
( |
OPAMP_Type * |
base | ) |
|
|
inlinestatic |
- Parameters
-
base | OPAMP peripheral base address. |
- Returns
- Current counter value.
- Parameters
-
base | OPAMP peripheral base address. |
- Returns
- Index of current working configuration set.