运放本身是用库函数设置的
OPAMP_InitType OPAMP_Initial;
/* 设置内部运放为跟随器 */
RCC->APB1PCLKEN |= RCC_APB1_PERIPH_OPAMP;
OPAMP_StructInit(&OPAMP_Initial);
OPAMP_Initial.TimeAutoMuxEn = DISABLE;
OPAMP_Initial.Mod = OPAMP_CS_FOLLOW;
OPAMP_Init(&OPAMP_Initial);
OPAMP_SetVpSel(OPAMP_CS_VPSEL_PA0);
OPAMP_Enable(ENABLE);
|