Lely core libraries  1.9.2
can.h File Reference

This is the public header file of the CAN library. More...

#include <lely/features.h>
Include dependency graph for can.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 }
 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 = 1 << 5
}
 The error flags of a CAN bus, which are not mutually exclusive. More...
 

Detailed Description

This is the public header file of the CAN library.

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 can.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).

Definition at line 27 of file can.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 37 of file can.h.