You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/09/24 19:50:34 UTC
[GitHub] [incubator-nuttx-apps] saramonteiro opened a new pull request #404: Added timer device path as a CLI option
saramonteiro opened a new pull request #404:
URL: https://github.com/apache/incubator-nuttx-apps/pull/404
## Summary
This commit allows passing a timer device path argument to the timer example.
## Impact
Now, the example may run with multiple timer instances.
## Testing
The change was tested by running the following command in the NuttX shell in the esp32 SoC which has 4 timers:
timer -d /dev/timerx (x = 0,1,2,3)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] acassis commented on a change in pull request #404: Added timer device path as a CLI option
Posted by GitBox <gi...@apache.org>.
acassis commented on a change in pull request #404:
URL: https://github.com/apache/incubator-nuttx-apps/pull/404#discussion_r494575433
##########
File path: examples/timer/timer_main.c
##########
@@ -45,13 +45,15 @@
#include <fcntl.h>
#include <signal.h>
#include <errno.h>
-
+#include <string.h>
#include <nuttx/timers/timer.h>
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
+#define DEVNAME_SIZE 11
Review comment:
Please change:
#define DEVNAME_SIZE 11 to 13
It is missing 1 byte to '\0' and also for some MCU with ten or more timers, /dev/timer10 will not fit
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] acassis merged pull request #404: Added timer device path as a CLI option
Posted by GitBox <gi...@apache.org>.
acassis merged pull request #404:
URL: https://github.com/apache/incubator-nuttx-apps/pull/404
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] acassis commented on pull request #404: Added timer device path as a CLI option
Posted by GitBox <gi...@apache.org>.
acassis commented on pull request #404:
URL: https://github.com/apache/incubator-nuttx-apps/pull/404#issuecomment-699689511
LGTM
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] acassis commented on a change in pull request #404: Added timer device path as a CLI option
Posted by GitBox <gi...@apache.org>.
acassis commented on a change in pull request #404:
URL: https://github.com/apache/incubator-nuttx-apps/pull/404#discussion_r494575433
##########
File path: examples/timer/timer_main.c
##########
@@ -45,13 +45,15 @@
#include <fcntl.h>
#include <signal.h>
#include <errno.h>
-
+#include <string.h>
#include <nuttx/timers/timer.h>
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
+#define DEVNAME_SIZE 11
Review comment:
Please change:
#define DEVNAME_SIZE 11 to 13
It is missing 1 byte to '\0' and also for some MCU with ten or more timers, /dev/timer10 will not fit
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] saramonteiro commented on a change in pull request #404: Added timer device path as a CLI option
Posted by GitBox <gi...@apache.org>.
saramonteiro commented on a change in pull request #404:
URL: https://github.com/apache/incubator-nuttx-apps/pull/404#discussion_r495614195
##########
File path: examples/timer/timer_main.c
##########
@@ -45,13 +45,15 @@
#include <fcntl.h>
#include <signal.h>
#include <errno.h>
-
+#include <string.h>
#include <nuttx/timers/timer.h>
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
+#define DEVNAME_SIZE 11
Review comment:
done
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on pull request #404: Added timer device path as a CLI option
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #404:
URL: https://github.com/apache/incubator-nuttx-apps/pull/404#issuecomment-699598722
@saramonteiro please don't forget to fix the nxsytle warning too:
https://github.com/apache/incubator-nuttx-apps/pull/404/checks?check_run_id=1162431000
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org