raiden00pl commented on code in PR #16530:
URL: https://github.com/apache/nuttx/pull/16530#discussion_r2145013655


##########
arch/arm/src/stm32f0l0g0/stm32_adc.c:
##########
@@ -769,7 +762,316 @@ static void adc_timstart(struct stm32_dev_s *priv, bool 
enable)
 #ifdef ADC_HAVE_TIMER
 static int adc_timinit(struct stm32_dev_s *priv)
 {
-#warning TODO: adc_timinit
+  uint32_t prescaler;
+  uint32_t reload;
+  uint32_t timclk;
+  uint16_t clrbits = 0;
+  uint16_t setbits = 0;
+  uint16_t cr2;
+  uint16_t ccmr1;
+  uint16_t ccmr2;
+  uint16_t ocmode1;
+  uint16_t ocmode2;
+  uint16_t ccenable;
+  uint16_t ccer;
+  uint16_t egr;
+
+  /* If the timer base address is zero, then this ADC was not configured to
+   * use a timer.
+   */
+
+  if (priv->tbase == 0)
+    {
+      return ERROR;

Review Comment:
   I prefer to not modify it now to maintain consistency between other stm32 
adc drivers. Also this field is always initialized if this part of code is 
compiled, tbase is assigned during compilation.



-- 
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