You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/07/24 09:27:26 UTC

[GitHub] [incubator-nuttx] michallenc opened a new issue #4217: ADC: Add ioctl command to get the numbr of configured channels

michallenc opened a new issue #4217:
URL: https://github.com/apache/incubator-nuttx/issues/4217


   Hello,
   
   number of channels used by the ADC driver is currently defined in board level section, for example [imxrt1060-evk code](https://github.com/apache/incubator-nuttx/blob/master/boards/arm/imxrt/imxrt1060-evk/src/imxrt_adc.c#L47). This means that the knowladge of the number of configured channels is not passed to the application layout and thus there is no way for the application to know it (except when user defines the number manually which now happens in adc example application, but that is not a best option for generic applications that would use multiple ADCs with a different number of configured channels).
   
   We discuss this during our meeting for Google Summer of Code project NuttX Support for Rapid Control Applications Development with pysimCoder ([wiki page here](https://cwiki.apache.org/confluence/display/NUTTX/%5B2021%5D+NuttX+Support+for+Rapid+Control+Applications+Development+with+pysimCoder) and [weekly reports here ](https://github.com/apache/incubator-nuttx/issues/3765)) and a possible solution would be to add an ioctl command ANIOC_GET_NCHANNELS to [include/nuttx/analog/ioctl.h](https://github.com/apache/incubator-nuttx/blob/master/include/nuttx/analog/ioctl.h#L52), which would be called from the application and return the number of configured channels for ADC module. This way the user would not need to care about the number of configured channels as this would be solve automatically. It would also allow the applications to easily use multiple ADC modules with different number of configured channels.
   
   What are your thoughts about this addition to ADC driver?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 closed issue #4217: ADC: Add ioctl command to get the number of configured channels

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 closed issue #4217:
URL: https://github.com/apache/incubator-nuttx/issues/4217


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org