I reviewed AD7291 example in:
AD7291 - Microcontroller No-OS Driver [Analog Devices Wiki]
and there is something I misunderstand:
AD7291_GetVoltageConversionResults() checks the channel mask, but I don't see anywhere in example where that channel mask is being set,
By default, the command register is 0 according to datasheet, so how can it function if the channel mask is not being set by driver ?
I moved the thread to the Linux Software Driver Community.
AD7291_GetVoltageConversionResults() identifies all the enabled channels using that mask (the variable is actually set to 0x80 inside the function). Have a look at one of the Renesas examples - in the main function the desired channels are enabled prior calling AD7291_GetVoltageConversionResults().
Moved to No-OS SW driver community.
Download the Renesas corresponding files (e.g., https://wiki.analog.com/_media/resources/tools-software/uc-drivers/renesas/ad7291_rl78g13.zip) and have a look at "Main.c".
Thank you for the reply.
How to enable the channels prior calling AD7291_GetVoltageConversionResults ?
Is it that modifying the mask from 0x80 to 0xff will enable all 8 channels ?
I've tried to search for example in
But haven't found any file with reference to this function.
If you can please explain how enabling the channel from outside should be done it is good enough.