Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adc: add ioctl command to get the number of configured channels #4231

Merged
merged 1 commit into from Jul 27, 2021

Conversation

michallenc
Copy link
Contributor

Summary

Number of configured ADC channels is currently only defined in board
level section, typically in xxx_adc.c file. This commit introduces
ioctl command ANIOC_GET_NCHANNELS that returns the number of configured
channels which is determined by the driver code. The change can allow the
applications to be more flexible when it comes to multiple ADC devices
with different number of configured channels.

The problem was already mentioned in an issue #4217.

Impact

None on current functionality, just adds additional option to get the number of channels to all current ADC drivers.

Testing

Tested with pysimCoder application on iMXRT and STM32 boards.

Number of configured ADC channels is currently only defined in board
level section, typically in xxx_adc.c file. This commit introduces
ioctl command ANIOC_GET_NCHANNELS that returns the number of configured
channels which is determined by the driver code. The change can allow the
applications to be more flexible when it comes to multiple ADC devices
with different number of configured channels.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
@xiaoxiang781216 xiaoxiang781216 merged commit 9fc8069 into apache:master Jul 27, 2021
@michallenc michallenc deleted the adc_ioctl branch August 4, 2021 16:22
@Ouss4 Ouss4 added this to To-Add in Release Notes - 10.2 Oct 11, 2021
@jerpelea jerpelea moved this from To-Add to fixes in Release Notes - 10.2 Oct 13, 2021
@jerpelea jerpelea moved this from fixes to Added in Release Notes - 10.2 Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

ADC: Add ioctl command to get the number of configured channels
2 participants