You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "pkarashchenko (via GitHub)" <gi...@apache.org> on 2023/09/15 09:21:54 UTC

[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #10634: input/button: First press pwrkey is ineffective

pkarashchenko commented on code in PR #10634:
URL: https://github.com/apache/nuttx/pull/10634#discussion_r1327034717


##########
drivers/input/button_upper.c:
##########
@@ -190,13 +191,25 @@ static void btn_enable(FAR struct btn_upperhalf_s *priv)
   DEBUGASSERT(lower->bl_enable);
   if (press != 0 || release != 0)
     {
+      /* Update last sampled button states when enabling interrupts for
+       * the first time.
+       */
+
+      if (priv->bu_enabled == false)

Review Comment:
   ```suggestion
         if (!priv->bu_enabled)
   ```



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