Request for change to RUI documentation

Hi,

In the documentation, would you please add the following (or something similar) which will probably save someone a bit of work in the future.
It wasn’t clear to me that rui_adc_init was going to init the GPIO port. I thought that I had to init the port with rui_gpio_init before using that port structure with rui_adc_init
The other issue was that I expected rui_adc_get to return the adc count 0-4095, not the millivolts.
I think it would also be good to change the function names and have one for adc count and one for mV
e.g. rui_adc_millivolts and rui_adc_count

rui_adc_init
Please note that rui_gpio_init should not be called prior to using rui_adc_init. rui_adc_init will initialise the GPIO port for the ADC function

rui_adc_get
value returned is millivolts, not adc count.

Thanks

1 Like