Reading analog channel MANUALLY

As I said, we don't have access to those libraries. I.e. no adc_init and the other.

I would appreciate if you could copy the implementations of those 2 functions.
However, you say "like this" so I assume that you are only guessing.