42#ifndef _DEV_CAN_CAN_STATS_H
43#define _DEV_CAN_CAN_STATS_H
126static inline void rtems_can_stats_add_tx_done(
133static inline void rtems_can_stats_add_rx_done(
140static inline void rtems_can_stats_add_tx_bytes(
148static inline void rtems_can_stats_add_rx_bytes(
156static inline void rtems_can_stats_add_tx_error(
163static inline void rtems_can_stats_add_rx_error(
170static inline void rtems_can_stats_add_rx_overflows(
177static inline void rtems_can_stats_set_state(
void rtems_can_stats_reset(struct rtems_can_stats *stats)
This function resets the controller's statistics.
Definition: can-devcommon.c:80
can_state
This enum represents the current state of CAN controller.
Definition: can-stats.h:48
@ CAN_STATE_ERROR_ACTIVE
This member indicates the controller is in error active state ( RX/TX error count < 96)
Definition: can-stats.h:53
@ CAN_STATE_ERROR_WARNING
This member indicates the controller is in error warning state ( RX/TX error count < 128)
Definition: can-stats.h:58
@ CAN_STATE_STOPPING
This member indicates the the controller is in stopping process.
Definition: can-stats.h:80
@ CAN_STATE_SLEEPING
This member indicates the the controller is in sleep.
Definition: can-stats.h:76
@ CAN_STATE_STOPPED
This member indicates the the controller is stopped.
Definition: can-stats.h:72
@ CAN_STATE_BUS_OFF
This member indicates the controller is in bus off state ( RX/TX error count >= 256)
Definition: can-stats.h:68
@ CAN_STATE_MAX
This member holds the maximum number of controller's states.
Definition: can-stats.h:84
@ CAN_STATE_ERROR_PASSIVE
This member indicates the controller is in error passive state ( RX/TX error count < 256)
Definition: can-stats.h:63
This structure is used to represent CAN statistics.
Definition: can-stats.h:90
unsigned long rx_overflows
This member holds number of overflows on RX side.
Definition: can-stats.h:118
unsigned long tx_error
This member holds number of TX errors.
Definition: can-stats.h:110
unsigned long rx_error
This member holds number of RX errors.
Definition: can-stats.h:114
unsigned long tx_bytes
This member holds number of bytes succesfully send.
Definition: can-stats.h:102
unsigned long rx_done
This member holds number of succesful RX frames.
Definition: can-stats.h:98
unsigned long tx_done
This member holds number of succesful TX frames.
Definition: can-stats.h:94
unsigned long rx_bytes
This member holds number of bytes succesfully received.
Definition: can-stats.h:106
int chip_state
This member holds controller's state (error active, passive, bus off)
Definition: can-stats.h:123