AM261x MCU+ SDK: sci_lin.h Source File

| AM261x MCU+ SDK 26.00.00 |

sci_lin.h
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2025 Texas Instruments Incorporated
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the
14 * distribution.
15 *
16 * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
51 #ifndef SCI_LIN_V0_H_
52 #define SCI_LIN_V0_H_
53
54 /* ========================================================================== */
55 /* Include Files */
56 /* ========================================================================== */
57
58 #include <stdint.h>
59 #include <stdbool.h>
60 #include <stddef.h>
61 #include <stdlib.h>
62 #include <string.h>
63 #include <kernel/dpl/SystemP.h>
64 #include <kernel/dpl/SemaphoreP.h>
65 #include <kernel/dpl/HwiP.h>
66 #include <drivers/hw_include/cslr.h>
67 #include <drivers/hw_include/cslr_soc.h>
68 #include <drivers/hw_include/cslr_lin.h>
69 #include <drivers/hw_include/hw_types.h>
70 #include <kernel/dpl/CacheP.h>
71
72 #ifdef __cplusplus
73 extern "C" {
74 #endif
75
76 /* ========================================================================== */
77 /* Macros & Typedefs */
78 /* ========================================================================== */
79
83 typedef struct LIN_Config_ts *LIN_Handle;
84
85 typedef void *LIN_DmaChConfig;
86
87 typedef void *LIN_DmaHandle;
88
89 /* ========================================================================== */
90 /* Enums */
91 /* ========================================================================== */
92
101 typedef enum
102 {
103 LIN_OPER_MODE_POLLING = 0x00U,
105 LIN_OPER_MODE_INTERRUPT = 0x01U,
107 LIN_OPER_MODE_DMA = 0x02U
110 } LIN_OperationalMode;
111
122 typedef enum
123 {
124 LIN_TRANSFER_MODE_BLOCKING = 0x00U,
126 LIN_TRANSFER_MODE_CALLBACK = 0x01U
129 } LIN_TransferMode;
130
141 typedef enum
142 {
143 LIN_MODULE_OP_MODE_LIN = 0x01U,
145 LIN_MODULE_OP_MODE_SCI = 0x00U
148 } LIN_HLD_ModuleMode;
149
160 typedef enum
161 {
162 LIN_MODE_HLD_LIN_COMMANDER = 0x01U,
164 LIN_MODE_HLD_LIN_RESPONDER = 0x00U
167 } LIN_HLD_LinMode;
168
179 typedef enum
180 {
181 LIN_COMM_HLD_LIN_ID4ID5LENCTL = 0x01U,
183 LIN_COMM_HLD_LIN_USELENGTHVAL = 0x00U,
186 LIN_COMM_HLD_SCI_ADDRBITMODE = 0x01U,
188 LIN_COMM_HLD_SCI_IDLELINEMODE = 0x00U
191 } LIN_HLD_CommMode;
192
203 typedef enum
204 {
205 LIN_HLD_DEBUG_FROZEN = 0x00U,
207 LIN_HLD_DEBUG_COMPLETE = 0x01U
210 } LIN_HLD_DebugMode;
211
222 typedef enum
223 {
224 LIN_HLD_CHECKSUM_CLASSIC = 0x00U,
226 LIN_HLD_CHECKSUM_ENHANCED = 0x01U
229 } LIN_HLD_ChecksumType;
230
241 typedef enum
242 {
243 LIN_HLD_MSG_FILTER_IDBYTE = 0x00U,
245 LIN_HLD_MSG_FILTER_IDRESPONDER = 0x01U
249 } LIN_HLD_MaskFilterType;
250
261 typedef enum
262 {
263 LIN_HLD_SCI_PARITY_ODD = 0x00U,
265 LIN_HLD_SCI_PARITY_EVEN = 0x01U
268 } LIN_HLD_SCIParityType;
269
280 typedef enum
281 {
282 LIN_HLD_SCI_STOP_BITS_1 = 0x00U,
284 LIN_HLD_SCI_STOP_BITS_2 = 0x01U
287 } LIN_HLD_SCIStopBits;
288
299 typedef enum
300 {
301 LIN_HLD_LOOPBACK_INTERNAL = 0x00U,
303 LIN_HLD_LOOPBACK_EXTERNAL = 0x01U
306 } LIN_HLD_LoopbackMode;
307
318 typedef enum
319 {
320 LIN_HLD_LOOPBACK_DIGITAL = 0x00U,
322 LIN_HLD_LOOPBACK_ANALOG = 0x01U
325 } LIN_HLD_LoopbackType;
326
337 typedef enum
338 {
339
340 LIN_HLD_ANALOG_LOOP_TX = 0x00U,
342 LIN_HLD_ANALOG_LOOP_RX = 0x01U
345 } LIN_HLD_LoopbackPath;
346
358 typedef enum
359 {
360 LIN_HLD_SYNC_DELIMITER_LEN_1 = 0x0U,
362 LIN_HLD_SYNC_DELIMITER_LEN_2 = 0x1U,
364 LIN_HLD_SYNC_DELIMITER_LEN_3 = 0x2U,
366 LIN_HLD_SYNC_DELIMITER_LEN_4 = 0x3U,
369 } LIN_HLD_Sync_Delimiter;
370
381 typedef enum
382 {
383 LIN_HLD_SYNC_BREAK_LEN_13 = 0x0U,
385 LIN_HLD_SYNC_BREAK_LEN_14 = 0x1U,
387 LIN_HLD_SYNC_BREAK_LEN_15 = 0x2U,
389 LIN_HLD_SYNC_BREAK_LEN_16 = 0x3U,
391 LIN_HLD_SYNC_BREAK_LEN_17 = 0x4U,
393 LIN_HLD_SYNC_BREAK_LEN_18 = 0x5U,
395 LIN_HLD_SYNC_BREAK_LEN_19 = 0x6U,
397 LIN_HLD_SYNC_BREAK_LEN_20 = 0x7U,
400 } LIN_HLD_Sync_Break;
401
412 typedef enum
413 {
414 LIN_HLD_TXN_STS_SUCCESS = 0x00U,
416 LIN_HLD_TXN_STS_FAILURE = 0x01U,
418 LIN_HLD_TXN_STS_TIMEOUT = 0x02U,
420 LIN_HLD_TXN_PHY_BUS_ERR = 0x03U,
422 LIN_HLD_TXN_FRAMING_ERR = 0x04U,
424 LIN_HLD_TXN_OVERRUN_ERR = 0x05U,
426 LIN_HLD_TXN_PARITY_ERR = 0x06U,
428 LIN_HLD_TXN_CHECKSUM_ERR = 0x07U,
430 LIN_HLD_TXN_NO_RES_ERR = 0x08U,
432 LIN_HLD_TXN_BIT_ERR = 0x09U,
435 } LIN_HLD_Txn_Status;
436
447 typedef enum
448 {
449 LIN_HLD_TXN_TYPE_WRITE = 0x00U,
451 LIN_HLD_TXN_TYPE_READ = 0x01U,
454 } LIN_HLD_Txn_Type;
455
466 typedef enum
467 {
468 LIN_HLD_STATE_RESET = (uint8_t)0U,
470 LIN_HLD_STATE_IDLE = (uint8_t)1U,
472 LIN_HLD_STATE_BUSY = (uint8_t)2U,
474 LIN_HLD_STATE_ERROR = (uint8_t)3U,
477 } LIN_HLD_State;
478
481 /* ========================================================================== */
482 /* Structure Declarations */
483 /* ========================================================================== */
484
491 typedef struct LIN_HwAttrs_ts
492 {
494 uint32_t baseAddr;
496 uint32_t intrNum0;
498 uint32_t intrNum1;
501 LIN_OperationalMode opMode;
503 uint8_t intrPriority;
506 LIN_HLD_DebugMode debugMode;
508 uint32_t linClk;
510 bool enableLoopback;
513 LIN_HLD_LoopbackMode loopBackMode;
516 LIN_HLD_LoopbackType loopBackType;
517
518 } LIN_HwAttrs;
519
526 typedef struct LIN_BaudConfigParams_ts
527 {
529 uint32_t preScaler;
537 uint8_t fracDivSel_M;
544 uint8_t supFracDivSel_U;
545
546 } LIN_BaudConfigParams;
547
551 typedef struct LIN_SCI_Frame_ts
552 {
556 uint8_t id;
558 uint8_t frameLen;
560 void *dataBuf;
562 LIN_HLD_Txn_Type txnType;
564 uint32_t timeout;
566 LIN_HLD_Txn_Status status;
568 void *args;
569
570 } LIN_SCI_Frame;
571
572 /* ========================================================================== */
573 /* Function Pointers Declarations */
574 /* ========================================================================== */
575
583 typedef void (*LIN_IdMatchCallbackFxn) (LIN_Handle handle,
584 LIN_SCI_Frame *frame);
585
593 typedef void (*LIN_TransferCompleteCallbackFxn) (LIN_Handle handle,
594 LIN_SCI_Frame *frame);
595
596 /* ========================================================================== */
597 /* Structure Declarations */
598 /* ========================================================================== */
599
606 typedef struct LIN_SciConfigParams_ts
607 {
611 LIN_HLD_SCIParityType parityType;
615 LIN_HLD_SCIStopBits stopBits;
617 uint8_t dataBits;
619 LIN_TransferCompleteCallbackFxn transferCompleteCallbackFxn;
620
621 } LIN_SciConfigParams;
622
629 typedef struct LIN_LinConfigParams_ts
630 {
633 LIN_HLD_LinMode linMode;
636 LIN_HLD_MaskFilterType maskFilteringType;
638 uint8_t linTxMask;
640 uint8_t linRxMask;
643 LIN_HLD_ChecksumType checksumType;
647 bool adaptModeEnable;
649 uint32_t maxBaudRate;
651 LIN_HLD_Sync_Delimiter syncDelimiter;
653 LIN_HLD_Sync_Break syncBreak;
655 LIN_IdMatchCallbackFxn idMatchCallbackFxn;
657 LIN_TransferCompleteCallbackFxn transferCompleteCallbackFxn;
658
659 } LIN_LinConfigParams;
660
669 typedef struct LIN_OpenParams_ts
670 {
673 LIN_TransferMode transferMode;
676 LIN_HLD_ModuleMode moduleMode;
680 bool enableParity;
683 LIN_HLD_CommMode commMode;
687 bool multiBufferMode;
690 LIN_BaudConfigParams baudConfigParams;
693 LIN_SciConfigParams sciConfigParams;
696 LIN_LinConfigParams linConfigParams;
697
698 } LIN_OpenParams;
699
707 typedef struct LIN_Object_ts
708 {
710 SemaphoreP_Object mutex;
712 HwiP_Object hwiObj0;
714 HwiP_Object hwiObj1;
716 LIN_HLD_State state;
718 bool isOpen;
720 LIN_OpenParams *openParams;
722 LIN_DmaHandle linDmaHandle;
724 LIN_DmaChConfig dmaChCfg;
726 LIN_SCI_Frame *currentTxnFrame;
728 uint8_t *writeBufIdx;
730 uint32_t writeCountIdx;
732 uint8_t *readBufIdx __attribute__((aligned(CacheP_CACHELINE_ALIGNMENT)));
734 uint32_t readCountIdx __attribute__((aligned(CacheP_CACHELINE_ALIGNMENT)));
736 uint8_t tempBuffer[8] __attribute__((aligned(CacheP_CACHELINE_ALIGNMENT)));
739 SemaphoreP_Object writeFrmCompSemObj;
742 SemaphoreP_Object readFrmCompSemObj;
743
744 } LIN_Object;
745
756 typedef struct LIN_Config_ts
757 {
760 LIN_Object *object;
763 LIN_HwAttrs const *hwAttrs;
764
765 } LIN_Config;
766
767 /* ========================================================================== */
768 /* Function Declarations */
769 /* ========================================================================== */
770
774 void LIN_init(void);
775
779 void LIN_deinit(void);
780
787 void LIN_Params_init(LIN_OpenParams *openParams);
788
802 LIN_Handle LIN_open(uint32_t index, LIN_OpenParams *openParams);
803
813 void LIN_close(LIN_Handle handle);
814
820 void LIN_SCI_Frame_init(LIN_SCI_Frame *frame);
821
834 int32_t LIN_SCI_transferFrame(LIN_Handle handle, LIN_SCI_Frame *frame);
835
845 LIN_Handle LIN_getHandle(uint32_t index);
846
847 #ifdef __cplusplus
848 }
849 #endif
850
851 #endif /* SCI_LIN_V0_H_ */
852
LIN_HLD_Txn_Type
LIN_HLD_Txn_Type
Definition: sci_lin.h:448
LIN_TRANSFER_MODE_CALLBACK
@ LIN_TRANSFER_MODE_CALLBACK
Definition: sci_lin.h:126
LIN_HLD_SYNC_BREAK_LEN_18
@ LIN_HLD_SYNC_BREAK_LEN_18
Definition: sci_lin.h:393
LIN_HLD_SYNC_DELIMITER_LEN_1
@ LIN_HLD_SYNC_DELIMITER_LEN_1
Definition: sci_lin.h:360
LIN_HLD_LOOPBACK_ANALOG
@ LIN_HLD_LOOPBACK_ANALOG
Definition: sci_lin.h:322
LIN_SCI_Frame::timeout
uint32_t timeout
Definition: sci_lin.h:564
LIN_OpenParams::enableParity
bool enableParity
Definition: sci_lin.h:680
LIN_HLD_SCI_STOP_BITS_1
@ LIN_HLD_SCI_STOP_BITS_1
Definition: sci_lin.h:282
LIN_LinConfigParams::adaptModeEnable
bool adaptModeEnable
Definition: sci_lin.h:647
LIN_HLD_LOOPBACK_EXTERNAL
@ LIN_HLD_LOOPBACK_EXTERNAL
Definition: sci_lin.h:303
LIN_Object::openParams
LIN_OpenParams * openParams
Definition: sci_lin.h:720
LIN_HLD_STATE_RESET
@ LIN_HLD_STATE_RESET
Definition: sci_lin.h:468
LIN_getHandle
LIN_Handle LIN_getHandle(uint32_t index)
API to get the handle of an open LIN instance from the instance index.
LIN_SciConfigParams::stopBits
LIN_HLD_SCIStopBits stopBits
Definition: sci_lin.h:615
LIN_OpenParams::moduleMode
LIN_HLD_ModuleMode moduleMode
Definition: sci_lin.h:676
LIN_HLD_SCIStopBits
LIN_HLD_SCIStopBits
Definition: sci_lin.h:281
LIN_HwAttrs::opMode
LIN_OperationalMode opMode
Definition: sci_lin.h:501
LIN_HLD_TXN_STS_SUCCESS
@ LIN_HLD_TXN_STS_SUCCESS
Definition: sci_lin.h:414
LIN_HLD_TXN_PARITY_ERR
@ LIN_HLD_TXN_PARITY_ERR
Definition: sci_lin.h:426
SystemP.h
LIN_HLD_SYNC_BREAK_LEN_14
@ LIN_HLD_SYNC_BREAK_LEN_14
Definition: sci_lin.h:385
LIN_HLD_DEBUG_COMPLETE
@ LIN_HLD_DEBUG_COMPLETE
Definition: sci_lin.h:207
LIN_HLD_TXN_PHY_BUS_ERR
@ LIN_HLD_TXN_PHY_BUS_ERR
Definition: sci_lin.h:420
LIN_HLD_LOOPBACK_DIGITAL
@ LIN_HLD_LOOPBACK_DIGITAL
Definition: sci_lin.h:320
LIN_OPER_MODE_POLLING
@ LIN_OPER_MODE_POLLING
Definition: sci_lin.h:103
LIN_HLD_LinMode
LIN_HLD_LinMode
Definition: sci_lin.h:161
LIN_TransferCompleteCallbackFxn
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.
Definition: sci_lin.h:593
LIN_HwAttrs::intrNum1
uint32_t intrNum1
Definition: sci_lin.h:498
LIN_HLD_STATE_BUSY
@ LIN_HLD_STATE_BUSY
Definition: sci_lin.h:472
LIN_HLD_TXN_CHECKSUM_ERR
@ LIN_HLD_TXN_CHECKSUM_ERR
Definition: sci_lin.h:428
LIN_Object::writeCountIdx
uint32_t writeCountIdx
Definition: sci_lin.h:730
LIN_HLD_ANALOG_LOOP_RX
@ LIN_HLD_ANALOG_LOOP_RX
Definition: sci_lin.h:342
LIN_HLD_LoopbackPath
LIN_HLD_LoopbackPath
Definition: sci_lin.h:338
LIN_SCI_Frame::frameLen
uint8_t frameLen
Definition: sci_lin.h:558
LIN_HwAttrs::linClk
uint32_t linClk
Definition: sci_lin.h:508
LIN_OPER_MODE_INTERRUPT
@ LIN_OPER_MODE_INTERRUPT
Definition: sci_lin.h:105
LIN_Object::writeBufIdx
uint8_t * writeBufIdx
Definition: sci_lin.h:728
LIN_HLD_Sync_Delimiter
LIN_HLD_Sync_Delimiter
Definition: sci_lin.h:359
LIN_Object::hwiObj1
HwiP_Object hwiObj1
Definition: sci_lin.h:714
LIN_HLD_SYNC_BREAK_LEN_13
@ LIN_HLD_SYNC_BREAK_LEN_13
Definition: sci_lin.h:383
LIN_HLD_TXN_FRAMING_ERR
@ LIN_HLD_TXN_FRAMING_ERR
Definition: sci_lin.h:422
LIN_HLD_MSG_FILTER_IDBYTE
@ LIN_HLD_MSG_FILTER_IDBYTE
Definition: sci_lin.h:243
LIN_Object::mutex
SemaphoreP_Object mutex
Definition: sci_lin.h:710
LIN_HLD_STATE_IDLE
@ LIN_HLD_STATE_IDLE
Definition: sci_lin.h:470
LIN_init
void LIN_init(void)
Initialize each driver instance object and create driver lock.
LIN_HLD_MSG_FILTER_IDRESPONDER
@ LIN_HLD_MSG_FILTER_IDRESPONDER
Definition: sci_lin.h:245
LIN_Object::__attribute__
uint8_t *readBufIdx __attribute__((aligned(CacheP_CACHELINE_ALIGNMENT)))
SemaphoreP.h
LIN_Object::hwiObj0
HwiP_Object hwiObj0
Definition: sci_lin.h:712
LIN_HwAttrs
Definition: sci_lin.h:492
LIN_OpenParams
Definition: sci_lin.h:670
LIN_LinConfigParams::linTxMask
uint8_t linTxMask
Definition: sci_lin.h:638
LIN_HLD_LoopbackMode
LIN_HLD_LoopbackMode
Definition: sci_lin.h:300
LIN_HLD_SCI_PARITY_EVEN
@ LIN_HLD_SCI_PARITY_EVEN
Definition: sci_lin.h:265
LIN_LinConfigParams::transferCompleteCallbackFxn
LIN_TransferCompleteCallbackFxn transferCompleteCallbackFxn
Definition: sci_lin.h:657
LIN_HwAttrs::loopBackType
LIN_HLD_LoopbackType loopBackType
Definition: sci_lin.h:516
LIN_Object::currentTxnFrame
LIN_SCI_Frame * currentTxnFrame
Definition: sci_lin.h:726
LIN_Object::__attribute__
uint32_t readCountIdx __attribute__((aligned(CacheP_CACHELINE_ALIGNMENT)))
LIN_HLD_SYNC_DELIMITER_LEN_2
@ LIN_HLD_SYNC_DELIMITER_LEN_2
Definition: sci_lin.h:362
LIN_OpenParams::transferMode
LIN_TransferMode transferMode
Definition: sci_lin.h:673
LIN_HwAttrs::intrPriority
uint8_t intrPriority
Definition: sci_lin.h:503
LIN_HLD_State
LIN_HLD_State
Definition: sci_lin.h:467
CacheP_CACHELINE_ALIGNMENT
#define CacheP_CACHELINE_ALIGNMENT
Cache line size for alignment of buffers. Actual CPU defined cache line can be smaller that this valu...
Definition: CacheP.h:60
LIN_COMM_HLD_SCI_IDLELINEMODE
@ LIN_COMM_HLD_SCI_IDLELINEMODE
Definition: sci_lin.h:188
LIN_LinConfigParams::maskFilteringType
LIN_HLD_MaskFilterType maskFilteringType
Definition: sci_lin.h:636
CacheP.h
LIN_BaudConfigParams::preScaler
uint32_t preScaler
Definition: sci_lin.h:529
LIN_LinConfigParams::idMatchCallbackFxn
LIN_IdMatchCallbackFxn idMatchCallbackFxn
Definition: sci_lin.h:655
LIN_COMM_HLD_LIN_ID4ID5LENCTL
@ LIN_COMM_HLD_LIN_ID4ID5LENCTL
Definition: sci_lin.h:181
LIN_LinConfigParams::maxBaudRate
uint32_t maxBaudRate
Definition: sci_lin.h:649
LIN_LinConfigParams
Definition: sci_lin.h:630
LIN_LinConfigParams::linMode
LIN_HLD_LinMode linMode
Definition: sci_lin.h:633
LIN_HwAttrs::loopBackMode
LIN_HLD_LoopbackMode loopBackMode
Definition: sci_lin.h:513
LIN_Config::object
LIN_Object * object
Definition: sci_lin.h:760
LIN_BaudConfigParams::supFracDivSel_U
uint8_t supFracDivSel_U
Definition: sci_lin.h:544
LIN_HLD_SYNC_BREAK_LEN_20
@ LIN_HLD_SYNC_BREAK_LEN_20
Definition: sci_lin.h:397
LIN_HLD_Sync_Break
LIN_HLD_Sync_Break
Definition: sci_lin.h:382
LIN_OpenParams::multiBufferMode
bool multiBufferMode
Definition: sci_lin.h:687
LIN_OperationalMode
LIN_OperationalMode
Definition: sci_lin.h:102
LIN_SCI_transferFrame
int32_t LIN_SCI_transferFrame(LIN_Handle handle, LIN_SCI_Frame *frame)
API to initiate a LIN/SCI frame transfer.
LIN_DmaHandle
void * LIN_DmaHandle
Definition: sci_lin.h:87
LIN_SciConfigParams::parityType
LIN_HLD_SCIParityType parityType
Definition: sci_lin.h:611
HwiP.h
LIN_Object::state
LIN_HLD_State state
Definition: sci_lin.h:716
LIN_HLD_ChecksumType
LIN_HLD_ChecksumType
Definition: sci_lin.h:223
LIN_HLD_TXN_BIT_ERR
@ LIN_HLD_TXN_BIT_ERR
Definition: sci_lin.h:432
LIN_SCI_Frame_init
void LIN_SCI_Frame_init(LIN_SCI_Frame *frame)
API to set default values of LIN_SCI_Frame in frame.
LIN_SciConfigParams::dataBits
uint8_t dataBits
Definition: sci_lin.h:617
LIN_HLD_MaskFilterType
LIN_HLD_MaskFilterType
Definition: sci_lin.h:242
LIN_LinConfigParams::linRxMask
uint8_t linRxMask
Definition: sci_lin.h:640
LIN_HLD_SCI_STOP_BITS_2
@ LIN_HLD_SCI_STOP_BITS_2
Definition: sci_lin.h:284
LIN_HLD_STATE_ERROR
@ LIN_HLD_STATE_ERROR
Definition: sci_lin.h:474
LIN_TRANSFER_MODE_BLOCKING
@ LIN_TRANSFER_MODE_BLOCKING
Definition: sci_lin.h:124
LIN_HLD_SCI_PARITY_ODD
@ LIN_HLD_SCI_PARITY_ODD
Definition: sci_lin.h:263
LIN_OpenParams::baudConfigParams
LIN_BaudConfigParams baudConfigParams
Definition: sci_lin.h:690
LIN_MODE_HLD_LIN_RESPONDER
@ LIN_MODE_HLD_LIN_RESPONDER
Definition: sci_lin.h:164
LIN_MODE_HLD_LIN_COMMANDER
@ LIN_MODE_HLD_LIN_COMMANDER
Definition: sci_lin.h:162
LIN_SCI_Frame
LIN Frame Structure.
Definition: sci_lin.h:552
LIN_HLD_ANALOG_LOOP_TX
@ LIN_HLD_ANALOG_LOOP_TX
Definition: sci_lin.h:340
LIN_deinit
void LIN_deinit(void)
De-initialize each driver instance object and delete driver lock.
LIN_HLD_DEBUG_FROZEN
@ LIN_HLD_DEBUG_FROZEN
Definition: sci_lin.h:205
LIN_HLD_SYNC_BREAK_LEN_15
@ LIN_HLD_SYNC_BREAK_LEN_15
Definition: sci_lin.h:387
LIN_Object::linDmaHandle
LIN_DmaHandle linDmaHandle
Definition: sci_lin.h:722
LIN_DmaChConfig
void * LIN_DmaChConfig
Definition: sci_lin.h:85
LIN_SCI_Frame::id
uint8_t id
Definition: sci_lin.h:556
LIN_HLD_TXN_STS_FAILURE
@ LIN_HLD_TXN_STS_FAILURE
Definition: sci_lin.h:416
LIN_HLD_TXN_TYPE_WRITE
@ LIN_HLD_TXN_TYPE_WRITE
Definition: sci_lin.h:449
LIN_HLD_SYNC_BREAK_LEN_19
@ LIN_HLD_SYNC_BREAK_LEN_19
Definition: sci_lin.h:395
LIN_HLD_LoopbackType
LIN_HLD_LoopbackType
Definition: sci_lin.h:319
LIN_HLD_ModuleMode
LIN_HLD_ModuleMode
Definition: sci_lin.h:142
LIN_OpenParams::linConfigParams
LIN_LinConfigParams linConfigParams
Definition: sci_lin.h:696
LIN_HwAttrs::baseAddr
uint32_t baseAddr
Definition: sci_lin.h:494
LIN_Handle
struct LIN_Config_ts * LIN_Handle
A handle that is returned from a LIN_open() call.
Definition: sci_lin.h:83
LIN_SCI_Frame::txnType
LIN_HLD_Txn_Type txnType
Definition: sci_lin.h:562
LIN_HLD_DebugMode
LIN_HLD_DebugMode
Definition: sci_lin.h:204
LIN_Object
Definition: sci_lin.h:708
LIN_SciConfigParams
Definition: sci_lin.h:607
LIN_HLD_TXN_STS_TIMEOUT
@ LIN_HLD_TXN_STS_TIMEOUT
Definition: sci_lin.h:418
LIN_HLD_SYNC_BREAK_LEN_16
@ LIN_HLD_SYNC_BREAK_LEN_16
Definition: sci_lin.h:389
LIN_IdMatchCallbackFxn
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.
Definition: sci_lin.h:583
LIN_OpenParams::sciConfigParams
LIN_SciConfigParams sciConfigParams
Definition: sci_lin.h:693
LIN_SCI_Frame::args
void * args
Definition: sci_lin.h:568
LIN_Object::isOpen
bool isOpen
Definition: sci_lin.h:718
LIN_HLD_Txn_Status
LIN_HLD_Txn_Status
Definition: sci_lin.h:413
LIN_BaudConfigParams::fracDivSel_M
uint8_t fracDivSel_M
Definition: sci_lin.h:537
LIN_LinConfigParams::syncDelimiter
LIN_HLD_Sync_Delimiter syncDelimiter
Definition: sci_lin.h:651
HwiP_Object
Opaque Hwi object used with the Hwi APIs.
Definition: HwiP.h:142
LIN_HwAttrs::intrNum0
uint32_t intrNum0
Definition: sci_lin.h:496
LIN_HwAttrs::debugMode
LIN_HLD_DebugMode debugMode
Definition: sci_lin.h:506
LIN_HLD_SYNC_BREAK_LEN_17
@ LIN_HLD_SYNC_BREAK_LEN_17
Definition: sci_lin.h:391
LIN_HLD_CHECKSUM_ENHANCED
@ LIN_HLD_CHECKSUM_ENHANCED
Definition: sci_lin.h:226
LIN_Config::hwAttrs
LIN_HwAttrs const * hwAttrs
Definition: sci_lin.h:763
LIN_HLD_CommMode
LIN_HLD_CommMode
Definition: sci_lin.h:180
LIN_LinConfigParams::checksumType
LIN_HLD_ChecksumType checksumType
Definition: sci_lin.h:643
LIN_Object::dmaChCfg
LIN_DmaChConfig dmaChCfg
Definition: sci_lin.h:724
LIN_Object::readFrmCompSemObj
SemaphoreP_Object readFrmCompSemObj
Definition: sci_lin.h:742
LIN_OpenParams::commMode
LIN_HLD_CommMode commMode
Definition: sci_lin.h:683
LIN_COMM_HLD_SCI_ADDRBITMODE
@ LIN_COMM_HLD_SCI_ADDRBITMODE
Definition: sci_lin.h:186
LIN_OPER_MODE_DMA
@ LIN_OPER_MODE_DMA
Definition: sci_lin.h:107
LIN_close
void LIN_close(LIN_Handle handle)
API to Close the LIN Instance specified by the handle.
LIN_Object::writeFrmCompSemObj
SemaphoreP_Object writeFrmCompSemObj
Definition: sci_lin.h:739
LIN_HLD_CHECKSUM_CLASSIC
@ LIN_HLD_CHECKSUM_CLASSIC
Definition: sci_lin.h:224
LIN_SciConfigParams::transferCompleteCallbackFxn
LIN_TransferCompleteCallbackFxn transferCompleteCallbackFxn
Definition: sci_lin.h:619
LIN_HLD_TXN_TYPE_READ
@ LIN_HLD_TXN_TYPE_READ
Definition: sci_lin.h:451
LIN_Object::__attribute__
uint8_t tempBuffer[8] __attribute__((aligned(CacheP_CACHELINE_ALIGNMENT)))
LIN_HLD_TXN_OVERRUN_ERR
@ LIN_HLD_TXN_OVERRUN_ERR
Definition: sci_lin.h:424
LIN_HLD_TXN_NO_RES_ERR
@ LIN_HLD_TXN_NO_RES_ERR
Definition: sci_lin.h:430
LIN_BaudConfigParams
Definition: sci_lin.h:527
LIN_MODULE_OP_MODE_SCI
@ LIN_MODULE_OP_MODE_SCI
Definition: sci_lin.h:145
LIN_open
LIN_Handle LIN_open(uint32_t index, LIN_OpenParams *openParams)
API to Open a given LIN Instance.
LIN_LinConfigParams::syncBreak
LIN_HLD_Sync_Break syncBreak
Definition: sci_lin.h:653
LIN_HLD_SYNC_DELIMITER_LEN_3
@ LIN_HLD_SYNC_DELIMITER_LEN_3
Definition: sci_lin.h:364
LIN_HwAttrs::enableLoopback
bool enableLoopback
Definition: sci_lin.h:510
LIN_SCI_Frame::dataBuf
void * dataBuf
Definition: sci_lin.h:560
LIN_HLD_SCIParityType
LIN_HLD_SCIParityType
Definition: sci_lin.h:262
LIN_HLD_LOOPBACK_INTERNAL
@ LIN_HLD_LOOPBACK_INTERNAL
Definition: sci_lin.h:301
LIN_MODULE_OP_MODE_LIN
@ LIN_MODULE_OP_MODE_LIN
Definition: sci_lin.h:143
LIN_COMM_HLD_LIN_USELENGTHVAL
@ LIN_COMM_HLD_LIN_USELENGTHVAL
Definition: sci_lin.h:183
LIN_TransferMode
LIN_TransferMode
Definition: sci_lin.h:123
LIN_SCI_Frame::status
LIN_HLD_Txn_Status status
Definition: sci_lin.h:566
LIN_HLD_SYNC_DELIMITER_LEN_4
@ LIN_HLD_SYNC_DELIMITER_LEN_4
Definition: sci_lin.h:366
LIN_Params_init
void LIN_Params_init(LIN_OpenParams *openParams)
API to initialize the LIN_OpenParams struct to its defaults.
LIN_Config
LIN Global Configuration.
Definition: sci_lin.h:757