OPMAP driver APIs. More...
Data Structures | |
| union | opamp_cfg_preset0 |
| opamp configuration preset0 More... | |
| union | opamp_cfg_preset1 |
| opamp configuration preset1 More... | |
| struct | opamp_cfg |
Macros | |
| #define | OPAMP_MODE_FOLLOW_KEY (0x06) |
| #define | OPAMP_MODE_INVERT_INDEX0_KEY (0x08) |
| #define | OPAMP_MODE_INVERT_INDEX1_KEY (0x18) |
| #define | OPAMP_MODE_NON_INVERT_INDEX0_KEY (0x01) |
| #define | OPAMP_MODE_NON_INVERT_INDEX1_KEY (0x09) |
| #define | OPAMP_MODE_NON_INVERT_INDEX2_KEY (0x11) |
| #define | OPAMP_MODE_NON_INVERT_INDEX3_KEY (0x19) |
| #define | OPAMP_MODE_NON_INVERT_INDEX4_KEY (0x09) |
| #define | OPAMP_MODE_USER_DEFINE_KEY (0x04) |
Typedefs | |
| typedef union opamp_cfg_preset0 | opamp_ctrl_cfg_preset0_t |
| opamp configuration preset0 More... | |
| typedef union opamp_cfg_preset1 | opamp_ctrl_cfg_preset1_t |
| opamp configuration preset1 More... | |
| typedef struct opamp_cfg | opamp_cfg_t |
Functions | |
| hpm_stat_t | opamp_init (OPAMP_Type *opamp, opamp_cfg_t *cfg) |
| opamp initialisation functions Use this function to initialise the op-amp to different modes More... | |
| static void | opamp_enable (OPAMP_Type *opamp) |
| enable opamp function More... | |
| static void | opamp_preset_opamp_enable (OPAMP_Type *opamp, uint8_t preset_chn) |
| preset enable opamp function More... | |
| static void | opamp_disable (OPAMP_Type *opamp) |
| disable opamp function More... | |
| static void | opamp_preset_opamp_disable (OPAMP_Type *opamp, uint8_t preset_chn) |
| preset disable opamp function More... | |
| static void | opamp_miller_cap_select (OPAMP_Type *opamp, opamp_miller_cap_t select) |
| opamp miller cap selection More... | |
| static void | opamp_preset_miller_cap_select (OPAMP_Type *opamp, uint8_t preset_chn, opamp_miller_cap_t select) |
| opamp miller cap selection preset More... | |
| static void | opamp_phase_margin_cap_enable (OPAMP_Type *opamp) |
| enable phase margin compensation cap More... | |
| static void | opamp_preset_phase_margin_cap_enable (OPAMP_Type *opamp, uint8_t preset_chn) |
| enable phase margin compensation cap preset More... | |
| static void | opamp_phase_margin_cap_disable (OPAMP_Type *opamp) |
| disable phase margin compensation cap More... | |
| static void | opamp_preset_phase_margin_cap_disable (OPAMP_Type *opamp, uint8_t preset_chn) |
| disable phase margin compensation cap preset More... | |
| static void | opamp_inn_pad_select (OPAMP_Type *opamp, opamp_inm_pad_t select) |
| opamp core inm connect pad More... | |
| static void | opamp_preset_inn_pad_select (OPAMP_Type *opamp, uint8_t preset_chn, opamp_inm_pad_t select) |
| opamp core inm connect pad preset More... | |
| static void | opamp_gain_select (OPAMP_Type *opamp, opamp_gain_t select) |
| main string resistor selection More... | |
| static void | opamp_preset_gain_select (OPAMP_Type *opamp, uint8_t preset_chn, opamp_gain_t select) |
| main string resistor selection preset More... | |
| static void | opamp_disconnect_vssa (OPAMP_Type *opamp) |
| disconnect the main series resistor and VSSA More... | |
| static void | opamp_preset_disconnect_vssa (OPAMP_Type *opamp, uint8_t preset_chn) |
| disconnect the main series resistor and VSSA preset More... | |
| static void | opamp_connect_vssa (OPAMP_Type *opamp) |
| connect the main series resistor and VSSA More... | |
| static void | opamp_preset_connect_vssa (OPAMP_Type *opamp, uint8_t preset_chn) |
| connect the main series resistor and VSSA preset More... | |
| static void | opamp_inp_pad_select (OPAMP_Type *opamp, opamp_inp_pad_t select) |
| opamp inp select More... | |
| static void | opamp_preset_inp_pad_select (OPAMP_Type *opamp, uint8_t preset_chn, opamp_inp_pad_t select) |
| opamp inp select preset More... | |
| static uint8_t | opamp_get_cur_preset (OPAMP_Type *opamp) |
| opamp get current preset More... | |
| static bool | opamp_get_is_preset (OPAMP_Type *opamp) |
| get the current preset value More... | |
| static uint8_t | opamp_get_trig_conflict_status (OPAMP_Type *opamp) |
| Get the trigger conflict status. More... | |
| static void | opamp_clear_conflict_status (OPAMP_Type *opamp) |
| Clear the trigger conflict status. More... | |
| static void | opamp_set_sw_preset_val (OPAMP_Type *opamp, opamp_cfg_preset_chn_t val) |
| Set opamp preset value. More... | |
| static void | opamp_enable_sw_preset (OPAMP_Type *opamp) |
| Enable software preset. More... | |
| static void | opamp_disable_sw_preset (OPAMP_Type *opamp) |
| Disable software preset. More... | |
| static void | opamp_set_preset_x_chn (OPAMP_Type *opamp, uint8_t preset_chn, uint8_t chn) |
| Set preset x channel value. More... | |
| hpm_stat_t | opamp_set_preset_cfg (OPAMP_Type *opamp, uint8_t preset_chn, opamp_cfg_t *cfg) |
| Set preset cfg. More... | |
| static void | opamp_preset_enable_hw_trig (OPAMP_Type *opamp, uint8_t preset_chn) |
| opamp enable preset hardware trig More... | |
| static void | opamp_preset_disable_hw_trig (OPAMP_Type *opamp, uint8_t preset_chn) |
| opamp disable preset hardware trig More... | |
| static void | opamp_mode_set (OPAMP_Type *opamp, uint8_t mode) |
| opamp set mode More... | |
| static void | opamp_preset_mode_set (OPAMP_Type *opamp, uint8_t preset_chn, uint8_t mode) |
| opamp preset set mode More... | |
OPMAP driver APIs.
| #define OPAMP_MODE_FOLLOW_KEY (0x06) |
#include <drivers/inc/hpm_opamp_drv.h>
| #define OPAMP_MODE_INVERT_INDEX0_KEY (0x08) |
#include <drivers/inc/hpm_opamp_drv.h>
| #define OPAMP_MODE_INVERT_INDEX1_KEY (0x18) |
#include <drivers/inc/hpm_opamp_drv.h>
| #define OPAMP_MODE_NON_INVERT_INDEX0_KEY (0x01) |
#include <drivers/inc/hpm_opamp_drv.h>
| #define OPAMP_MODE_NON_INVERT_INDEX1_KEY (0x09) |
#include <drivers/inc/hpm_opamp_drv.h>
| #define OPAMP_MODE_NON_INVERT_INDEX2_KEY (0x11) |
#include <drivers/inc/hpm_opamp_drv.h>
| #define OPAMP_MODE_NON_INVERT_INDEX3_KEY (0x19) |
#include <drivers/inc/hpm_opamp_drv.h>
| #define OPAMP_MODE_NON_INVERT_INDEX4_KEY (0x09) |
#include <drivers/inc/hpm_opamp_drv.h>
| #define OPAMP_MODE_USER_DEFINE_KEY (0x04) |
#include <drivers/inc/hpm_opamp_drv.h>
| typedef struct opamp_cfg opamp_cfg_t |
#include <drivers/inc/hpm_opamp_drv.h>
| typedef union opamp_cfg_preset0 opamp_ctrl_cfg_preset0_t |
#include <drivers/inc/hpm_opamp_drv.h>
opamp configuration preset0
| typedef union opamp_cfg_preset1 opamp_ctrl_cfg_preset1_t |
#include <drivers/inc/hpm_opamp_drv.h>
opamp configuration preset1
#include <drivers/inc/hpm_opamp_drv.h>
opamp preset channel
| Enumerator | |
|---|---|
| cfg_preset_0 | |
| cfg_preset_1 | |
| cfg_preset_2 | |
| cfg_preset_3 | |
| cfg_preset_4 | |
| cfg_preset_5 | |
| cfg_preset_6 | |
| cfg_preset_7 | |
| enum opamp_gain_t |
#include <drivers/inc/hpm_opamp_drv.h>
Gain multiplier selection.
| Enumerator | |
|---|---|
| gain_x_2 | gain x2 |
| gain_x_4 | |
| gain_x_8 | |
| gain_x_16 | |
| gain_x_32 | |
| gain_x_64 | |
| gain_x_128 | gain x128 |
| enum opamp_inm_pad_t |
#include <drivers/inc/hpm_opamp_drv.h>
Reverse Input Pin Selection.
| Enumerator | |
|---|---|
| inm_pad_vim0 | Connect pad vim0 |
| inm_pad_vim1 | Connect pad vim1 |
| inm_pad_vim2 | Connect pad vim2 |
| inm_pad_dac | Connect pad vim dac |
| inm_pad_floating | Connect inm floating |
| enum opamp_inp_pad_t |
#include <drivers/inc/hpm_opamp_drv.h>
Positive Input Pin Selection.
| enum opamp_miller_cap_t |
#include <drivers/inc/hpm_opamp_drv.h>
Miller Capacitor Selection.
| Enumerator | |
|---|---|
| miller_cap_x_7 | 7 unit cap |
| miller_cap_x_8 | |
| miller_cap_x_10 | |
| miller_cap_x_13 | |
| miller_cap_x_15 | 15 unit cap |
| miller_cap_x_18 | |
| miller_cap_x_5 | |
| miller_cap_x_6 | 6 unit cap |
| enum opamp_mode_t |
#include <drivers/inc/hpm_opamp_drv.h>
operational amplifier
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
Clear the trigger conflict status.
| opamp | OPAMP_Type |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
connect the main series resistor and VSSA
| opamp | OPAMP_Type |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
disconnect the main series resistor and VSSA
| opamp | OPAMP_Type |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
main string resistor selection
| opamp | OPAMP_Type |
| select | opamp_gain_t |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
opamp get current preset
| opamp | OPAMP_Type |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
get the current preset value
| opamp | OPAMP_Type |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
Get the trigger conflict status.
| opamp | OPAMP_Type |
| hpm_stat_t opamp_init | ( | OPAMP_Type * | opamp, |
| opamp_cfg_t * | cfg | ||
| ) |
#include <drivers/inc/hpm_opamp_drv.h>
opamp initialisation functions Use this function to initialise the op-amp to different modes
| opamp | OPAMP_Type |
| cfg | opamp_cfg_t |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
opamp core inm connect pad
| opamp | OPAMP_Type |
| select | opamp_inm_pad_t |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
opamp inp select
| opamp | OPAMP_Type |
| select | opamp_inp_pad_t |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
opamp miller cap selection
| opamp | OPAMP_Type |
| select | opamp_miller_cap_t |
|
inlinestatic |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
disable phase margin compensation cap
| opamp | OPAMP_Type |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
enable phase margin compensation cap
| opamp | OPAMP_Type |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
connect the main series resistor and VSSA preset
| opamp | OPAMP_Type |
| preset_chn | preset channel |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
opamp disable preset hardware trig
| opamp | OPAMP_Type |
| preset_chn | preset channel |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
disconnect the main series resistor and VSSA preset
| opamp | OPAMP_Type |
| preset_chn | preset channel |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
opamp enable preset hardware trig
| opamp | OPAMP_Type |
| preset_chn | preset channel |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
main string resistor selection preset
| opamp | OPAMP_Type |
| preset_chn | preset channel |
| select | opamp_gain_t |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
opamp core inm connect pad preset
| opamp | OPAMP_Type |
| preset_chn | preset channel |
| select | opamp_inm_pad_t |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
opamp inp select preset
| opamp | OPAMP_Type |
| preset_chn | preset channel |
| select | opamp_inp_pad_t |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
opamp miller cap selection preset
| opamp | OPAMP_Type |
| preset_chn | preset channel |
| select | opamp_miller_cap_t |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
opamp preset set mode
| opamp | OPAMP_Type |
| preset_chn | preset channel |
| mode | OPAMP_MODE_XX |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
preset disable opamp function
| opamp | OPAMP_Type |
| preset_chn | preset channel |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
preset enable opamp function
| opamp | OPAMP_Type |
| preset_chn | preset channel |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
disable phase margin compensation cap preset
| opamp | OPAMP_Type |
| preset_chn | preset channel |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
enable phase margin compensation cap preset
| opamp | OPAMP_Type |
| preset_chn | preset channel |
| hpm_stat_t opamp_set_preset_cfg | ( | OPAMP_Type * | opamp, |
| uint8_t | preset_chn, | ||
| opamp_cfg_t * | cfg | ||
| ) |
#include <drivers/inc/hpm_opamp_drv.h>
Set preset cfg.
| opamp | OPAMP_Type |
| preset_chn | preset channel |
| cfg | opamp_cfg_t |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
Set preset x channel value.
| opamp | OPAMP_Type |
| preset_chn | preset channel |
| chn | channel |
|
inlinestatic |
#include <drivers/inc/hpm_opamp_drv.h>
Set opamp preset value.
| opamp | OPAMP_Type |
| val | opamp_cfg_preset_chn_t |