109 #define OPAMP_CSR_DEFAULT_MASK ((uint32_t)0xFFFFFF93) 110 #define OPAMP_CSR_TIMERMUX_MASK ((uint32_t)0xFFFFF8FF) 111 #define OPAMP_CSR_TRIMMING_MASK ((uint32_t)0x0000001F) 147 *(
__IO uint32_t *) (OPAMP_BASE + OPAMP_Selection) = ((uint32_t)0x00000000);
174 tmpreg = *(
__IO uint32_t *) (OPAMP_BASE + OPAMP_Selection);
183 *(
__IO uint32_t *) (OPAMP_BASE + OPAMP_Selection) = tmpreg;
209 void OPAMP_PGAConfig(uint32_t OPAMP_Selection, uint32_t OPAMP_PGAGain, uint32_t OPAMP_PGAConnect)
217 *(
__IO uint32_t *) (OPAMP_BASE + OPAMP_Selection) &= (uint32_t)(~OPAMP_CSR_PGGAIN);
220 *(
__IO uint32_t *) (OPAMP_BASE + OPAMP_Selection) |= (uint32_t) (OPAMP_PGAGain | OPAMP_PGAConnect);
248 tmpreg = *(
__IO uint32_t *) (OPAMP_BASE + OPAMP_Selection);
251 tmpreg &= (uint32_t) (~OPAMP_CSR_CALSEL);
254 tmpreg |= (uint32_t)(OPAMP_Vref);
257 *(
__IO uint32_t *) (OPAMP_BASE + OPAMP_Selection) = tmpreg;
280 *(
__IO uint32_t *) (OPAMP_BASE + OPAMP_Selection) |= (uint32_t) (OPAMP_CSR_FORCEVP);
285 *(
__IO uint32_t *) (OPAMP_BASE + OPAMP_Selection) &= (uint32_t)(~OPAMP_CSR_FORCEVP);
306 *(
__IO uint32_t *) (OPAMP_BASE + OPAMP_Selection) |= (uint32_t) (OPAMP_CSR_TSTREF);
311 *(
__IO uint32_t *) (OPAMP_BASE + OPAMP_Selection) &= (uint32_t)(~OPAMP_CSR_TSTREF);
341 tmpreg = *(
__IO uint32_t *) (OPAMP_BASE + OPAMP_Selection);
350 *(
__IO uint32_t *) (OPAMP_BASE + OPAMP_Selection) = tmpreg;
373 *(
__IO uint32_t *) (OPAMP_BASE + OPAMP_Selection) |= (uint32_t) (OPAMP_CSR_TCMEN);
378 *(
__IO uint32_t *) (OPAMP_BASE + OPAMP_Selection) &= (uint32_t)(~OPAMP_CSR_TCMEN);
402 *(
__IO uint32_t *) (OPAMP_BASE + OPAMP_Selection) |= (uint32_t) (OPAMP_CSR_OPAMPxEN);
407 *(
__IO uint32_t *) (OPAMP_BASE + OPAMP_Selection) &= (uint32_t)(~OPAMP_CSR_OPAMPxEN);
426 uint32_t opampout = 0x0;
432 if ((*(
__IO uint32_t *) (OPAMP_BASE + OPAMP_Selection) & (OPAMP_CSR_OUTCAL)) != 0)
442 return (uint32_t)(opampout);
465 *(
__IO uint32_t *) (OPAMP_BASE + OPAMP_Selection) &= (~(uint32_t) (OPAMP_CSR_USERTRIM));
468 *(
__IO uint32_t *) (OPAMP_BASE + OPAMP_Selection) |= OPAMP_Trimming;
494 tmpreg = *(
__IO uint32_t *) (OPAMP_BASE + OPAMP_Selection);
500 tmpreg |= (uint32_t)(OPAMP_TrimValue<<OPAMP_Input);
503 *(
__IO uint32_t *) (OPAMP_BASE + OPAMP_Selection) = tmpreg;
526 *(
__IO uint32_t *) (OPAMP_BASE + OPAMP_Selection) |= (uint32_t) (OPAMP_CSR_CALON);
531 *(
__IO uint32_t *) (OPAMP_BASE + OPAMP_Selection) &= (uint32_t)(~OPAMP_CSR_CALON);
568 *(
__IO uint32_t *) (OPAMP_BASE + OPAMP_Selection) |= (uint32_t) (OPAMP_CSR_LOCK);
#define IS_OPAMP_PGACONNECT(CONNECT)
void OPAMP_TimerControlledMuxConfig(uint32_t OPAMP_Selection, OPAMP_InitTypeDef *OPAMP_InitStruct)
Configure the OPAMP peripheral (secondary inputs) for timer-controlled mux mode according to the spec...
void OPAMP_VrefConnectNonInvertingInput(uint32_t OPAMP_Selection, FunctionalState NewState)
Connnect the internal reference to the OPAMP's non inverting input.
uint32_t OPAMP_NonInvertingInput
void OPAMP_StartCalibration(uint32_t OPAMP_Selection, FunctionalState NewState)
Start or stop the calibration of selected OPAMP peripheral.
void OPAMP_Cmd(uint32_t OPAMP_Selection, FunctionalState NewState)
Enable or disable the OPAMP peripheral.
void assert_param(int val)
void OPAMP_Init(uint32_t OPAMP_Selection, OPAMP_InitTypeDef *OPAMP_InitStruct)
Initializes the OPAMP peripheral according to the specified parameters in OPAMP_InitStruct.
#define IS_FUNCTIONAL_STATE(STATE)
void OPAMP_StructInit(OPAMP_InitTypeDef *OPAMP_InitStruct)
Fills each OPAMP_InitStruct member with its default value.
#define OPAMP_OutputLevel_Low
void OPAMP_VrefConfig(uint32_t OPAMP_Selection, uint32_t OPAMP_Vref)
Configure the OPAMP's internal reference.
uint32_t OPAMP_InvertingInput
#define IS_OPAMP_VREF(VREF)
void OPAMP_OffsetTrimConfig(uint32_t OPAMP_Selection, uint32_t OPAMP_Input, uint32_t OPAMP_TrimValue)
Configure the trimming value of the OPAMP.
void OPAMP_DeInit(uint32_t OPAMP_Selection)
Deinitializes OPAMP peripheral registers to their default reset values.
#define IS_OPAMP_TRIMMING(TRIMMING)
#define IS_OPAMP_ALL_PERIPH(PERIPH)
void OPAMP_TimerControlledMuxCmd(uint32_t OPAMP_Selection, FunctionalState NewState)
Enable or disable the timer-controlled mux mode.
#define OPAMP_CSR_TRIMMING_MASK
#define OPAMP_CSR_TIMERMUX_MASK
void OPAMP_LockConfig(uint32_t OPAMP_Selection)
Lock the selected OPAMP configuration.
#define IS_OPAMP_PGAGAIN(GAIN)
#define IS_OPAMP_TRIMMINGVALUE(VALUE)
#define OPAMP_OutputLevel_High
uint32_t OPAMP_GetOutputLevel(uint32_t OPAMP_Selection)
Return the output level (high or low) during calibration of the selected OPAMP.
#define OPAMP_CSR_DEFAULT_MASK
void OPAMP_PGAConfig(uint32_t OPAMP_Selection, uint32_t OPAMP_PGAGain, uint32_t OPAMP_PGAConnect)
Configure the feedback resistor gain.
void OPAMP_OffsetTrimModeSelect(uint32_t OPAMP_Selection, uint32_t OPAMP_Trimming)
Select the trimming mode.
This file contains all the functions prototypes for the operational amplifiers (OPAMP) firmware libra...
void OPAMP_VrefConnectADCCmd(uint32_t OPAMP_Selection, FunctionalState NewState)
Enables or disables connecting the OPAMP's internal reference to ADC.
OPAMP Init structure definition.