AM263Px MCU+ SDK: sci_lin.h File Reference

| AM263Px MCU+ SDK 26.00.00 |

Data Structures
sci_lin.h File Reference
APIs for SOC Specific Device Drivers » APIs for LIN HLD

## Introduction

This file contains the prototype of LIN driver APIs.

Go to the source code of this file.

## Data Structures
struct | LIN_HwAttrs
struct | LIN_BaudConfigParams
struct | LIN_SCI_Frame
| LIN Frame Structure. More...
struct | LIN_SciConfigParams
struct | LIN_LinConfigParams
struct | LIN_OpenParams
struct | LIN_Object
struct | LIN_Config
| LIN Global Configuration. More...

## Typedefs
typedef struct LIN_Config_ts * | LIN_Handle
| A handle that is returned from a LIN_open() call. More...
typedef void * | LIN_DmaChConfig
typedef void * | LIN_DmaHandle
LIN Baud Configuration Parameters
Data structure defines the Baud Rate configuration parameters.
typedef void(* | LIN_IdMatchCallbackFxn) (LIN_Handle handle, LIN_SCI_Frame *frame)
| The definition of a callback function used by the LIN driver when used in LIN_TRANSFER_MODE_CALLBACK. More...
typedef void(* | LIN_TransferCompleteCallbackFxn) (LIN_Handle handle, LIN_SCI_Frame *frame)
| The definition of a callback function used by the LIN driver when used in LIN_TRANSFER_MODE_CALLBACK. More...

## Enumerations
LIN/SCI Operational Mode
Enumeration defines the Operational Modes.
enum | LIN_OperationalMode { LIN_OPER_MODE_POLLING = 0x00U, LIN_OPER_MODE_INTERRUPT = 0x01U, LIN_OPER_MODE_DMA = 0x02U }
LIN/SCI Transfer Mode
Enumeration defines the Transfer Modes.
enum | LIN_TransferMode { LIN_TRANSFER_MODE_BLOCKING = 0x00U, LIN_TRANSFER_MODE_CALLBACK = 0x01U }
LIN Module Operational Mode
Enumeration defines the Operational Modes of LIN [ LIN / SCI ]
enum | LIN_HLD_ModuleMode { LIN_MODULE_OP_MODE_LIN = 0x01U, LIN_MODULE_OP_MODE_SCI = 0x00U }
LIN Operational Mode
Enumeration defines the LIN Mode to operate in. [ COMMANDER / RESPONDER ]
enum | LIN_HLD_LinMode { LIN_MODE_HLD_LIN_COMMANDER = 0x01U, LIN_MODE_HLD_LIN_RESPONDER = 0x00U }
LIN COMM Mode
Enumeration defines the Comm Mode options for LIN & SCI Mode.
enum | LIN_HLD_CommMode { LIN_COMM_HLD_LIN_ID4ID5LENCTL = 0x01U, LIN_COMM_HLD_LIN_USELENGTHVAL = 0x00U, LIN_COMM_HLD_SCI_ADDRBITMODE = 0x01U, LIN_COMM_HLD_SCI_IDLELINEMODE = 0x00U }
LIN Debug Mode
Enumeration defines the Debug Mode options.
enum | LIN_HLD_DebugMode { LIN_HLD_DEBUG_FROZEN = 0x00U, LIN_HLD_DEBUG_COMPLETE = 0x01U }
LIN Checksum Type
Enumeration defines the Checksum Type options.
enum | LIN_HLD_ChecksumType { LIN_HLD_CHECKSUM_CLASSIC = 0x00U, LIN_HLD_CHECKSUM_ENHANCED = 0x01U }
LIN Mask Filtering Type
Enumeration defines the Mask filtering Type options.
enum | LIN_HLD_MaskFilterType { LIN_HLD_MSG_FILTER_IDBYTE = 0x00U, LIN_HLD_MSG_FILTER_IDRESPONDER = 0x01U }
LIN SCI Parity Type
Enumeration defines the Parity Type options.
enum | LIN_HLD_SCIParityType { LIN_HLD_SCI_PARITY_ODD = 0x00U, LIN_HLD_SCI_PARITY_EVEN = 0x01U }
LIN SCI Stop Bits
Enumeration defines the Stop Bits options.
enum | LIN_HLD_SCIStopBits { LIN_HLD_SCI_STOP_BITS_1 = 0x00U, LIN_HLD_SCI_STOP_BITS_2 = 0x01U }
Module LoopBack Mode
Enumeration defines the Loopback Mode options.
enum | LIN_HLD_LoopbackMode { LIN_HLD_LOOPBACK_INTERNAL = 0x00U, LIN_HLD_LOOPBACK_EXTERNAL = 0x01U }
Module LoopBack type
Enumeration defines the Loopback Type options.
enum | LIN_HLD_LoopbackType { LIN_HLD_LOOPBACK_DIGITAL = 0x00U, LIN_HLD_LOOPBACK_ANALOG = 0x01U }
Module LoopBack Path in Analog loopback Mode
Enumeration defines the Loopback path Type options.
enum | LIN_HLD_LoopbackPath { LIN_HLD_ANALOG_LOOP_TX = 0x00U, LIN_HLD_ANALOG_LOOP_RX = 0x01U }
LIN Commander Mode Sync Delimiter
Enumeration defines LIN Commander Mode Sync Break field Length.
enum | LIN_HLD_Sync_Delimiter { LIN_HLD_SYNC_DELIMITER_LEN_1 = 0x0U, LIN_HLD_SYNC_DELIMITER_LEN_2 = 0x1U, LIN_HLD_SYNC_DELIMITER_LEN_3 = 0x2U, LIN_HLD_SYNC_DELIMITER_LEN_4 = 0x3U }
enum | LIN_HLD_Sync_Break { LIN_HLD_SYNC_BREAK_LEN_13 = 0x0U, LIN_HLD_SYNC_BREAK_LEN_14 = 0x1U, LIN_HLD_SYNC_BREAK_LEN_15 = 0x2U, LIN_HLD_SYNC_BREAK_LEN_16 = 0x3U, LIN_HLD_SYNC_BREAK_LEN_17 = 0x4U, LIN_HLD_SYNC_BREAK_LEN_18 = 0x5U, LIN_HLD_SYNC_BREAK_LEN_19 = 0x6U, LIN_HLD_SYNC_BREAK_LEN_20 = 0x7U }
LIN/SCI Transaction Status
Enumeration defines LIN/SCI Transaction Status.
enum | LIN_HLD_Txn_Status { LIN_HLD_TXN_STS_SUCCESS = 0x00U, LIN_HLD_TXN_STS_FAILURE = 0x01U, LIN_HLD_TXN_STS_TIMEOUT = 0x02U, LIN_HLD_TXN_PHY_BUS_ERR = 0x03U, LIN_HLD_TXN_FRAMING_ERR = 0x04U, LIN_HLD_TXN_OVERRUN_ERR = 0x05U, LIN_HLD_TXN_PARITY_ERR = 0x06U, LIN_HLD_TXN_CHECKSUM_ERR = 0x07U, LIN_HLD_TXN_NO_RES_ERR = 0x08U, LIN_HLD_TXN_BIT_ERR = 0x09U }
LIN/SCI Transaction Type
Enumeration defines LIN/SCI Transaction Types.
enum | LIN_HLD_Txn_Type { LIN_HLD_TXN_TYPE_WRITE = 0x00U, LIN_HLD_TXN_TYPE_READ = 0x01U }
LIN/SCI Driver State
Enumeration defines LIN/SCI Driver States.
enum | LIN_HLD_State { LIN_HLD_STATE_RESET = (uint8_t)0U, LIN_HLD_STATE_IDLE = (uint8_t)1U, LIN_HLD_STATE_BUSY = (uint8_t)2U, LIN_HLD_STATE_ERROR = (uint8_t)3U }

## Functions
LIN Object
SCI/LIN object Used by the Driver. The application must not access any member variables of this Structure.
void | LIN_init (void)
| Initialize each driver instance object and create driver lock. More...
void | LIN_deinit (void)
| De-initialize each driver instance object and delete driver lock. More...
void | LIN_Params_init (LIN_OpenParams *openParams)
| API to initialize the LIN_OpenParams struct to its defaults. More...
LIN_Handle | LIN_open (uint32_t index, LIN_OpenParams *openParams)
| API to Open a given LIN Instance. More...
void | LIN_close (LIN_Handle handle)
| API to Close the LIN Instance specified by the handle. More...
void | LIN_SCI_Frame_init (LIN_SCI_Frame *frame)
| API to set default values of LIN_SCI_Frame in frame. More...
int32_t | LIN_SCI_transferFrame (LIN_Handle handle, LIN_SCI_Frame *frame)
| API to initiate a LIN/SCI frame transfer. More...
LIN_Handle | LIN_getHandle (uint32_t index)
| API to get the handle of an open LIN instance from the instance index. More...