12 #include "stm32l4xx_hal.h" 23 OpampHandle.Init.NonInvertingInput = OPAMP_NONINVERTINGINPUT_DAC_CH;
24 OpampHandle.Init.UserTrimming = OPAMP_TRIMMING_FACTORY;
34 GPIO_InitTypeDef GPIO_InitStruct;
36 __HAL_RCC_GPIOA_CLK_ENABLE();
37 __HAL_RCC_OPAMP_CLK_ENABLE();
39 GPIO_InitStruct.Pin = GPIO_PIN_3;
40 GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
41 GPIO_InitStruct.Pull = GPIO_NOPULL;
42 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
void opamp_init(void)
Set up OPAMP1 to buffer DAC Channel 1 to drive PA3.
void HAL_OPAMP_MspInit(OPAMP_HandleTypeDef *opamp)
static OPAMP_HandleTypeDef OpampHandle
Initialization of OPAMP1 to buffer DAC Ch 1 to an output pin.