xiaoxiang781216 commented on code in PR #10855:
URL: https://github.com/apache/nuttx/pull/10855#discussion_r1346232022


##########
arch/arm/src/samv7/sam_afec.c:
##########
@@ -1021,20 +1025,53 @@ static int afec_ioctl(struct adc_dev_s *dev, int cmd, 
unsigned long arg)
         }
         break;
 #endif
-      case ANIOC_GET_NCHANNELS:
-        {
-          /* Return the number of configured channels */
-
-          ret = priv->nchannels;
-        }
-        break;
-
-      default:
-        {
-          aerr("ERROR: Unknown cmd: %d\n", cmd);
-          ret = -ENOTTY;
-        }
-        break;
+    case ANIOC_GET_NCHANNELS:
+      {
+        /* Return the number of configured channels */
+
+        ret = priv->nchannels;
+      }
+      break;
+    case ANIOC_SAMV7_AFEC_IOCTRL_GAIN:
+      {
+        /* Set the requested gain of the associated channel */
+
+        sam_afec_gain_param_tds *chgain = (sam_afec_gain_param_tds *) arg;

Review Comment:
   ```suggestion
           sam_afec_gain_param_tds *chgain = (sam_afec_gain_param_tds *)arg;
   ```



-- 
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-unsubscr...@nuttx.apache.org

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

Reply via email to