You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/09/28 11:14:26 UTC
[nuttx-apps] branch master updated: examples/can: TX and RX structs assigned 0 at startup
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 85eb37c62 examples/can: TX and RX structs assigned 0 at startup
85eb37c62 is described below
commit 85eb37c62bda54f97754ec97fc4eed2846583e6d
Author: Eren Terzioglu <er...@espressif.com>
AuthorDate: Tue Sep 26 17:42:10 2023 +0300
examples/can: TX and RX structs assigned 0 at startup
---
examples/can/can_main.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/examples/can/can_main.c b/examples/can/can_main.c
index d0e4f8ccb..e38679317 100644
--- a/examples/can/can_main.c
+++ b/examples/can/can_main.c
@@ -139,7 +139,11 @@ int main(int argc, FAR char *argv[])
struct canioc_bittiming_s bt;
#ifdef CONFIG_EXAMPLES_CAN_WRITE
- struct can_msg_s txmsg;
+ struct can_msg_s txmsg =
+ {
+ 0
+ };
+
#ifdef CONFIG_CAN_EXTID
bool extended = true;
uint32_t msgid;
@@ -154,7 +158,11 @@ int main(int argc, FAR char *argv[])
int i;
#ifdef CONFIG_EXAMPLES_CAN_READ
- struct can_msg_s rxmsg;
+ struct can_msg_s rxmsg =
+ {
+ 0
+ };
+
#endif
size_t msgsize;