AGHAF  4.5.1
Annecy electronique Generic Hardware Access Framework
aghaf_lin_enums.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

AGHAF_LIN_PUBLISH_FLAGS

#define AGHAF_LIN_PUBLISH_AUTO_PID   (1<<0)
 
#define AGHAF_LIN_PUBLISH_EVT_TRIG   (1<<1)
 

Enumerations

enum  AGHAF_LIN_BusState { AGHAF_LIN_BUSSTATE_SLEEP = 0 , AGHAF_LIN_BUSSTATE_OPER = 1 }
 Enumeration of the bus states. More...
 
enum  AGHAF_LIN_Error {
  AGHAF_LIN_ERROR_BIT = 0 , AGHAF_LIN_ERROR_CHKSUM , AGHAF_LIN_ERROR_RTS , AGHAF_LIN_ERROR_HDR_SYNCH ,
  AGHAF_LIN_ERROR_HDR_PARITY , AGHAF_LIN_ERROR_HDR_SYNC_TOL , AGHAF_LIN_ERROR_HDR_TIMEOUT
}
 enumerator to describe the error on the bus More...
 
enum  AGHAF_LIN_Event { AGHAF_LIN_EVENT_NONE = 0 , AGHAF_LIN_EVENT_STANDARD = 1 , AGHAF_LIN_EVENT_TXDATA = 2 , AGHAF_LIN_EVENT_SPY = 3 }
 Possible event reporting. More...
 
enum  AGHAF_LIN_FrameKind { AGHAF_LIN_FRAME_KIND_IGNORE = 0 , AGHAF_LIN_FRAME_KIND_PUBLISH = 1 , AGHAF_LIN_FRAME_KIND_SUBSCRIBE = 2 }
 Frame kind. More...
 
enum  AGHAF_LIN_Mode { AGHAF_LIN_MODE_SLAVE = 0x00 , AGHAF_LIN_MODE_MASTER = 0x01 }
 Possible modes for LIN. More...
 
enum  AGHAF_LIN_Param {
  AGHAF_LIN_PARAM_EVENT , AGHAF_LIN_PARAM_VERSION , AGHAF_LIN_PARAM_MODE , AGHAF_LIN_PARAM_BAUDRATE ,
  AGHAF_LIN_PARAM_WAKEUP_COUNT , AGHAF_LIN_PARAM_WAKEUP_DELAY , AGHAF_LIN_PARAM_TIME_BASE
}
 List of parameters used to configure a KLINE bus. More...
 
enum  AGHAF_LIN_ScheduleKind { AGHAF_LIN_SCHEDULE_KIND_ONCE = 0 , AGHAF_LIN_SCHEDULE_KIND_LOOP = 1 }
 Schedule kind. More...
 
enum  AGHAF_LIN_Version { AGHAF_LIN_VERSION_1 = 0x01 , AGHAF_LIN_VERSION_2 = 0x02 }
 Possible version for LIN. More...
 

Macro Definition Documentation

◆ AGHAF_LIN_PUBLISH_AUTO_PID

#define AGHAF_LIN_PUBLISH_AUTO_PID   (1<<0)

Auto set frame protected identifier in first data byte. Use this flag if this frame is an unconditional frame associated with an event-triggered frame, and you don't want to manually set the protected identifier in first byte.

Examples
LIN_EventTriggered/main.cpp.

◆ AGHAF_LIN_PUBLISH_EVT_TRIG

#define AGHAF_LIN_PUBLISH_EVT_TRIG   (1<<1)

This frame is an event-triggered frame. Frame data is not transmitted and have special meaning: The first data byte is the associated frame identifier [0-59] and data length must be 1. The data of the associated unconditional frame is automatically sent when this frame is requested (if it has been updated)

Examples
LIN_EventTriggered/main.cpp.

Enumeration Type Documentation

◆ AGHAF_LIN_BusState

Enumeration of the bus states.

Enumerator
AGHAF_LIN_BUSSTATE_SLEEP 

Bus sleep.

AGHAF_LIN_BUSSTATE_OPER 

Operational.

◆ AGHAF_LIN_Error

enumerator to describe the error on the bus

Enumerator
AGHAF_LIN_ERROR_BIT 

Readback not correct when transmitting header or data.

AGHAF_LIN_ERROR_CHKSUM 

Received checksum is invalid.

AGHAF_LIN_ERROR_RTS 

Response too short (Not all data received before FRAME_MAX timeout or Framing error)

AGHAF_LIN_ERROR_HDR_SYNCH 

Inconsistent Synch Field received.

AGHAF_LIN_ERROR_HDR_PARITY 

Parity error in received identifier.

AGHAF_LIN_ERROR_HDR_SYNC_TOL 

Recieved synch field is out of tolerance (Baudrate +/-15%)

AGHAF_LIN_ERROR_HDR_TIMEOUT 

Timeout for header reception (No synch and ident byte received before HEADER_MAX timeout.

◆ AGHAF_LIN_Event

Possible event reporting.

Enumerator
AGHAF_LIN_EVENT_NONE 

Disable LIN events reporting. This will reduce the load on the USB bus if you don't need these events. Protocols requiring LIN will continue to function normally (e.g. DoLin).

AGHAF_LIN_EVENT_STANDARD 

Report events for configured frame identifiers. TX events do not contain the transmitted data.

AGHAF_LIN_EVENT_TXDATA 

Report events for configured frame identifiers. TX events contain the transmitted data.

AGHAF_LIN_EVENT_SPY 

Report events for configured and unconfigured frame identifiers. TX events contain the transmitted data.

◆ AGHAF_LIN_FrameKind

Frame kind.

Enumerator
AGHAF_LIN_FRAME_KIND_IGNORE 

Doesn't transmit and doesn't receive the response.

AGHAF_LIN_FRAME_KIND_PUBLISH 

Transmits the response.

AGHAF_LIN_FRAME_KIND_SUBSCRIBE 

Receive the response.

◆ AGHAF_LIN_Mode

Possible modes for LIN.

Enumerator
AGHAF_LIN_MODE_SLAVE 

LIN slave.

AGHAF_LIN_MODE_MASTER 

LIN master.

◆ AGHAF_LIN_Param

List of parameters used to configure a KLINE bus.

Enumerator
AGHAF_LIN_PARAM_EVENT 

Configure LIN events reporting.

Use: AGHAF_LIN_Event
Default: AGHAF_LIN_EVENT_STANDARD

AGHAF_LIN_PARAM_VERSION 

LIN version.

Use: AGHAF_LIN_Version
Default: AGHAF_LIN_VERSION_2

AGHAF_LIN_PARAM_MODE 

LIN mode settings.

Use: AGHAF_LIN_Mode
Default: AGHAF_LIN_MODE_SLAVE

AGHAF_LIN_PARAM_BAUDRATE 

Baudrate in bps.

Min: 1000 bps (1 kbps)
Max: 20000 bps (20 kbps)
Default: 19200 bps

AGHAF_LIN_PARAM_WAKEUP_COUNT 

Enable a re-transmission of the wake up if no break field is received.
Slave only.

Min: 0 (no re-transmission)
Max: 255
Default: 2

AGHAF_LIN_PARAM_WAKEUP_DELAY 

Delay to wait for a break field before wake up re-transmission.
Slave only.

Min: 150 ms
Max: 250 ms
Default: 150 ms

AGHAF_LIN_PARAM_TIME_BASE 

Configure the time base used by the schedule tables.
Master only.

Min: 1 ms
Max: 100 ms
Default: 5 ms

◆ AGHAF_LIN_ScheduleKind

Schedule kind.

Enumerator
AGHAF_LIN_SCHEDULE_KIND_ONCE 

Schedule table run once.

AGHAF_LIN_SCHEDULE_KIND_LOOP 

Schedule table run in loop.

◆ AGHAF_LIN_Version

Possible version for LIN.

Enumerator
AGHAF_LIN_VERSION_1 

LIN version 1.3.

AGHAF_LIN_VERSION_2 

LIN version 2.x.