acassis commented on code in PR #12059:
URL: https://github.com/apache/nuttx/pull/12059#discussion_r1554085934


##########
arch/arm64/src/imx9/imx9_flexio_pwm.c:
##########
@@ -444,7 +444,7 @@ static int pwm_update_frequency(struct imx9_pwmtimer_s 
*priv, int freq)
 static int pwm_update_duty(struct imx9_pwmtimer_s *priv, int pwm_ch,
                            ub16_t duty16)
 {
-  uint64_t duty = ub16toi(duty16);
+  uint32_t duty = duty16 & 0xffffffff;

Review Comment:
   @pkarashchenko ub16toi() will discard the lower 16 bits, actually I'm more 
confused about the "ub16_t" type, it seems to be something NuttX specific. It 
is like an uint16_t but using higher 16 bits instead of lower 16 bits.



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