Using the opamp6 of stm32g474 configured in voltage follower internal connection mode, connected to adc4 internally, the sampled adc4 data is always zero, and opamp6_vinp cannot be changed.
opamp6_vin
Let's do an exercise directly and define a function to exchange the contents of two variables.
void swap(int *x, int *y);void main(){int x = 20, y = 10;swap(x, y);printf("x = %d, y = %d", x ,y);}void