darrylring commented on code in PR #21398:
URL: https://github.com/apache/nuttx/pull/21398#discussion_r4553288555


##########
include/nuttx/can/can.h:
##########
@@ -909,6 +920,33 @@ struct canioc_bittiming_s
   uint8_t               bt_sjw;          /* Synchronization Jump Width in time 
quanta */
 };
 
+/* CANIOC_GET_ERRORS:
+ *
+ * The state is error-active unless the controller reports otherwise;
+ * WARNING is error-active with either error counter at or above 96.
+ * PASSIVE and BUSOFF follow the controller's own state.
+ */
+
+#define CANIOC_ERRSTATE_ACTIVE    0
+#define CANIOC_ERRSTATE_WARNING   1
+#define CANIOC_ERRSTATE_PASSIVE   2
+#define CANIOC_ERRSTATE_BUSOFF    3
+
+struct canioc_errors_s
+{
+  uint8_t               state;           /* CANIOC_ERRSTATE_* */
+  uint8_t               txerr;           /* Transmit error counter (TEC) */
+  uint8_t               rxerr;           /* Receive error counter (REC) */
+  uint32_t              errors;          /* Bus errors observed since the
+                                          * device was opened, monotonic */
+  uint32_t              arb_errors;      /* Errors observed during the

Review Comment:
   Sorry for the delay. Good call -- I have updated the comments. (I also 
rebased the branch.)



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to