已解决! 转到解答。
GPIO_ReadPinInput() reads the pin as digital (high, low) input pin, not as analog pin. I suggest you have a look at the analog examples in the SDK how to configure and read the pin as analog pin?
GPIO_ReadPinInput() reads the pin as digital (high, low) input pin, not as analog pin. I suggest you have a look at the analog examples in the SDK how to configure and read the pin as analog pin?
Yup. You're right. After reading the documentation at https://mcuxpresso.nxp.com/api_doc/dev/329/group__lpc__gpio.html it is obvious, sorry. It's a bit difficult making sense of the ADC sdk examples, I only need to read one value at a time. The API calls are also not very friendly. Perhaps there is an easier way to do it? I can't seem to figure out any other analog pin read examples.