You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/04/29 20:04:22 UTC

[incubator-nuttx] branch master updated (ddda00e -> 5d12735)

This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.


    from ddda00e  Kconfig: Refine BUILD_FLAT, BUILD_PROTECTED and BUILD_KERNEL usage
     new 1692c90  Revert "sama5d3x-ek/nxwm: Fix error: 'g_adcdev' undeclared"
     new 5d12735  sama5d3x-ek/nxwm: Fix error: 'g_adcdev' undeclared

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 arch/arm/src/sama5/sam_adc.c                        | 11 ++++++-----
 boards/arm/sama5/sama5d3x-ek/configs/nxwm/defconfig |  1 +
 boards/arm/sama5/sama5d3x-ek/src/sam_touchscreen.c  |  2 +-
 3 files changed, 8 insertions(+), 6 deletions(-)


[incubator-nuttx] 02/02: sama5d3x-ek/nxwm: Fix error: 'g_adcdev' undeclared

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 5d12735f34ed20a40fe13f8f78b86ae75a566150
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Thu Apr 30 01:46:22 2020 +0800

    sama5d3x-ek/nxwm: Fix error: 'g_adcdev' undeclared
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/arm/src/sama5/sam_adc.c                       | 11 ++++++-----
 boards/arm/sama5/sama5d3x-ek/src/sam_touchscreen.c |  2 +-
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/arm/src/sama5/sam_adc.c b/arch/arm/src/sama5/sam_adc.c
index b95b96b..07a190e 100644
--- a/arch/arm/src/sama5/sam_adc.c
+++ b/arch/arm/src/sama5/sam_adc.c
@@ -500,11 +500,9 @@ static const struct adc_ops_s g_adcops =
 
 static struct sam_adc_s g_adcpriv;
 
-#ifdef SAMA5_ADC_HAVE_CHANNELS
 /* ADC device instance */
 
 static struct adc_dev_s g_adcdev;
-#endif
 
 /****************************************************************************
  * Private Functions
@@ -677,7 +675,7 @@ static void sam_adc_dmadone(void *arg)
                     ADC_LCDR_CHANB_SHIFT);
           sample = ((*buffer & ADC_LCDR_DATA_MASK) >> ADC_LCDR_DATA_SHIFT);
 
-          /* Verify that the upper-half driver has bound its callback functions */
+          /* Verify the upper-half driver has bound its callback functions */
 
           if (priv->cb != NULL)
             {
@@ -884,7 +882,7 @@ static void sam_adc_endconversion(void *arg)
 
           regval = sam_adc_getreg(priv, SAM_ADC_CDR(chan));
 
-          /* Verify that the upper-half driver has bound its callback functions */
+          /* Verify the upper-half driver has bound its callback functions */
 
           if (priv->cb != NULL)
             {
@@ -2033,14 +2031,17 @@ struct adc_dev_s *sam_adc_initialize(void)
 
       /* Initialize the public ADC device data structure */
 
+#ifdef SAMA5_ADC_HAVE_CHANNELS
       g_adcdev.ad_ops  = &g_adcops;
+      priv->dev = &g_adcdev;
+#endif
+
       g_adcdev.ad_priv = priv;
 
       /* Initialize the private ADC device data structure */
 
       nxsem_init(&priv->exclsem,  0, 1);
       priv->cb  = NULL;
-      priv->dev = &g_adcdev;
 
 #ifdef CONFIG_SAMA5_ADC_DMA
       /* Allocate a DMA channel from DMAC1 */
diff --git a/boards/arm/sama5/sama5d3x-ek/src/sam_touchscreen.c b/boards/arm/sama5/sama5d3x-ek/src/sam_touchscreen.c
index d2b4f6d..1f09227 100644
--- a/boards/arm/sama5/sama5d3x-ek/src/sam_touchscreen.c
+++ b/boards/arm/sama5/sama5d3x-ek/src/sam_touchscreen.c
@@ -96,7 +96,7 @@ int sam_tsc_setup(int minor)
 
   /* Initialize the ADC driver */
 
-  adc = sam_adc_initialize();
+  adc = (struct sam_adc_s *)sam_adc_initialize();
   if (!adc)
     {
       ierr("ERROR: Failed to initialize the ADC driver\n");


[incubator-nuttx] 01/02: Revert "sama5d3x-ek/nxwm: Fix error: 'g_adcdev' undeclared"

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 1692c90d15a53d846bf57b570f1cff2f1828927f
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Thu Apr 30 01:37:26 2020 +0800

    Revert "sama5d3x-ek/nxwm: Fix error: 'g_adcdev' undeclared"
    
    This reverts commit ab2e24b42b8010b169b61eb73ddc6f105c3c5111.
---
 boards/arm/sama5/sama5d3x-ek/configs/nxwm/defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/boards/arm/sama5/sama5d3x-ek/configs/nxwm/defconfig b/boards/arm/sama5/sama5d3x-ek/configs/nxwm/defconfig
index 2901e63..8a4522b 100644
--- a/boards/arm/sama5/sama5d3x-ek/configs/nxwm/defconfig
+++ b/boards/arm/sama5/sama5d3x-ek/configs/nxwm/defconfig
@@ -93,6 +93,7 @@ CONFIG_RAM_START=0x00304000
 CONFIG_RAM_VSTART=0x00304000
 CONFIG_RAW_BINARY=y
 CONFIG_RR_INTERVAL=200
+CONFIG_SAMA5_ADC=y
 CONFIG_SAMA5_BOOT_CS0FLASH=y
 CONFIG_SAMA5_DDRCS=y
 CONFIG_SAMA5_DDRCS_HEAP_OFFSET=5767168