From commits-return-40253-archive-asf-public=cust-asf.ponee.io@nuttx.apache.org Sat Jul 24 09:27:28 2021 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-he-de.apache.org (mxout1-he-de.apache.org [95.216.194.37]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id 2E19C180660 for ; Sat, 24 Jul 2021 11:27:28 +0200 (CEST) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-he-de.apache.org (ASF Mail Server at mxout1-he-de.apache.org) with SMTP id 8C7FD60060 for ; Sat, 24 Jul 2021 09:27:27 +0000 (UTC) Received: (qmail 81651 invoked by uid 500); 24 Jul 2021 09:27:27 -0000 Mailing-List: contact commits-help@nuttx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nuttx.apache.org Delivered-To: mailing list commits@nuttx.apache.org Received: (qmail 81642 invoked by uid 99); 24 Jul 2021 09:27:26 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Jul 2021 09:27:26 +0000 From: =?utf-8?q?GitBox?= To: commits@nuttx.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bincubator-nuttx=5D_michallenc_opened_a_new_issue_?= =?utf-8?q?=234217=3A_ADC=3A_Add_ioctl_command_to_get_the_numbr_of_configure?= =?utf-8?q?d_channels?= Message-ID: Date: Sat, 24 Jul 2021 09:27:26 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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