Lely core libraries  2.2.5
err.h File Reference

This header file is part of the CAN library; it contains CAN bus error definitions. More...

#include <lely/features.h>
Include dependency graph for err.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  can_state {
  CAN_STATE_ACTIVE, CAN_STATE_PASSIVE, CAN_STATE_BUSOFF, CAN_STATE_SLEEPING,
  CAN_STATE_STOPPED
}
 The states of a CAN node, depending on the TX/RX error count. More...
 
enum  can_error {
  CAN_ERROR_BIT = 1u << 0, CAN_ERROR_STUFF = 1u << 1, CAN_ERROR_CRC = 1u << 2, CAN_ERROR_FORM = 1u << 3,
  CAN_ERROR_ACK = 1u << 4, CAN_ERROR_OTHER = 1u << 5
}
 The error flags of a CAN bus, which are not mutually exclusive. More...
 

Detailed Description

This header file is part of the CAN library; it contains CAN bus error definitions.

Author
J. S. Seldenthuis jseld.nosp@m.enth.nosp@m.uis@l.nosp@m.ely..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file err.h.

Enumeration Type Documentation

◆ can_state

enum can_state

The states of a CAN node, depending on the TX/RX error count.

Enumerator
CAN_STATE_ACTIVE 

The error active state (TX/RX error count < 128).

CAN_STATE_PASSIVE 

The error passive state (TX/RX error count < 256).

CAN_STATE_BUSOFF 

The bus off state (TX/RX error count >= 256).

CAN_STATE_SLEEPING 

The device is in sleep mode.

CAN_STATE_STOPPED 

The device is stopped.

Definition at line 28 of file err.h.

◆ can_error

enum can_error

The error flags of a CAN bus, which are not mutually exclusive.

Enumerator
CAN_ERROR_BIT 

A single bit error.

CAN_ERROR_STUFF 

A bit stuffing error.

CAN_ERROR_CRC 

A CRC sequence error.

CAN_ERROR_FORM 

A form error.

CAN_ERROR_ACK 

An acknowledgment error.

CAN_ERROR_OTHER 

One or more other errors.

Definition at line 42 of file err.h.