6 File Documentation

Information on the LIN Responder Library APIs grouped per file.

6.1 source/lin_app.h File Reference

#include "lin_config.h"

6.1.1 Functions

6.1.4 Detailed Description

LIN Application Header File

6.2 source/lin_config.h File Reference

#include "lin_responder.h"

6.2.1 Data structures

  • union frame1_t

    Type definition of the Frame1 frame and signal data.

  • union frame2_t

    Type definition of the Frame2 frame and signal data.

  • union frame3_t

    Type definition of the Frame3 frame and signal data.

6.2.2 Functions

6.2.6 Typedefs

6.2.6.1 Data Type Definitions

6.2.7 Enumerations

6.2.9 Detailed Description

LIN Configuration Header File

6.2.10 Macro Definition Documentation

6.2.10.1 LIN_CHECKSUM_TYPE

#define LIN_CHECKSUM_TYPE "Enhanced"

6.2.10.2 LIN_CONFIG_NAD

#define LIN_CONFIG_NAD "0xFF"

6.2.10.3 LIN_PRODUCT_ID

#define LIN_PRODUCT_ID "0x0,0x0,255"

6.2.10.4 LIN_PROTOCOL

#define LIN_PROTOCOL "2.0"

6.3 source/lin_hal.h File Reference

#include "lin_uart_interface.h"
#include "lin_timer_interface.h"

6.3.2 Detailed Description

LIN Hardware Abstraction Layer (HAL) Header File

6.3.3 Variable Documentation

6.3.3.1 LIN_TIMER

struct LIN_TIMER_INTERFACE LIN_TIMER

6.3.3.2 LIN_UART

struct LIN_UART_INTERFACE LIN_UART

6.4 source/lin_responder.h File Reference

#include <stdint.h>
#include <stdbool.h>
#include <string.h>

6.4.1 Data structures

  • struct lin_rx_cmd_t

    Structure for a received LIN command.

  • struct lin_packet_t

    Structure for a LIN packet.

  • struct lin_pid_t

    Structure for the LIN Protected Identifier (PID).

6.4.2 Functions

6.4.3 Macros

6.4.4 Enumerations

6.4.5 Detailed Description

LIN Responder Header File

6.5 source/lin_signals.h File Reference

This file contains macros for the LIN signals.

6.5.3 Detailed Description

This file contains macros for the LIN signals.

LIN Signals Header File

Version: LIN Responder Library Version 1.0.0 Package Version 1.0.0

6.6 source/lin_timer.h File Reference

This file contains the prototypes for the LIN Responder’s Timer functions.

#include <stdint.h>
#include <stdbool.h>

6.6.2 Detailed Description

This file contains the prototypes for the LIN Responder’s Timer functions.

LIN Timer Header File

Version: LIN Responder Library Version 1.0.0 Package Version 1.0.0

6.7 source/lin_timer_interface.h File Reference

#include <stdint.h>
#include <stdbool.h>

6.7.1 Data structures

  • struct LIN_TIMER_INTERFACE

    Structure of function pointers for the LIN Responder’s Timer functions.

6.7.2 Detailed Description

LIN Timer Interface Header File

6.8 source/lin_uart.h File Reference

This file contains the prototypes for the LIN Responder’s Universal Asynchronous Receiver and Transmitter (UART) functions.

#include <stdint.h>
#include <stdbool.h>

6.8.1 Functions

6.8.2 Detailed Description

This file contains the prototypes for the LIN Responder’s Universal Asynchronous Receiver and Transmitter (UART) functions.

LIN UART Header File

Version: LIN Responder Library Version 1.0.0 Package Version 1.0.0

6.9 source/lin_uart_interface.h File Reference

#include <stdint.h>
#include <stdbool.h>

6.9.1 Data structures

  • struct LIN_UART_INTERFACE

    Structure of function pointers for the LIN Responder’s UART functions.

6.9.2 Detailed Description

LIN UART Interface Header File

6.10 source/misra_pages/misra_project_deviations.txt File Reference

6.11 source/misra_pages/misra_supported_rules.txt File Reference

6.12 source/src/lin_app.c File Reference

This file contains the implementation of the LIN application APIs.

#include "../lin_app.h"
#include "../lin_signals.h"

6.12.1 Functions

6.12.2 Detailed Description

This file contains the implementation of the LIN application APIs.

LIN Application Source File

Version: LIN Responder Library Version 1.0.0 Package Version 1.0.0

6.13 source/src/lin_config.c File Reference

This file contains the implementation of LIN Responder configurations.

#include "../lin_config.h"

6.13.1 Functions

6.13.2 Variables

6.13.3 Detailed Description

This file contains the implementation of LIN Responder configurations.

LIN Configuration Source File

Version: LIN Responder Library Version 1.0.0 Package Version 1.0.0

6.13.4 Function Documentation

6.13.4.1 FRAME1_DefaultCallback()

void FRAME1_DefaultCallback (void )[static]

6.13.4.2 FRAME2_DefaultCallback()

void FRAME2_DefaultCallback (void )[static]

6.13.4.3 FRAME3_DefaultCallback()

void FRAME3_DefaultCallback (void )[static]

6.13.5 Variable Documentation

6.13.5.1 FRAME1_AppHandler

void(* FRAME1_AppHandler) (void) = FRAME1_DefaultCallback[static]

6.13.5.2 FRAME2_AppHandler

void(* FRAME2_AppHandler) (void) = FRAME2_DefaultCallback[static]

6.13.5.3 FRAME3_AppHandler

void(* FRAME3_AppHandler) (void) = FRAME3_DefaultCallback[static]

6.14 source/src/lin_hal.c File Reference

This file contains the implementation of the LIN Responder HAL interfaces.

#include <stddef.h>
#include "../lin_hal.h"
#include "../lin_uart.h"
#include "../lin_timer.h"

6.14.2 Detailed Description

This file contains the implementation of the LIN Responder HAL interfaces.

LIN Hardware Abstraction Layer (HAL) Source File

Version: LIN Responder Library Version 1.0.0 Package Version 1.0.0

6.14.3 Variable Documentation

6.14.3.2 LIN_UART

struct LIN_UART_INTERFACE LIN_UART

Initial value:

= {
    .Read = LINRESP_Read,
    .IsRxReady = LINRESP_IsRxReady,
    .Write = LINRESP_Write,
    .RxInitialize = LINRESP_RxInitialize,
    .RxDeinitialize = LINRESP_RxDeinitialize,
    .TxInterruptEnable = LINRESP_TxInterruptEnable,
    .TxInterruptDisable = LINRESP_TxInterruptDisable,
    .IsFramingError = LINRESP_IsFramingError,
    .IsBreakReceived = LINRESP_IsBreakReceived,
    .IsSyncValid = LINRESP_IsSyncValid,
    .RxCompleteCallbackRegister = LINRESP_RxCompleteCallbackRegister,
    .TxCompleteCallbackRegister = LINRESP_TxCompleteCallbackRegister,
    .FramingErrorCallbackRegister = LINRESP_FramingErrorCallbackRegister
}

6.15 source/src/lin_responder.c File Reference

This file contains the API implementation for the LIN Responder.

#include "../lin_responder.h"
#include "../lin_hal.h"

6.15.1 Functions

6.15.2 Macros

  • #define CLEAR_PARITY_BITS (0x3FU)

    Defines the mask value to clear the PID parity bits.

6.15.3 Variables

6.15.4 Detailed Description

This file contains the API implementation for the LIN Responder.

LIN Responder Source File

Version: LIN Responder Library Version 1.0.0 Package Version 1.0.0

6.15.5 Function Documentation

6.15.5.1 LINRESP_BreakReceive()

void LINRESP_BreakReceive (void )[static]

6.15.5.2 LINRESP_BrkErrDefaultCallback()

void LINRESP_BrkErrDefaultCallback (void )[static]

6.15.5.3 LINRESP_ChecksumErrDefaultCallback()

void LINRESP_ChecksumErrDefaultCallback (void )[static]

6.15.5.4 LINRESP_ChecksumErrStatusGet()

lin_rx_status_t LINRESP_ChecksumErrStatusGet (void )[static]

6.15.5.5 LINRESP_ChecksumGet()

uint8_t LINRESP_ChecksumGet (uint8_t length, uint8_t pid, const uint8_t * data)[static]

6.15.5.6 LINRESP_ChecksumReadback()

void LINRESP_ChecksumReadback (void )[static]

6.15.5.7 LINRESP_ChecksumReceive()

void LINRESP_ChecksumReceive (void )[static]

6.15.5.8 LINRESP_ChecksumTransmit()

void LINRESP_ChecksumTransmit (void )[static]

6.15.5.9 LINRESP_ChecksumTxRx()

void LINRESP_ChecksumTxRx (void )[static]

6.15.5.10 LINRESP_DataByteReceive()

void LINRESP_DataByteReceive (void )[static]

6.15.5.11 LINRESP_DataByteTransmit()

void LINRESP_DataByteTransmit (void )[static]

6.15.5.12 LINRESP_DataByteTxRx()

void LINRESP_DataByteTxRx (void )[static]

6.15.5.13 LINRESP_DataReadback()

void LINRESP_DataReadback (void )[static]

6.15.5.14 LINRESP_ErrorSetDefaultCallback()

void LINRESP_ErrorSetDefaultCallback (void )[static]

6.15.5.15 LINRESP_FramingErrCallback()

void LINRESP_FramingErrCallback (void )[static]

6.15.5.16 LINRESP_FramingErrDefaultCallback()

void LINRESP_FramingErrDefaultCallback (void )[static]

6.15.5.17 LINRESP_GeneralErrHandler()

void LINRESP_GeneralErrHandler (lin_rx_status_t error)[static]

6.15.5.18 LINRESP_NoRespErrDefaultCallback()

void LINRESP_NoRespErrDefaultCallback (void )[static]

6.15.5.19 LINRESP_PacketGet()

uint8_t LINRESP_PacketGet (uint8_t * data)[static]

6.15.5.20 LINRESP_PacketQueue()

void LINRESP_PacketQueue (uint8_t cmd)[static]

6.15.5.21 LINRESP_ParityCalculate()

uint8_t LINRESP_ParityCalculate (uint8_t cmd)[static]

6.15.5.22 LINRESP_PidCheck()

bool LINRESP_PidCheck (uint8_t pid)[static]

6.15.5.23 LINRESP_PidErrDefaultCallback()

void LINRESP_PidErrDefaultCallback (void )[static]

6.15.5.24 LINRESP_PidErrStatusGet()

lin_rx_status_t LINRESP_PidErrStatusGet (void )[static]

6.15.5.25 LINRESP_PidReceive()

void LINRESP_PidReceive (void )[static]

6.15.5.26 LINRESP_ReadbackErrDefaultCallback()

void LINRESP_ReadbackErrDefaultCallback (void )[static]

6.15.5.27 LINRESP_SchedTableDataGet()

uint8_t LINRESP_SchedTableDataGet (uint8_t cmd, lin_sched_param_t param)[static]

6.15.5.28 LINRESP_SchedTableDataUpdate()

bool LINRESP_SchedTableDataUpdate (uint8_t cmd)[static]

6.15.5.29 LINRESP_ShortRespErrDefaultCallback()

void LINRESP_ShortRespErrDefaultCallback (void )[static]

6.15.5.30 LINRESP_StateReset()

void LINRESP_StateReset (void )[static]

6.15.5.31 LINRESP_SyncErrDefaultCallback()

void LINRESP_SyncErrDefaultCallback (void )[static]

6.15.5.32 LINRESP_SyncReceive()

void LINRESP_SyncReceive (void )[static]

6.15.5.33 LINRESP_TimeoutCallback()

void LINRESP_TimeoutCallback (void )[static]

6.15.5.34 LINRESP_TimeoutCheck()

void LINRESP_TimeoutCheck (void )[static]

Section: Local Function Declarations

Section: Local Function Definitions

6.15.6 Variable Documentation

6.15.6.1 linChecksumType

lin_checksum_t linChecksumType = ENHANCED[static]

6.15.6.2 linErrorState

lin_rx_status_t linErrorState = LIN_NO_ERROR[static]

6.15.6.3 linPacket

lin_packet_t linPacket[static]

6.15.6.4 LINRESP_BrkErrHandler

void(* LINRESP_BrkErrHandler) (void) = NULL[static]

6.15.6.5 LINRESP_ChecksumErrHandler

void(* LINRESP_ChecksumErrHandler) (void) = NULL[static]

6.15.6.6 LINRESP_ErrorSetHandler

void(* LINRESP_ErrorSetHandler) (void) = NULL[static]

6.15.6.7 LINRESP_FramingErrHandler

void(* LINRESP_FramingErrHandler) (void) = NULL[static]

6.15.6.8 LINRESP_NoRespErrHandler

void(* LINRESP_NoRespErrHandler) (void) = NULL[static]

6.15.6.9 LINRESP_PidErrHandler

void(* LINRESP_PidErrHandler) (void) = NULL[static]

6.15.6.10 LINRESP_ReadbackErrHandler

void(* LINRESP_ReadbackErrHandler) (void) = NULL[static]

6.15.6.11 LINRESP_RxTxDataProcess

void(* LINRESP_RxTxDataProcess) (void) = NULL[static]

6.15.6.12 LINRESP_ShortRespErrHandler

void(* LINRESP_ShortRespErrHandler) (void) = NULL[static]

6.15.6.13 LINRESP_SyncErrHandler

void(* LINRESP_SyncErrHandler) (void) = NULL[static]

6.15.6.14 linRespInProgress

bool linRespInProgress = false[static]

6.15.6.15 linRxCommand

lin_rx_cmd_t* linRxCommand[static]

6.15.6.16 linRxCommandLength

uint8_t linRxCommandLength[static]

6.15.6.17 linState

lin_rx_state_t linState = LIN_RX_IDLE[static]

6.15.6.18 rxDataIndex

uint8_t rxDataIndex = 0[static]

6.15.6.19 txDataIndex

uint8_t txDataIndex = 0[static]

6.16 source/src/lin_timer.c File Reference

This file contains the implementation for the LIN Responder Timer functions.

#include "../lin_timer.h"
#include "../../../mcc_generated_files/timer/tmr0.h"

6.16.1 Functions

6.16.3 Detailed Description

This file contains the implementation for the LIN Responder Timer functions.

LIN Timer Source File

Version: LIN Responder Library Version 1.0.0 Package Version 1.0.0

6.16.4 Function Documentation

6.16.4.1 LINRESP_TimeoutDefaultCallback()

void LINRESP_TimeoutDefaultCallback (void )

6.16.5 Variable Documentation

6.16.5.1 countCallback

volatile uint8_t countCallback = 0[static]

6.16.5.2 LINRESP_TimeoutHandler

void(* LINRESP_TimeoutHandler) (void) = NULL

6.16.5.3 linTimeout

uint8_t linTimeout = 10[static]

6.16.5.4 linTimerRunning

bool linTimerRunning = false[static]

6.17 source/src/lin_uart.c File Reference

This file contains the implementation for the LIN Responder UART functions.

#include "../lin_uart.h"
#include "../../../mcc_generated_files/uart/eusart1.h"

6.17.1 Functions

6.17.4 Detailed Description

This file contains the implementation for the LIN Responder UART functions.

LIN UART Source File

Version: LIN Responder Library Version 1.0.0 Package Version 1.0.0

6.17.5 Function Documentation

6.17.5.1 LINRESP_FramingErrorDefaultCallback()

void LINRESP_FramingErrorDefaultCallback (void )[static]

6.17.5.2 LINRESP_RxCompleteIntDefaultCallback()

void LINRESP_RxCompleteIntDefaultCallback (void )[static]

6.17.5.3 LINRESP_TxCompleteDefaultCallback()

void LINRESP_TxCompleteDefaultCallback (void )[static]

6.17.6 Macro Definition Documentation

6.17.6.1 BREAK_VALUE

#define BREAK_VALUE 0x00U

6.17.6.2 SYNC_VALUE

#define SYNC_VALUE 0x55U

6.17.7 Variable Documentation

6.17.7.1 frameError

bool frameError = false[static]

6.17.7.2 LINRESP_FramingErrorHandler

void(* LINRESP_FramingErrorHandler) (void) = NULL[static]

6.17.7.3 LINRESP_RxCompleteInterruptHandler

void(* LINRESP_RxCompleteInterruptHandler) (void) = NULL[static]

6.17.7.4 rxData

volatile uint8_t rxData = 0[static]