iLLD_TC29x  1.0
IfxAsclin.h
Go to the documentation of this file.
1 /**
2  * \file IfxAsclin.h
3  * \brief ASCLIN basic functionality
4  * \ingroup IfxLld_Asclin
5  *
6  * \version iLLD_1_0_0_11_0
7  * \copyright Copyright (c) 2013 Infineon Technologies AG. All rights reserved.
8  *
9  *
10  * IMPORTANT NOTICE
11  *
12  *
13  * Infineon Technologies AG (Infineon) is supplying this file for use
14  * exclusively with Infineon's microcontroller products. This file can be freely
15  * distributed within development tools that are supporting such microcontroller
16  * products.
17  *
18  * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
19  * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
20  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
21  * INFINEON SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL,
22  * OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
23  *
24  * \defgroup IfxLld_Asclin_Std_Enumerations Enumerations
25  * \ingroup IfxLld_Asclin_Std
26  * \defgroup IfxLld_Asclin_Std_Operative Operative Functions
27  * \ingroup IfxLld_Asclin_Std
28  * \defgroup IfxLld_Asclin_Std_Utility Utility Functions
29  * \ingroup IfxLld_Asclin_Std
30  * \defgroup IfxLld_Asclin_Std_Configuration Configuration Functions
31  * \ingroup IfxLld_Asclin_Std
32  * \defgroup IfxLld_Asclin_Std_External External Functions
33  * \ingroup IfxLld_Asclin_Std
34  * \defgroup IfxLld_Asclin_Std_IO IO Pin Configuration Functions
35  * \ingroup IfxLld_Asclin_Std
36  */
37 
38 #ifndef IFXASCLIN_H
39 #define IFXASCLIN_H 1
40 
41 /******************************************************************************/
42 /*----------------------------------Includes----------------------------------*/
43 /******************************************************************************/
44 
45 #include "_Impl/IfxAsclin_cfg.h"
46 #include "Scu/Std/IfxScuCcu.h"
47 #include "Scu/Std/IfxScuWdt.h"
49 #include "IfxAsclin_reg.h"
50 #include "Src/Std/IfxSrc.h"
52 
53 /******************************************************************************/
54 /*--------------------------------Enumerations--------------------------------*/
55 /******************************************************************************/
56 
57 /** \addtogroup IfxLld_Asclin_Std_Enumerations
58  * \{ */
59 /** \brief Defines if the classic or the enhanced checksum will be calculated by the checksum block.\n
60  * Definition in Ifx_ASCLIN.DATCON.B.CSM
61  */
62 typedef enum
63 {
64  IfxAsclin_Checksum_classic = 0, /**< \brief classic checksum */
65  IfxAsclin_Checksum_enhanced = 1 /**< \brief enhanced checksum */
67 
68 /** \brief Defines if the received checksum byte is written into the RXFifo or not.\n
69  * Definition in Ifx_ASCLIN.LIN.CON.B.CSI
70  */
71 typedef enum
72 {
73  IfxAsclin_ChecksumInjection_notWritten = 0, /**< \brief checksum byte is not written */
74  IfxAsclin_ChecksumInjection_written = 1 /**< \brief checksum byte is written */
76 
77 /** \brief CPOL defines the idle level of the clock signal in the SPI mode.\n
78  * Idle level is the level outside the data transmission time intervals.\n
79  * Definition in Ifx_ASCLIN.IOCR.B.CPOL
80  */
81 typedef enum
82 {
83  IfxAsclin_ClockPolarity_idleLow = 0, /**< \brief idle low */
84  IfxAsclin_ClockPolarity_idleHigh = 1 /**< \brief idle high */
86 
87 /** \brief Selection of clock source\n
88  * Definition in Ifx_ASCLIN.CSR.B.CLKSEL
89  */
90 typedef enum
91 {
92  IfxAsclin_ClockSource_noClock = 0, /**< \brief no clock will be supplied */
93  IfxAsclin_ClockSource_kernelClock = 1, /**< \brief f clc will be supplied */
94  IfxAsclin_ClockSource_oscillatorClock = 2, /**< \brief XTAL oscillator clock foso0 will be supplied */
95  IfxAsclin_ClockSource_flexRayClock = 4, /**< \brief f eray will be supplied */
96  IfxAsclin_ClockSource_ascFastClock = 8, /**< \brief f asclinf wiil be supplied */
97  IfxAsclin_ClockSource_ascSlowClock = 16 /**< \brief f asclins will be supplied */
99 
100 /** \brief CTS input pin selection\n
101  * Definition in Ifx_ASCLIN.IOCR.B.CTS
102  */
103 typedef enum
104 {
105  IfxAsclin_CtsInputSelect_0, /**< \brief CTS input pin 0 */
106  IfxAsclin_CtsInputSelect_1, /**< \brief CTS input pin 1 */
107  IfxAsclin_CtsInputSelect_2, /**< \brief CTS input pin 2 */
108  IfxAsclin_CtsInputSelect_3 /**< \brief CTS input pin 3 */
110 
111 /** \brief Number of bits per transfer\n
112  * Definition in Ifx_ASCLIN.FRAMECON.B.DATALEN
113  */
114 typedef enum
115 {
116  IfxAsclin_DataLength_1 = 0, /**< \brief number of bits per transfer 0 */
117  IfxAsclin_DataLength_2, /**< \brief number of bits per transfer 1 */
118  IfxAsclin_DataLength_3, /**< \brief number of bits per transfer 2 */
119  IfxAsclin_DataLength_4, /**< \brief number of bits per transfer 3 */
120  IfxAsclin_DataLength_5, /**< \brief number of bits per transfer 4 */
121  IfxAsclin_DataLength_6, /**< \brief number of bits per transfer 5 */
122  IfxAsclin_DataLength_7, /**< \brief number of bits per transfer 6 */
123  IfxAsclin_DataLength_8, /**< \brief number of bits per transfer 7 */
124  IfxAsclin_DataLength_9, /**< \brief number of bits per transfer 8 */
125  IfxAsclin_DataLength_10, /**< \brief number of bits per transfer 9 */
126  IfxAsclin_DataLength_11, /**< \brief number of bits per transfer 10 */
127  IfxAsclin_DataLength_12, /**< \brief number of bits per transfer 11 */
128  IfxAsclin_DataLength_13, /**< \brief number of bits per transfer 12 */
129  IfxAsclin_DataLength_14, /**< \brief number of bits per transfer 13 */
130  IfxAsclin_DataLength_15, /**< \brief number of bits per transfer 14 */
131  IfxAsclin_DataLength_16 /**< \brief number of bits per transfer 15 */
133 
134 /** \brief Defines the basic operating mode of the module. Changing the mode must be done by switching first to initialize mode, and then to the other mode.\n
135  * Definition in Ifx_ASCLIN.FRAMECON.B.MODE
136  */
137 typedef enum
138 {
139  IfxAsclin_FrameMode_initialise = 0, /**< \brief initialise mode */
140  IfxAsclin_FrameMode_asc = 1, /**< \brief asc mode */
141  IfxAsclin_FrameMode_spi = 2, /**< \brief spi mode */
142  IfxAsclin_FrameMode_lin = 3 /**< \brief lin mode */
144 
145 /** \brief Defines if LIN frame shall consist of a header and response or of a header only.\n
146  * Definition in Ifx_ASCLIN.DATCON.B.HO
147  */
148 typedef enum
149 {
150  IfxAsclin_HeaderResponseSelect_headerAndResponse = 0, /**< \brief header and response expected */
151  IfxAsclin_HeaderResponseSelect_headerOnly = 1 /**< \brief header only expected */
153 
154 /** \brief Defines the duration of the IDLE delay in bit times.\n
155  * SPI mode: this is the idle time between the frames.\n
156  * ASC and LIN mode: this is the pause inserted between transmission of bytes.\n
157  * Definition in Ifx_ASCLIN.FRAMECON.B.IDLE
158  */
159 typedef enum
160 {
161  IfxAsclin_IdleDelay_0, /**< \brief idle delay in 0 bit times */
162  IfxAsclin_IdleDelay_1, /**< \brief idle delay in 1 bit times */
163  IfxAsclin_IdleDelay_2, /**< \brief idle delay in 2 bit times */
164  IfxAsclin_IdleDelay_3, /**< \brief idle delay in 3 bit times */
165  IfxAsclin_IdleDelay_4, /**< \brief idle delay in 4 bit times */
166  IfxAsclin_IdleDelay_5, /**< \brief idle delay in 5 bit times */
167  IfxAsclin_IdleDelay_6, /**< \brief idle delay in 6 bit times */
168  IfxAsclin_IdleDelay_7 /**< \brief idle delay in 7 bit times */
170 
171 /** \brief Defines the leading delay in bit times in SPI mode. ASC mode: not applicable.\n
172  * LIN mode: delay between the end of the break and the start of the sync character.\n
173  * Definition in Ifx_ASCLIN.FRAMECON.B.LEAD
174  */
175 typedef enum
176 {
177  IfxAsclin_LeadDelay_0, /**< \brief lead delay in 0 bit times */
178  IfxAsclin_LeadDelay_1, /**< \brief lead delay in 1 bit times */
179  IfxAsclin_LeadDelay_2, /**< \brief lead delay in 2 bit times */
180  IfxAsclin_LeadDelay_3, /**< \brief lead delay in 3 bit times */
181  IfxAsclin_LeadDelay_4, /**< \brief lead delay in 4 bit times */
182  IfxAsclin_LeadDelay_5, /**< \brief lead delay in 5 bit times */
183  IfxAsclin_LeadDelay_6, /**< \brief lead delay in 6 bit times */
184  IfxAsclin_LeadDelay_7 /**< \brief lead delay in 7 bit times */
186 
187 /** \brief Configures if the module in LIN mode operates as master or slave\n
188  * Definition in Ifx_ASCLIN.LIN.CON.B.MS
189  */
190 typedef enum
191 {
192  IfxAsclin_LinMode_slave = 0, /**< \brief operates in slave mode */
193  IfxAsclin_LinMode_master = 1 /**< \brief operates in master mode */
195 
196 /** \brief Defines the timeout threshold of RESPOSE bit is for LIN response timeout or LIN frame timeout.\n
197  * Definition in Ifx_ASCLIN.DATCON.B.RM
198  */
199 typedef enum
200 {
201  IfxAsclin_LinResponseTimeoutMode_frameTimeout = 0, /**< \brief timeout threshold is for frame */
202  IfxAsclin_LinResponseTimeoutMode_responseTimeout = 1 /**< \brief timeout threshold is for reponse */
204 
205 /** \brief Defines the bit length in ticks in the range of 1 to 16. The lengths of 1 to 3 are not allowed\n
206  * Definition in Ifx_ASCLIN.BITCON.B.OVERSAMPLING
207  */
208 typedef enum
209 {
210  IfxAsclin_OversamplingFactor_4 = 3, /**< \brief oversampling factor 4 */
211  IfxAsclin_OversamplingFactor_5 = 4, /**< \brief oversampling factor 5 */
212  IfxAsclin_OversamplingFactor_6 = 5, /**< \brief oversampling factor 6 */
213  IfxAsclin_OversamplingFactor_7 = 6, /**< \brief oversampling factor 7 */
214  IfxAsclin_OversamplingFactor_8 = 7, /**< \brief oversampling factor 8 */
215  IfxAsclin_OversamplingFactor_9 = 8, /**< \brief oversampling factor 9 */
216  IfxAsclin_OversamplingFactor_10 = 9, /**< \brief oversampling factor 10 */
217  IfxAsclin_OversamplingFactor_11 = 10, /**< \brief oversampling factor 11 */
218  IfxAsclin_OversamplingFactor_12 = 11, /**< \brief oversampling factor 12 */
219  IfxAsclin_OversamplingFactor_13 = 12, /**< \brief oversampling factor 13 */
220  IfxAsclin_OversamplingFactor_14 = 13, /**< \brief oversampling factor 14 */
221  IfxAsclin_OversamplingFactor_15 = 14, /**< \brief oversampling factor 15 */
222  IfxAsclin_OversamplingFactor_16 = 15 /**< \brief oversampling factor 16 */
224 
225 /** \brief Type of parity bit attached to data bits\n
226  * Definition in Ifx_ASCLIN.FRAMECON.B.ODD
227  */
228 typedef enum
229 {
230  IfxAsclin_ParityType_even = 0, /**< \brief even parity */
231  IfxAsclin_ParityType_odd = 1 /**< \brief odd parity */
233 
234 /** \brief Receive buffer mode\n
235  * Definition in Ifx_ASCLIN.RXFIFOCON.B.BUF
236  */
237 typedef enum
238 {
239  IfxAsclin_ReceiveBufferMode_rxFifo = 0, /**< \brief RxFIFO mode */
240  IfxAsclin_ReceiveBufferMode_rxBuffer = 1 /**< \brief single stage Rx buffer */
242 
243 /** \brief Polarity of the RTS and CTS signals\n
244  * Definition in Ifx_ASCLIN.IOCR.B.RCPOL
245  */
246 typedef enum
247 {
248  IfxAsclin_RtsCtsPolarity_activeHigh = 0, /**< \brief ready/clear are active-high */
249  IfxAsclin_RtsCtsPolarity_activeLow = 1 /**< \brief ready/clear are active-low */
251 
252 /** \brief Defines the filling level that triggers a drain (RX) interrupt or DMA access\n
253  * Definition in Ifx_ASCLIN.RXFIFOCON.B.INTLEVEL
254  */
255 typedef enum
256 {
257  IfxAsclin_RxFifoInterruptLevel_1, /**< \brief RX FIFO level 1 */
258  IfxAsclin_RxFifoInterruptLevel_2, /**< \brief RX FIFO level 2 */
259  IfxAsclin_RxFifoInterruptLevel_3, /**< \brief RX FIFO level 3 */
260  IfxAsclin_RxFifoInterruptLevel_4, /**< \brief RX FIFO level 4 */
261  IfxAsclin_RxFifoInterruptLevel_5, /**< \brief RX FIFO level 5 */
262  IfxAsclin_RxFifoInterruptLevel_6, /**< \brief RX FIFO level 6 */
263  IfxAsclin_RxFifoInterruptLevel_7, /**< \brief RX FIFO level 7 */
264  IfxAsclin_RxFifoInterruptLevel_8, /**< \brief RX FIFO level 8 */
265  IfxAsclin_RxFifoInterruptLevel_9, /**< \brief RX FIFO level 9 */
266  IfxAsclin_RxFifoInterruptLevel_10, /**< \brief RX FIFO level 10 */
267  IfxAsclin_RxFifoInterruptLevel_11, /**< \brief RX FIFO level 11 */
268  IfxAsclin_RxFifoInterruptLevel_12, /**< \brief RX FIFO level 12 */
269  IfxAsclin_RxFifoInterruptLevel_13, /**< \brief RX FIFO level 13 */
270  IfxAsclin_RxFifoInterruptLevel_14, /**< \brief RX FIFO level 14 */
271  IfxAsclin_RxFifoInterruptLevel_15, /**< \brief RX FIFO level 15 */
272  IfxAsclin_RxFifoInterruptLevel_16 /**< \brief RX FIFO level 16 */
274 
275 /** \brief Defines the number of bytes read from the Rx FIFO with one FPI bus read\n
276  * Definition in Ifx_ASCLIN.RXFIFOCON.B.OUTW
277  */
278 typedef enum
279 {
280  IfxAsclin_RxFifoOutletWidth_0, /**< \brief number of bytes 0 */
281  IfxAsclin_RxFifoOutletWidth_1, /**< \brief number of bytes 1 */
282  IfxAsclin_RxFifoOutletWidth_2, /**< \brief number of bytes 2 */
283  IfxAsclin_RxFifoOutletWidth_3 /**< \brief number of bytes 3 */
285 
286 /** \brief Alternate input selection for Rx signal.\n
287  * Definition in Ifx_ASCLIN.IOCR.B.ALTI
288  */
289 typedef enum
290 {
291  IfxAsclin_RxInputSelect_0, /**< \brief alternate input selection 0 */
292  IfxAsclin_RxInputSelect_1, /**< \brief alternate input selection 1 */
293  IfxAsclin_RxInputSelect_2, /**< \brief alternate input selection 2 */
294  IfxAsclin_RxInputSelect_3, /**< \brief alternate input selection 3 */
295  IfxAsclin_RxInputSelect_4, /**< \brief alternate input selection 4 */
296  IfxAsclin_RxInputSelect_5, /**< \brief alternate input selection 5 */
297  IfxAsclin_RxInputSelect_6, /**< \brief alternate input selection 6 */
298  IfxAsclin_RxInputSelect_7 /**< \brief alternate input selection 7 */
300 
301 /** \brief Sample point position\n
302  * Definition in Ifx_ASCLIN.BITCON.B.SAMPLEPOINT
303  */
304 typedef enum
305 {
306  IfxAsclin_SamplePointPosition_1 = 1, /**< \brief sample point position at 1 */
307  IfxAsclin_SamplePointPosition_2 = 2, /**< \brief sample point position at 2 */
308  IfxAsclin_SamplePointPosition_3 = 3, /**< \brief sample point position at 3 */
309  IfxAsclin_SamplePointPosition_4 = 4, /**< \brief sample point position at 4 */
310  IfxAsclin_SamplePointPosition_5 = 5, /**< \brief sample point position at 5 */
311  IfxAsclin_SamplePointPosition_6 = 6, /**< \brief sample point position at 6 */
312  IfxAsclin_SamplePointPosition_7 = 7, /**< \brief sample point position at 7 */
313  IfxAsclin_SamplePointPosition_8 = 8, /**< \brief sample point position at 8 */
314  IfxAsclin_SamplePointPosition_9 = 9, /**< \brief sample point position at 9 */
315  IfxAsclin_SamplePointPosition_10 = 10, /**< \brief sample point position at 10 */
316  IfxAsclin_SamplePointPosition_11 = 11, /**< \brief sample point position at 11 */
317  IfxAsclin_SamplePointPosition_12 = 12, /**< \brief sample point position at 12 */
318  IfxAsclin_SamplePointPosition_13 = 13, /**< \brief sample point position at 13 */
319  IfxAsclin_SamplePointPosition_14 = 14, /**< \brief sample point position at 14 */
320  IfxAsclin_SamplePointPosition_15 = 15 /**< \brief sample point position at 15 */
322 
323 /** \brief Number of samples per bit, sample mode/medianfilter\n
324  * Definition in Ifx_ASCLIN.BITCON.B.SM
325  */
326 typedef enum
327 {
328  IfxAsclin_SamplesPerBit_one = 0, /**< \brief one sample per bit */
329  IfxAsclin_SamplesPerBit_three = 1 /**< \brief three samples per bit */
331 
332 /** \brief SPI mode: defines the shift direction of the shift register.\n
333  * ASC and LIN mode: should be set to 0.\n
334  * Definition in Ifx_ASCLIN.FRAMECON.B.MSB
335  */
336 typedef enum
337 {
338  IfxAsclin_ShiftDirection_lsbFirst = 0, /**< \brief LSB first */
339  IfxAsclin_ShiftDirection_msbFirst = 1 /**< \brief MSB first */
341 
342 /** \brief Defines the idle level of the SLSO signal, which is the level.\n
343  * Outside the data transmission, leading and trailing time intervals.\n
344  * Definition in Ifx_ASCLIN.IOCR.B.SPOL
345  */
346 typedef enum
347 {
348  IfxAsclin_SlavePolarity_idleLow = 0, /**< \brief idle low */
349  IfxAsclin_SlavePolarity_idlehigh = 1 /**< \brief idle high */
351 
352 /** \brief Enable/disable the sensitivity of the module to sleep signal\n
353  * Definition in Ifx_ASCLIN.CLC.B.EDIS
354  */
355 typedef enum
356 {
357  IfxAsclin_SleepMode_enable = 0, /**< \brief enables sleep mode */
358  IfxAsclin_SleepMode_disable = 1 /**< \brief disables sleep mode */
360 
361 /** \brief Error status
362  */
363 typedef enum
364 {
365  IfxAsclin_Status_configurationError = 0, /**< \brief Configuration error */
366  IfxAsclin_Status_noError = 1 /**< \brief No error */
368 
369 /** \brief ASC and LIN mode: number of stop bits (0 is not allowed), SPI mode: trailing delay.\n
370  * Definition in Ifx_ASCLIN.FRAMECON.B.STOP
371  */
372 typedef enum
373 {
374  IfxAsclin_StopBit_0, /**< \brief number of stop bits 0 */
375  IfxAsclin_StopBit_1, /**< \brief number of stop bits 1 */
376  IfxAsclin_StopBit_2, /**< \brief number of stop bits 2 */
377  IfxAsclin_StopBit_3, /**< \brief number of stop bits 3 */
378  IfxAsclin_StopBit_4, /**< \brief number of stop bits 4 */
379  IfxAsclin_StopBit_5, /**< \brief number of stop bits 5 */
380  IfxAsclin_StopBit_6, /**< \brief number of stop bits 6 */
381  IfxAsclin_StopBit_7 /**< \brief number of stop bits 7 */
383 
384 /** \brief Defines the number of bytes written to the Tx FIFO with one FPI bus write\n
385  * Definition in Ifx_ASCLIN.TXFIFOCON.B.INW
386  */
387 typedef enum
388 {
389  IfxAsclin_TxFifoInletWidth_0, /**< \brief number of bytes 0 */
390  IfxAsclin_TxFifoInletWidth_1, /**< \brief number of bytes 1 */
391  IfxAsclin_TxFifoInletWidth_2, /**< \brief number of bytes 2 */
392  IfxAsclin_TxFifoInletWidth_3 /**< \brief number of bytes 3 */
394 
395 /** \brief Defines the filling level that triggers a refill (TX) interrupt or DMA access\n
396  * Definition in Ifx_ASCLIN.TXFIFOCON.B.INTLEVEL
397  */
398 typedef enum
399 {
400  IfxAsclin_TxFifoInterruptLevel_0, /**< \brief TX FIFO level 0 */
401  IfxAsclin_TxFifoInterruptLevel_1, /**< \brief TX FIFO level 1 */
402  IfxAsclin_TxFifoInterruptLevel_2, /**< \brief TX FIFO level 2 */
403  IfxAsclin_TxFifoInterruptLevel_3, /**< \brief TX FIFO level 3 */
404  IfxAsclin_TxFifoInterruptLevel_4, /**< \brief TX FIFO level 4 */
405  IfxAsclin_TxFifoInterruptLevel_5, /**< \brief TX FIFO level 5 */
406  IfxAsclin_TxFifoInterruptLevel_6, /**< \brief TX FIFO level 6 */
407  IfxAsclin_TxFifoInterruptLevel_7, /**< \brief TX FIFO level 7 */
408  IfxAsclin_TxFifoInterruptLevel_8, /**< \brief TX FIFO level 8 */
409  IfxAsclin_TxFifoInterruptLevel_9, /**< \brief TX FIFO level 9 */
410  IfxAsclin_TxFifoInterruptLevel_10, /**< \brief TX FIFO level 10 */
411  IfxAsclin_TxFifoInterruptLevel_11, /**< \brief TX FIFO level 11 */
412  IfxAsclin_TxFifoInterruptLevel_12, /**< \brief TX FIFO level 12 */
413  IfxAsclin_TxFifoInterruptLevel_13, /**< \brief TX FIFO level 13 */
414  IfxAsclin_TxFifoInterruptLevel_14, /**< \brief TX FIFO level 14 */
415  IfxAsclin_TxFifoInterruptLevel_15 /**< \brief TX FIFO level 15 */
417 
418 /** \} */
419 
420 /** \addtogroup IfxLld_Asclin_Std_Operative
421  * \{ */
422 
423 /******************************************************************************/
424 /*-------------------------Inline Function Prototypes-------------------------*/
425 /******************************************************************************/
426 
427 /** \brief clears all the flags
428  * \param asclin pointer to ASCLIN registers
429  * \return None
430  */
431 IFX_INLINE void IfxAsclin_clearAllFlags(Ifx_ASCLIN *asclin);
432 
433 /** \brief Clears the break detected flag
434  * \param asclin pointer to ASCLIN registers
435  * \return None
436  */
437 IFX_INLINE void IfxAsclin_clearBreakDetectedFlag(Ifx_ASCLIN *asclin);
438 
439 /** \brief Clears the collision detection error flag
440  * \param asclin pointer to ASCLIN registers
441  * \return None
442  */
444 
445 /** \brief Clears the falling edge detected flag
446  * \param asclin pointer to ASCLIN registers
447  * \return None
448  */
449 IFX_INLINE void IfxAsclin_clearFallingEdgeDetectedFlag(Ifx_ASCLIN *asclin);
450 
451 /** \brief Clears the frame error flag
452  * \param asclin pointer to ASCLIN registers
453  * \return None
454  */
455 IFX_INLINE void IfxAsclin_clearFrameErrorFlag(Ifx_ASCLIN *asclin);
456 
457 /** \brief Clears the header timeout flag
458  * \param asclin pointer to ASCLIN registers
459  * \return None
460  */
461 IFX_INLINE void IfxAsclin_clearHeaderTimeoutFlag(Ifx_ASCLIN *asclin);
462 
463 /** \brief Clears the kernel reset status
464  * \param asclin pointer to ASCLIN registers
465  * \return None
466  */
467 IFX_INLINE void IfxAsclin_clearKernelResetStatus(Ifx_ASCLIN *asclin);
468 
469 /** \brief Clears the auto baudrate detection error flag
470  * \param asclin pointer to ASCLIN registers
471  * \return None
472  */
474 
475 /** \brief Clears the LIN checksum error flag
476  * \param asclin pointer to ASCLIN registers
477  * \return None
478  */
479 IFX_INLINE void IfxAsclin_clearLinChecksumErrorFlag(Ifx_ASCLIN *asclin);
480 
481 /** \brief Clears the LIN parity error flag
482  * \param asclin pointer to ASCLIN registers
483  * \return None
484  */
485 IFX_INLINE void IfxAsclin_clearLinParityErrorFlag(Ifx_ASCLIN *asclin);
486 
487 /** \brief Clears the parity error flag
488  * \param asclin pointer to ASCLIN registers
489  * \return None
490  */
491 IFX_INLINE void IfxAsclin_clearParityErrorFlag(Ifx_ASCLIN *asclin);
492 
493 /** \brief Clears the raising edge detected flag
494  * \param asclin pointer to ASCLIN registers
495  * \return None
496  */
497 IFX_INLINE void IfxAsclin_clearRaisingEdgeDetectedFlag(Ifx_ASCLIN *asclin);
498 
499 /** \brief Clears the response timeout flag
500  * \param asclin pointer to ASCLIN registers
501  * \return None
502  */
503 IFX_INLINE void IfxAsclin_clearResponseTimeoutFlag(Ifx_ASCLIN *asclin);
504 
505 /** \brief Clears the Rx FIFO level flag
506  * \param asclin pointer to ASCLIN registers
507  * \return None
508  */
509 IFX_INLINE void IfxAsclin_clearRxFifoFillLevelFlag(Ifx_ASCLIN *asclin);
510 
511 /** \brief Clears the Rx FIFO overflow flag
512  * \param asclin pointer to ASCLIN registers
513  * \return None
514  */
515 IFX_INLINE void IfxAsclin_clearRxFifoOverflowFlag(Ifx_ASCLIN *asclin);
516 
517 /** \brief Clears the Rx FIFO underflow flag
518  * \param asclin pointer to ASCLIN registers
519  * \return None
520  */
521 IFX_INLINE void IfxAsclin_clearRxFifoUnderflowFlag(Ifx_ASCLIN *asclin);
522 
523 /** \brief Clears the receive header end flag
524  * \param asclin pointer to ASCLIN registers
525  * \return None
526  */
527 IFX_INLINE void IfxAsclin_clearRxHeaderEndFlag(Ifx_ASCLIN *asclin);
528 
529 /** \brief Clears the receive response end flag
530  * \param asclin pointer to ASCLIN registers
531  * \return None
532  */
533 IFX_INLINE void IfxAsclin_clearRxResponseEndFlag(Ifx_ASCLIN *asclin);
534 
535 /** \brief Clears the transmission pending flag
536  * \param asclin pointer to ASCLIN registers
537  * \return None
538  */
540 
541 /** \brief Clears the Tx FIFO level flag
542  * \param asclin pointer to ASCLIN registers
543  * \return None
544  */
545 IFX_INLINE void IfxAsclin_clearTxFifoFillLevelFlag(Ifx_ASCLIN *asclin);
546 
547 /** \brief Clears the Tx FIFO overflow flag
548  * \param asclin pointer to ASCLIN registers
549  * \return None
550  */
551 IFX_INLINE void IfxAsclin_clearTxFifoOverflowFlag(Ifx_ASCLIN *asclin);
552 
553 /** \brief Clears the transmit header end flag
554  * \param asclin pointer to ASCLIN registers
555  * \return None
556  */
557 IFX_INLINE void IfxAsclin_clearTxHeaderEndFlag(Ifx_ASCLIN *asclin);
558 
559 /** \brief Clears the transmit response end flag
560  * \param asclin pointer to ASCLIN registers
561  * \return None
562  */
563 IFX_INLINE void IfxAsclin_clearTxResponseEndFlag(Ifx_ASCLIN *asclin);
564 
565 /** \brief Flushes (empties) the Rx FIFO
566  * \param asclin pointer to ASCLIN registers
567  * \return None
568  */
569 IFX_INLINE void IfxAsclin_flushRxFifo(Ifx_ASCLIN *asclin);
570 
571 /** \brief Flushes (empties) the Tx FIFO
572  * \param asclin pointer to ASCLIN registers
573  * \return None
574  */
575 IFX_INLINE void IfxAsclin_flushTxFifo(Ifx_ASCLIN *asclin);
576 
577 /** \brief Sets the baudrate detection's lower limit
578  * \param asclin pointer to ASCLIN registers
579  * \param limit value of the lower limit
580  * \return None
581  */
582 IFX_INLINE void IfxAsclin_setBrdLowerlimt(Ifx_ASCLIN *asclin, uint8 limit);
583 
584 /** \brief Sets the baudrate detection's upper limit
585  * \param asclin pointer to ASCLIN registers
586  * \param limit value of the upper limit
587  * \return None
588  */
589 IFX_INLINE void IfxAsclin_setBrdUpperlimt(Ifx_ASCLIN *asclin, uint8 limit);
590 
591 /** \brief Sets the checksum injection
592  * \param asclin pointer to ASCLIN registers
593  * \param csi checksum injection selection (not written / written)
594  * \return None
595  */
597 
598 /** \brief Sets the checksum mode
599  * \param asclin pointer to ASCLIN registers
600  * \param mode checksum mode selection (classic / enhanced)
601  * \return None
602  */
603 IFX_INLINE void IfxAsclin_setChecksumMode(Ifx_ASCLIN *asclin, IfxAsclin_Checksum mode);
604 
605 /** \brief Sets the data length (number of bits per transfer)
606  * \param asclin pointer to ASCLIN registers
607  * \param length data length selection
608  * \return None
609  */
610 IFX_INLINE void IfxAsclin_setDataLength(Ifx_ASCLIN *asclin, IfxAsclin_DataLength length);
611 
612 /** \brief Sets the denominator of the fractional divider
613  * \param asclin pointer to ASCLIN registers
614  * \param denominator value of the denominator
615  * \return None
616  */
617 IFX_INLINE void IfxAsclin_setDenominator(Ifx_ASCLIN *asclin, uint16 denominator);
618 
619 /** \brief Sets the disable module request
620  * \param asclin pointer to ASCLIN registers
621  * \return None
622  */
623 IFX_INLINE void IfxAsclin_setDisableModuleRequest(Ifx_ASCLIN *asclin);
624 
625 /** \brief Sets the enable module request
626  * \param asclin pointer to ASCLIN registers
627  * \return None
628  */
629 IFX_INLINE void IfxAsclin_setEnableModuleRequest(Ifx_ASCLIN *asclin);
630 
631 /** \brief Sets digital glitch filter depth
632  * \param asclin pointer to ASCLIN registers
633  * \param depth digital glitch filter depth selection (1 to 63)
634  * \return None
635  */
636 IFX_INLINE void IfxAsclin_setFilterDepth(Ifx_ASCLIN *asclin, uint8 depth);
637 
638 /** \brief Sets the header response selection
639  * \param asclin pointer to ASCLIN registers
640  * \param type type of selection (header and response or header only)
641  * \return None
642  */
644 
645 /** \brief Sets the idle delay
646  * \param asclin pointer to ASCLIN registers
647  * \param delay idle delay selection
648  * \return None
649  */
650 IFX_INLINE void IfxAsclin_setIdleDelay(Ifx_ASCLIN *asclin, IfxAsclin_IdleDelay delay);
651 
652 /** \brief Sets the kernal reset of the KRST1
653  * \param asclin pointer to ASCLIN registers
654  * \return None
655  */
656 IFX_INLINE void IfxAsclin_setKernelResetOne(Ifx_ASCLIN *asclin);
657 
658 /** \brief Sets the kernel reset of the KRST0
659  * \param asclin pointer to ASCLIN registers
660  * \return None
661  */
662 IFX_INLINE void IfxAsclin_setKernelResetZero(Ifx_ASCLIN *asclin);
663 
664 /** \brief Sets the lead delay
665  * \param asclin pointer to ASCLIN registers
666  * \param delay lead delay selection
667  * \return None
668  */
669 IFX_INLINE void IfxAsclin_setLeadDelay(Ifx_ASCLIN *asclin, IfxAsclin_LeadDelay delay);
670 
671 /** \brief Sets the LIN break length
672  * \param asclin pointer to ASCLIN registers
673  * \param length value of the break length
674  * \return None
675  */
676 IFX_INLINE void IfxAsclin_setLinBreakLength(Ifx_ASCLIN *asclin, uint8 length);
677 
678 /** \brief Sets the LIN header timeout
679  * \param asclin pointer to ASCLIN registers
680  * \param timeout value of the header timeout
681  * \return None
682  */
683 IFX_INLINE void IfxAsclin_setLinHeaderTimeout(Ifx_ASCLIN *asclin, uint8 timeout);
684 
685 /** \brief Sets the LIN mode of operation
686  * \param asclin pointer to ASCLIN registers
687  * \param mode mode selection (slave / master)
688  * \return None
689  */
690 IFX_INLINE void IfxAsclin_setLinMode(Ifx_ASCLIN *asclin, IfxAsclin_LinMode mode);
691 
692 /** \brief Sets the LIN response timeout mode
693  * \param asclin pointer to ASCLIN registers
694  * \param mode LIN response timeout mode selection
695  * \return None
696  */
698 
699 /** \brief Sets the LIN response timeout threshold
700  * \param asclin pointer to ASCLIN registers
701  * \param threshold value of the tomeout threshold (1 to 256 bit times)
702  * \return None
703  */
704 IFX_INLINE void IfxAsclin_setLinResponseTimeoutThreshold(Ifx_ASCLIN *asclin, uint16 threshold);
705 
706 /** \brief Sets the numerator of the fractional divider
707  * \param asclin pointer to ASCLIN registers
708  * \param numerator value of the numerator
709  * \return None
710  */
711 IFX_INLINE void IfxAsclin_setNumerator(Ifx_ASCLIN *asclin, uint16 numerator);
712 
713 /** \brief Sets the division ratio of the baudrate post divider
714  * \param asclin pointer to ASCLIN registers
715  * \param ovsFactor value of oversampling factor
716  * \return None
717  */
718 IFX_INLINE void IfxAsclin_setOversampling(Ifx_ASCLIN *asclin, IfxAsclin_OversamplingFactor ovsFactor);
719 
720 /** \brief Sets the parity type
721  * \param asclin pointer to ASCLIN registers
722  * \param type parity type selction (even / odd)
723  * \return None
724  */
725 IFX_INLINE void IfxAsclin_setParityType(Ifx_ASCLIN *asclin, IfxAsclin_ParityType type);
726 
727 /** \brief Sets the division ratio of the predivider (prescaler)
728  * \param asclin pointer to ASCLIN registers
729  * \param prescaler value of prescaler
730  * \return None
731  */
732 IFX_INLINE void IfxAsclin_setPrescaler(Ifx_ASCLIN *asclin, uint16 prescaler);
733 
734 /** \brief Sets the receive buffer mode
735  * \param asclin pointer to ASCLIN registers
736  * \param mode receive buffer mode selection (Rx FIFO or single stage Rx buffer)
737  * \return None
738  */
740 
741 /** \brief Sets the Tx FIFO interrupt level
742  * \param asclin pointer to ASCLIN registers
743  * \param level interrupt level selection
744  * \return None
745  */
747 
748 /** \brief Sets the receive FIFO outlet width
749  * \param asclin pointer to ASCLIN registers
750  * \param width number of bytes read to the Rx FIFO with one FPI bus read
751  * \return None
752  */
754 
755 /** \brief Sets the sample mode (number of samples per bit / median filter)
756  * \param asclin pointer to ASCLIN registers
757  * \param medianFilter value of the median filter
758  * \return None
759  */
760 IFX_INLINE void IfxAsclin_setSampleMode(Ifx_ASCLIN *asclin, IfxAsclin_SamplesPerBit medianFilter);
761 
762 /** \brief Sets the sampling point position
763  * \param asclin pointer to ASCLIN registers
764  * \param spPosition sample point position selection
765  * \return None
766  */
768 
769 /** \brief Sets the shift direction
770  * \param asclin pointer to ASCLIN registers
771  * \param dir shift direction selection (LSB / MSB first)
772  * \return None
773  */
775 
776 /** \brief Sets the number of stop bits
777  * \param asclin pointer to ASCLIN registers
778  * \param stopBit number of stop bits selection
779  * \return None
780  */
781 IFX_INLINE void IfxAsclin_setStopBit(Ifx_ASCLIN *asclin, IfxAsclin_StopBit stopBit);
782 
783 /** \brief Sets the transmit header request flag
784  * \param asclin pointer to ASCLIN registers
785  * \return None
786  */
787 IFX_INLINE void IfxAsclin_setTransmitHeaderRequestFlag(Ifx_ASCLIN *asclin);
788 
789 /** \brief Sets the transmit response request flag
790  * \param asclin pointer to ASCLIN registers
791  * \return None
792  */
794 
795 /** \brief Sets the transmission wake request flag
796  * \param asclin pointer to ASCLIN registers
797  * \return None
798  */
799 IFX_INLINE void IfxAsclin_setTransmitWakeRequestFlag(Ifx_ASCLIN *asclin);
800 
801 /** \brief Sets the transmit FIFO inlet width
802  * \param asclin pointer to ASCLIN registers
803  * \param width number of bytes written to the Tx FIFO with one FPI bus write
804  * \return None
805  */
807 
808 /** \brief Sets the Tx FIFO interrupt level
809  * \param asclin pointer to ASCLIN registers
810  * \param level interrupt level selection
811  * \return None
812  */
814 
815 /** \} */
816 
817 /** \addtogroup IfxLld_Asclin_Std_Utility
818  * \{ */
819 
820 /******************************************************************************/
821 /*-------------------------Inline Function Prototypes-------------------------*/
822 /******************************************************************************/
823 
824 /** \brief Returns the break detected flag status
825  * \param asclin pointer to ASCLIN registers
826  * \return break detected flag status
827  */
828 IFX_INLINE boolean IfxAsclin_getBreakDetectedFlagStatus(Ifx_ASCLIN *asclin);
829 
830 /** \brief Returns the clock source
831  * \param asclin pointer to ASCLIN registers
832  * \return clock source
833  */
834 IFX_INLINE uint8 IfxAsclin_getClockSource(Ifx_ASCLIN *asclin);
835 
836 /** \brief Returns the clock status
837  * \param asclin pointer to ASCLIN registers
838  * \return clock status (off / on)
839  */
840 IFX_INLINE boolean IfxAsclin_getClockStatus(Ifx_ASCLIN *asclin);
841 
842 /** \brief Returns the collision detection error flag status
843  * \param asclin pointer to ASCLIN registers
844  * \return collision detection error flag status
845  */
847 
848 /** \brief Returns the falling edge detected flag status
849  * \param asclin pointer to ASCLIN registers
850  * \return falling edge detected flag status
851  */
852 IFX_INLINE boolean IfxAsclin_getFallingEdgeDetectedFlagStatus(Ifx_ASCLIN *asclin);
853 
854 /** \brief Returns the frame error flag status
855  * \param asclin pointer to ASCLIN registers
856  * \return frame error flag status
857  */
858 IFX_INLINE boolean IfxAsclin_getFrameErrorFlagStatus(Ifx_ASCLIN *asclin);
859 
860 /** \brief Returns the header timeout flag status
861  * \param asclin pointer to ASCLIN registers
862  * \return header timeout flag status
863  */
864 IFX_INLINE boolean IfxAsclin_getHeaderTimeoutFlagStatus(Ifx_ASCLIN *asclin);
865 
866 /** \brief Returns the kernel reset status
867  * \param asclin pointer to ASCLIN registers
868  * \return kernel reset status
869  */
870 IFX_INLINE boolean IfxAsclin_getKernelResetStatus(Ifx_ASCLIN *asclin);
871 
872 /** \brief Returns the LIN auto baudrate detection error flag status
873  * \param asclin pointer to ASCLIN registers
874  * \return LIN auto baudrate detection error flag status
875  */
877 
878 /** \brief Returns the LIN checksum error flag status
879  * \param asclin pointer to ASCLIN registers
880  * \return LIN checksum error flag status
881  */
882 IFX_INLINE boolean IfxAsclin_getLinChecksumErrorFlagStatus(Ifx_ASCLIN *asclin);
883 
884 /** \brief Returns the LIN parity error flag status
885  * \param asclin pointer to ASCLIN registers
886  * \return LIN parity error flag status
887  */
888 IFX_INLINE boolean IfxAsclin_getLinParityErrorFlagStatus(Ifx_ASCLIN *asclin);
889 
890 /** \brief Returns the module status
891  * \param asclin pointer to ASCLIN registers
892  * \return module status (enabled / disabled)
893  */
894 IFX_INLINE boolean IfxAsclin_getModuleStatus(Ifx_ASCLIN *asclin);
895 
896 /** \brief Returns the parity error flag status
897  * \param asclin pointer to ASCLIN registers
898  * \return parity error flag status
899  */
900 IFX_INLINE boolean IfxAsclin_getParityErrorFlagStatus(Ifx_ASCLIN *asclin);
901 
902 /** \brief Returns the division ratio of the predivider (prescaler)
903  * \param asclin pointer to ASCLIN registers
904  * \return value of prescaler
905  */
906 IFX_INLINE uint16 IfxAsclin_getPrescaler(Ifx_ASCLIN *asclin);
907 
908 /** \brief Returns the raising edge detected flag status
909  * \param asclin pointer to ASCLIN registers
910  * \return raising edge detected flag status
911  */
912 IFX_INLINE boolean IfxAsclin_getRaisingEdgeDetectedFlagStatus(Ifx_ASCLIN *asclin);
913 
914 /** \brief Returns the received signal status
915  * \param asclin pointer to ASCLIN registers
916  * \return received signal status (0 is low & 1 is high)
917  */
918 IFX_INLINE boolean IfxAsclin_getReceiveSignalStatus(Ifx_ASCLIN *asclin);
919 
920 /** \brief Returns the response timeout flag status
921  * \param asclin pointer to ASCLIN registers
922  * \return response timeout flag status
923  */
924 IFX_INLINE boolean IfxAsclin_getResponseTimeoutFlagStatus(Ifx_ASCLIN *asclin);
925 
926 /** \brief Returns the current filling level of Tx FIFO
927  * \param asclin pointer to ASCLIN registers
928  * \return current filling level of Rx FIFO
929  */
930 IFX_INLINE uint8 IfxAsclin_getRxFifoFillLevel(Ifx_ASCLIN *asclin);
931 
932 /** \brief Returns the Rx FIFO level flag status
933  * \param asclin pointer to ASCLIN registers
934  * \return Rx FIFO level flag status
935  */
936 IFX_INLINE boolean IfxAsclin_getRxFifoFillLevelFlagStatus(Ifx_ASCLIN *asclin);
937 
938 /** \brief Returns the receive FIFO inlet width
939  * \param asclin pointer to ASCLIN registers
940  * \return number of bytes read to the Rx FIFO with one FPI bus read
941  */
943 
944 /** \brief Returns the Rx FIFO overflow flag status
945  * \param asclin pointer to ASCLIN registers
946  * \return Rx FIFO overflow flag status
947  */
948 IFX_INLINE boolean IfxAsclin_getRxFifoOverflowFlagStatus(Ifx_ASCLIN *asclin);
949 
950 /** \brief Returns the Rx FIFO underflow flag status
951  * \param asclin pointer to ASCLIN registers
952  * \return Rx FIFO underflow flag status
953  */
954 IFX_INLINE boolean IfxAsclin_getRxFifoUnderflowFlagStatus(Ifx_ASCLIN *asclin);
955 
956 /** \brief Returns the receive header end flag status
957  * \param asclin pointer to ASCLIN registers
958  * \return receive header end flag status
959  */
960 IFX_INLINE boolean IfxAsclin_getRxHeaderEndFlagStatus(Ifx_ASCLIN *asclin);
961 
962 /** \brief Returns the receive response end flag status
963  * \param asclin pointer to ASCLIN registers
964  * \return receive response end flag status
965  */
966 IFX_INLINE boolean IfxAsclin_getRxResponseEndFlagStatus(Ifx_ASCLIN *asclin);
967 
968 /** \brief Returns the transmission pending flag status
969  * \param asclin pointer to ASCLIN registers
970  * \return transmission pending flag status
971  */
972 IFX_INLINE boolean IfxAsclin_getTransmissionCompletedFlagStatus(Ifx_ASCLIN *asclin);
973 
974 /** \brief Returns the transmit signal status
975  * \param asclin pointer to ASCLIN registers
976  * \return transmit signal status (0 is low & 1 is high)
977  */
978 IFX_INLINE boolean IfxAsclin_getTransmitSignalStatus(Ifx_ASCLIN *asclin);
979 
980 /** \brief Returns the current filling level of Tx FIFO
981  * \param asclin pointer to ASCLIN registers
982  * \return current filling level of Tx FIFO
983  */
984 IFX_INLINE uint8 IfxAsclin_getTxFifoFillLevel(Ifx_ASCLIN *asclin);
985 
986 /** \brief Returns the Tx FIFO level flag status
987  * \param asclin pointer to ASCLIN registers
988  * \return Tx FIFO level flag status
989  */
990 IFX_INLINE boolean IfxAsclin_getTxFifoFillLevelFlagStatus(Ifx_ASCLIN *asclin);
991 
992 /** \brief Returns the transmit FIFO inlet width
993  * \param asclin pointer to ASCLIN registers
994  * \return number of bytes written to the Tx FIFO with one FPI bus write
995  */
997 
998 /** \brief Returns the Tx FIFO overflow flag status
999  * \param asclin pointer to ASCLIN registers
1000  * \return Tx FIFO overflow flag status
1001  */
1002 IFX_INLINE boolean IfxAsclin_getTxFifoOverflowFlagStatus(Ifx_ASCLIN *asclin);
1003 
1004 /** \brief Returns the transmit header end flag status
1005  * \param asclin pointer to ASCLIN registers
1006  * \return transmit header end flag status
1007  */
1008 IFX_INLINE boolean IfxAsclin_getTxHeaderEndFlagStatus(Ifx_ASCLIN *asclin);
1009 
1010 /** \brief Returns the transmit response end flag status
1011  * \param asclin pointer to ASCLIN registers
1012  * \return transmit response end flag status
1013  */
1014 IFX_INLINE boolean IfxAsclin_getTxResponseEndFlagStatus(Ifx_ASCLIN *asclin);
1015 
1016 /** \brief Sets the sensitivity of the module to sleep signal
1017  * \param asclin pointer to ASCLIN registers
1018  * \param mode mode selection (enable / disable)
1019  * \return None
1020  */
1021 IFX_INLINE void IfxAsclin_setSleepMode(Ifx_ASCLIN *asclin, IfxAsclin_SleepMode mode);
1022 
1023 /******************************************************************************/
1024 /*-------------------------Global Function Prototypes-------------------------*/
1025 /******************************************************************************/
1026 
1027 /** \brief Returns the ASCLIN module FA frequency in Hz
1028  * \param asclin pointer to ASCLIN registers
1029  * \return Returns the ASCLIN module FA frequency in Hz
1030  */
1031 IFX_EXTERN float32 IfxAsclin_getFaFrequency(Ifx_ASCLIN *asclin);
1032 
1033 /** \brief Returns the OVS frequency
1034  * \param asclin pointer to ASCLIN registers
1035  * \return Returns the ASCLIN module OVS frequency in Hz
1036  */
1037 IFX_EXTERN float32 IfxAsclin_getOvsFrequency(Ifx_ASCLIN *asclin);
1038 
1039 /** \brief Returns the PD frequency
1040  * \param asclin pointer to ASCLIN registers
1041  * \return Returns the ASCLIN module PD frequency in Hz
1042  */
1043 IFX_EXTERN float32 IfxAsclin_getPdFrequency(Ifx_ASCLIN *asclin);
1044 
1045 /** \brief Returns the SHIFT frequency
1046  * \param asclin pointer to ASCLIN registers
1047  * \return Returns the ASCLIN module SHIFT frequency in Hz
1048  */
1049 IFX_EXTERN float32 IfxAsclin_getShiftFrequency(Ifx_ASCLIN *asclin);
1050 
1051 /** \brief resets Asclin kernel
1052  * \param asclin pointer to ASCLIN resgisters
1053  * \return None
1054  */
1055 IFX_EXTERN void IfxAsclin_resetModule(Ifx_ASCLIN *asclin);
1056 
1057 /** \} */
1058 
1059 /** \addtogroup IfxLld_Asclin_Std_Configuration
1060  * \{ */
1061 
1062 /******************************************************************************/
1063 /*-------------------------Inline Function Prototypes-------------------------*/
1064 /******************************************************************************/
1065 
1066 /** \brief disables all flags
1067  * \param asclin pointer to ASCLIN registers
1068  * \return None
1069  */
1070 IFX_INLINE void IfxAsclin_disableAllFlags(Ifx_ASCLIN *asclin);
1071 
1072 /** \brief Enables/disables the auto baudrate detection
1073  * \param asclin pointer to ASCLIN registers
1074  * \param enable choice (enable / disable)
1075  * \return None
1076  */
1077 IFX_INLINE void IfxAsclin_enableAutoBaudrateDetection(Ifx_ASCLIN *asclin, boolean enable);
1078 
1079 /** \brief Enables/disables break detected flag
1080  * \param asclin pointer to ASCLIN registers
1081  * \param enable choice (enable / disable)
1082  * \return None
1083  */
1084 IFX_INLINE void IfxAsclin_enableBreakDetectedFlag(Ifx_ASCLIN *asclin, boolean enable);
1085 
1086 /** \brief Enables/disables the collision detection
1087  * \param asclin pointer to ASCLIN registers
1088  * \param enable choice (enable/disable)
1089  * \return None
1090  */
1091 IFX_INLINE void IfxAsclin_enableCollisionDetection(Ifx_ASCLIN *asclin, boolean enable);
1092 
1093 /** \brief Enables/disables LIN collision detection error flag
1094  * \param asclin pointer to ASCLIN registers
1095  * \param enable choice (enable / disable)
1096  * \return None
1097  */
1098 IFX_INLINE void IfxAsclin_enableCollisionDetectionErrorFlag(Ifx_ASCLIN *asclin, boolean enable);
1099 
1100 /** \brief Enables/disables CTS
1101  * \param asclin pointer to ASCLIN registers
1102  * \param enable choice (enable/disable)
1103  * \return None
1104  */
1105 IFX_INLINE void IfxAsclin_enableCts(Ifx_ASCLIN *asclin, boolean enable);
1106 
1107 /** \brief Enables/disables falling edge detected flag
1108  * \param asclin pointer to ASCLIN registers
1109  * \param enable choice (enable / disable)
1110  * \return None
1111  */
1112 IFX_INLINE void IfxAsclin_enableFallingEdgeDetectedFlag(Ifx_ASCLIN *asclin, boolean enable);
1113 
1114 /** \brief Enables/disables frame error flag
1115  * \param asclin pointer to ASCLIN registers
1116  * \param enable choice (enable / disable)
1117  * \return None
1118  */
1119 IFX_INLINE void IfxAsclin_enableFrameErrorFlag(Ifx_ASCLIN *asclin, boolean enable);
1120 
1121 /** \brief Enables/disables the hardware checksum
1122  * \param asclin pointer to ASCLIN registers
1123  * \param enable choice (enable / disable)
1124  * \return None
1125  */
1126 IFX_INLINE void IfxAsclin_enableHardwareChecksum(Ifx_ASCLIN *asclin, boolean enable);
1127 
1128 /** \brief Enables/disables header timeout flag
1129  * \param asclin pointer to ASCLIN registers
1130  * \param enable choice (enable / disable)
1131  * \return None
1132  */
1133 IFX_INLINE void IfxAsclin_enableHeaderTimeoutFlag(Ifx_ASCLIN *asclin, boolean enable);
1134 
1135 /** \brief Enables/disables LIN auto baudrate detection error flag
1136  * \param asclin pointer to ASCLIN registers
1137  * \param enable choice (enable / disable)
1138  * \return None
1139  */
1140 IFX_INLINE void IfxAsclin_enableLinAutoBaudDetectionErrorFlag(Ifx_ASCLIN *asclin, boolean enable);
1141 
1142 /** \brief Enables/disables LIN checksum error flag
1143  * \param asclin pointer to ASCLIN registers
1144  * \param enable choice (enable / disable)
1145  * \return None
1146  */
1147 IFX_INLINE void IfxAsclin_enableLinChecksumErrorFlag(Ifx_ASCLIN *asclin, boolean enable);
1148 
1149 /** \brief Enables/disables LIN parity error flag
1150  * \param asclin pointer to ASCLIN registers
1151  * \param enable choice (enable / disable)
1152  * \return None
1153  */
1154 IFX_INLINE void IfxAsclin_enableLinParityErrorFlag(Ifx_ASCLIN *asclin, boolean enable);
1155 
1156 /** \brief Enables/disables the loop back mode
1157  * \param asclin pointer to ASCLIN registers
1158  * \param enable choice (enable/disable)
1159  * \return None
1160  */
1161 IFX_INLINE void IfxAsclin_enableLoopBackMode(Ifx_ASCLIN *asclin, boolean enable);
1162 
1163 /** \brief Enables/disables the parity bit attachment to tha data bits
1164  * \param asclin pointer to ASCLIN registers
1165  * \param enable choice (enable/disable)
1166  * \return None
1167  */
1168 IFX_INLINE void IfxAsclin_enableParity(Ifx_ASCLIN *asclin, boolean enable);
1169 
1170 /** \brief Enables/disables parity error flag
1171  * \param asclin pointer to ASCLIN registers
1172  * \param enable choice (enable / disable)
1173  * \return None
1174  */
1175 IFX_INLINE void IfxAsclin_enableParityErrorFlag(Ifx_ASCLIN *asclin, boolean enable);
1176 
1177 /** \brief Enables/disables raising edge detected flag
1178  * \param asclin pointer to ASCLIN registers
1179  * \param enable choice (enable / disable)
1180  * \return None
1181  */
1182 IFX_INLINE void IfxAsclin_enableRaisingEdgeDetectedFlag(Ifx_ASCLIN *asclin, boolean enable);
1183 
1184 /** \brief Enables/disables response timeout flag
1185  * \param asclin pointer to ASCLIN registers
1186  * \param enable choice (enable / disable)
1187  * \return None
1188  */
1189 IFX_INLINE void IfxAsclin_enableResponseTimeoutFlag(Ifx_ASCLIN *asclin, boolean enable);
1190 
1191 /** \brief Enables/disables Rx FIFO level flag
1192  * \param asclin pointer to ASCLIN registers
1193  * \param enable choice (enable / disable)
1194  * \return None
1195  */
1196 IFX_INLINE void IfxAsclin_enableRxFifoFillLevelFlag(Ifx_ASCLIN *asclin, boolean enable);
1197 
1198 /** \brief Enables/disables the receive FIFO outlet to allow filling of Rx FIFO through shift register
1199  * \param asclin pointer to ASCLIN registers
1200  * \param enable choice (enable/disable)
1201  * \return None
1202  */
1203 IFX_INLINE void IfxAsclin_enableRxFifoInlet(Ifx_ASCLIN *asclin, boolean enable);
1204 
1205 /** \brief Enables/disables Rx FIFO overflow flag
1206  * \param asclin pointer to ASCLIN registers
1207  * \param enable choice (enable / disable)
1208  * \return None
1209  */
1210 IFX_INLINE void IfxAsclin_enableRxFifoOverflowFlag(Ifx_ASCLIN *asclin, boolean enable);
1211 
1212 /** \brief Enables/disables Rx FIFO underflow flag
1213  * \param asclin pointer to ASCLIN registers
1214  * \param enable choice (enable / disable)
1215  * \return None
1216  */
1217 IFX_INLINE void IfxAsclin_enableRxFifoUnderflowFlag(Ifx_ASCLIN *asclin, boolean enable);
1218 
1219 /** \brief Enables/disables receive header end flag
1220  * \param asclin pointer to ASCLIN registers
1221  * \param enable choice (enable / disable)
1222  * \return None
1223  */
1224 IFX_INLINE void IfxAsclin_enableRxHeaderEndFlag(Ifx_ASCLIN *asclin, boolean enable);
1225 
1226 /** \brief Enables/disables receive response end flag
1227  * \param asclin pointer to ASCLIN registers
1228  * \param enable choice (enable / disable)
1229  * \return None
1230  */
1231 IFX_INLINE void IfxAsclin_enableRxResponseEndFlag(Ifx_ASCLIN *asclin, boolean enable);
1232 
1233 /** \brief Enables/disables transmission completed flag
1234  * \param asclin pointer to ASCLIN registers
1235  * \param enable choice (enable / disable)
1236  * \return None
1237  */
1238 IFX_INLINE void IfxAsclin_enableTransmissionCompletedFlag(Ifx_ASCLIN *asclin, boolean enable);
1239 
1240 /** \brief Enables/disables Tx FIFO level flag
1241  * \param asclin pointer to ASCLIN registers
1242  * \param enable choice (enable / disable)
1243  * \return None
1244  */
1245 IFX_INLINE void IfxAsclin_enableTxFifoFillLevelFlag(Ifx_ASCLIN *asclin, boolean enable);
1246 
1247 /** \brief Enables/disables the transmit FIFO outlet to allow transmission
1248  * \param asclin pointer to ASCLIN registers
1249  * \param enable choice (enable/disable)
1250  * \return None
1251  */
1252 IFX_INLINE void IfxAsclin_enableTxFifoOutlet(Ifx_ASCLIN *asclin, boolean enable);
1253 
1254 /** \brief Enables/disables Tx FIFO overflow flag
1255  * \param asclin pointer to ASCLIN registers
1256  * \param enable choice (enable / disable)
1257  * \return None
1258  */
1259 IFX_INLINE void IfxAsclin_enableTxFifoOverflowFlag(Ifx_ASCLIN *asclin, boolean enable);
1260 
1261 /** \brief Enables/disables transmit header end flag
1262  * \param asclin pointer to ASCLIN registers
1263  * \param enable choice (enable / disable)
1264  * \return None
1265  */
1266 IFX_INLINE void IfxAsclin_enableTxHeaderEndFlag(Ifx_ASCLIN *asclin, boolean enable);
1267 
1268 /** \brief Enables/disables transmit response end flag
1269  * \param asclin pointer to ASCLIN registers
1270  * \param enable choice (enable / disable)
1271  * \return None
1272  */
1273 IFX_INLINE void IfxAsclin_enableTxResponseEndFlag(Ifx_ASCLIN *asclin, boolean enable);
1274 
1275 /** \brief Selects the clock polarity
1276  * \param asclin pointer to ASCLIN registers
1277  * \param cpol CPOL selection
1278  * \return None
1279  */
1280 IFX_INLINE void IfxAsclin_setClockPolarity(Ifx_ASCLIN *asclin, IfxAsclin_ClockPolarity cpol);
1281 
1282 /** \brief Selects the CTS input pin
1283  * \param asclin pointer to ASCLIN registers
1284  * \param ctsi CTS input pin selection
1285  * \return None
1286  */
1287 IFX_INLINE void IfxAsclin_setCtsInput(Ifx_ASCLIN *asclin, IfxAsclin_CtsInputSelect ctsi);
1288 
1289 /** \brief Selects the module's mode of operation
1290  * \param asclin pointer to ASCLIN registers
1291  * \param mode mode selction
1292  * \return None
1293  */
1294 IFX_INLINE void IfxAsclin_setFrameMode(Ifx_ASCLIN *asclin, IfxAsclin_FrameMode mode);
1295 
1296 /** \brief Selects the RTS/CTS polarity
1297  * \param asclin pointer to ASCLIN registers
1298  * \param rcpol RCPOL selection
1299  * \return None
1300  */
1301 IFX_INLINE void IfxAsclin_setRtsCtsPolarity(Ifx_ASCLIN *asclin, IfxAsclin_RtsCtsPolarity rcpol);
1302 
1303 /** \brief Selects the alternate input for Rx signal
1304  * \param asclin pointer to ASCLIN registers
1305  * \param alti alternate input selection of Rx signal
1306  * \return None
1307  */
1308 IFX_INLINE void IfxAsclin_setRxInput(Ifx_ASCLIN *asclin, IfxAsclin_RxInputSelect alti);
1309 
1310 /** \brief Selects the slave polarity
1311  * \param asclin pointer to ASCLIN registers
1312  * \param spol SPOL selection
1313  * \return None
1314  */
1315 IFX_INLINE void IfxAsclin_setSlavePolarity(Ifx_ASCLIN *asclin, IfxAsclin_SlavePolarity spol);
1316 
1317 /******************************************************************************/
1318 /*-------------------------Global Function Prototypes-------------------------*/
1319 /******************************************************************************/
1320 
1321 /** \brief Set the bit timing
1322  *
1323  * \note this function required FA source and the PD frequency to be set to their final values
1324  * \param asclin pointer to ASCLIN registers
1325  * \param baudrate Required baudrate
1326  * \param oversampling The oversampling factor
1327  * \param samplepoint The sample point position
1328  * \param medianFilter Number of samples per bit (median filter)
1329  * \return TRUE if configuration was successfull
1330  */
1331 IFX_EXTERN boolean IfxAsclin_setBitTiming(Ifx_ASCLIN *asclin, float32 baudrate, IfxAsclin_OversamplingFactor oversampling, IfxAsclin_SamplePointPosition samplepoint, IfxAsclin_SamplesPerBit medianFilter);
1332 
1333 /** \} */
1334 
1335 /** \addtogroup IfxLld_Asclin_Std_External
1336  * \{ */
1337 
1338 /******************************************************************************/
1339 /*-------------------------Global Function Prototypes-------------------------*/
1340 /******************************************************************************/
1341 
1342 /** \brief Enables the ASC error interrupt Flags
1343  * \param asclin pointer to ASCLIN registers
1344  * \param parEnable parity error
1345  * \param rfoEnable Rx FIFO overflow error
1346  * \return None
1347  */
1348 IFX_EXTERN void IfxAsclin_enableAscErrorFlags(Ifx_ASCLIN *asclin, boolean parEnable, boolean rfoEnable);
1349 
1350 /** \brief Enables the module
1351  * \param asclin pointer to ASCLIN registers
1352  * \return None
1353  */
1354 IFX_EXTERN void IfxAsclin_enableModule(Ifx_ASCLIN *asclin);
1355 
1356 /** \brief Returns the module Index
1357  * \param asclin pointer to ASCLIN registers
1358  * \return module index
1359  */
1360 IFX_EXTERN sint32 IfxAsclin_getIndex(Ifx_ASCLIN *asclin);
1361 
1362 /** \brief Returns the SRC pointer for ERR
1363  * \param asclin pointer to ASCLIN registers
1364  */
1365 IFX_EXTERN volatile Ifx_SRC_SRCR *IfxAsclin_getSrcPointerEr(Ifx_ASCLIN *asclin);
1366 
1367 /** \brief Returns the SRC pointer for Rx
1368  * \param asclin pointer to ASCLIN registers
1369  */
1370 IFX_EXTERN volatile Ifx_SRC_SRCR *IfxAsclin_getSrcPointerRx(Ifx_ASCLIN *asclin);
1371 
1372 /** \brief Returns the SRC pointer for Tx
1373  * \param asclin pointer to ASCLIN registers
1374  */
1375 IFX_EXTERN volatile Ifx_SRC_SRCR *IfxAsclin_getSrcPointerTx(Ifx_ASCLIN *asclin);
1376 
1377 /** \brief Reads data up to 16 bits
1378  * \param asclin pointer to ASCLIN registers
1379  * \param data Array where the read data shall be stored
1380  * \param count number of items to read
1381  * \return number of items that could not be read
1382  */
1383 IFX_EXTERN uint32 IfxAsclin_read16(Ifx_ASCLIN *asclin, uint16 *data, uint32 count);
1384 
1385 /** \brief Reads data up to 32 bits
1386  * \param asclin pointer to ASCLIN registers
1387  * \param data Array where the read data shall be stored
1388  * \param count number of items to read
1389  * \return number of items that could not be read
1390  */
1391 IFX_EXTERN uint32 IfxAsclin_read32(Ifx_ASCLIN *asclin, uint32 *data, uint32 count);
1392 
1393 /** \brief Reads data up to 8 bits
1394  * \param asclin pointer to ASCLIN registers
1395  * \param data Array where the read data shall be stored
1396  * \param count number of items to read
1397  * \return number of items that could not be read
1398  */
1399 IFX_EXTERN uint32 IfxAsclin_read8(Ifx_ASCLIN *asclin, uint8 *data, uint32 count);
1400 
1401 /** \brief Sets the baudrate bit fields
1402  * \param asclin pointer to ASCLIN registers
1403  * \param prescaler division ratio of the predivider
1404  * \param numerator numerator of the fractional divider
1405  * \param denominator denominator of the fractional divider
1406  * \param oversampling division ratio of the baudrate postdivider
1407  * \return None
1408  */
1409 IFX_EXTERN void IfxAsclin_setBaudrateBitFields(Ifx_ASCLIN *asclin, uint16 prescaler, uint16 numerator, uint16 denominator, IfxAsclin_OversamplingFactor oversampling);
1410 
1411 /** \brief Sets the clock source
1412  * \param asclin pointer to ASCLIN registers
1413  * \param clockSource clock source selection
1414  * \return None
1415  */
1416 IFX_EXTERN void IfxAsclin_setClockSource(Ifx_ASCLIN *asclin, IfxAsclin_ClockSource clockSource);
1417 
1418 /** \brief Writes data up to 16 bits
1419  * \param asclin pointer to ASCLIN registers
1420  * \param data Array of data to be send
1421  * \param count number of items to be send
1422  * \return the number of items that could not be send
1423  */
1424 IFX_EXTERN uint32 IfxAsclin_write16(Ifx_ASCLIN *asclin, uint16 *data, uint32 count);
1425 
1426 /** \brief Writes data up to 32 bits
1427  * \param asclin pointer to ASCLIN registers
1428  * \param data Array of data to be send
1429  * \param count number of items to be send
1430  * \return the number of items that could not be send
1431  */
1432 IFX_EXTERN uint32 IfxAsclin_write32(Ifx_ASCLIN *asclin, uint32 *data, uint32 count);
1433 
1434 /** \brief Writes data up to 8 bits
1435  * \param asclin pointer to ASCLIN registers
1436  * \param data Array of data to be send
1437  * \param count number of items to be send
1438  * \return the number of items that could not be send
1439  */
1440 IFX_EXTERN uint32 IfxAsclin_write8(Ifx_ASCLIN *asclin, uint8 *data, uint32 count);
1441 
1442 /** \} */
1443 
1444 /** \addtogroup IfxLld_Asclin_Std_IO
1445  * \{ */
1446 
1447 /******************************************************************************/
1448 /*-------------------------Inline Function Prototypes-------------------------*/
1449 /******************************************************************************/
1450 
1451 /** \brief Initializes a CTS input
1452  *
1453  * Attention: the kernel clock has to be disabled whenever the input multiplexer is changed.
1454  *
1455  * This can be done with IfxAsclin_setClockSource(asclinSFR, IfxAsclin_ClockSource_noClock);
1456  *
1457  * After the function call, the current clock can be enabled again.
1458  * \param cts the CTS Pin which should be configured
1459  * \param inputMode the pin input mode which should be configured
1460  * \return None
1461  */
1463 
1464 /** \brief Initializes a RTS output
1465  * \param rts the RTS Pin which should be configured
1466  * \param outputMode the pin output mode which should be configured
1467  * \param padDriver the pad driver mode which should be configured
1468  * \return None
1469  */
1471 
1472 /** \brief Initializes a RX input
1473  *
1474  * Attention: the kernel clock has to be disabled whenever the input multiplexer is changed.
1475  *
1476  * This can be done with IfxAsclin_setClockSource(asclinSFR, IfxAsclin_ClockSource_noClock);
1477  *
1478  * After the function call, the current clock can be enabled again.
1479  * \param rx the RX Pin which should be configured
1480  * \param inputMode the pin input mode which should be configured
1481  * \return None
1482  */
1484 
1485 /** \brief Initializes a SCLK output
1486  * \param sclk the SCLK Pin which should be configured
1487  * \param outputMode the pin output mode which should be configured
1488  * \param padDriver the pad driver mode which should be configured
1489  * \return None
1490  */
1492 
1493 /** \brief Initializes a SLSO output
1494  * \param slso the SLSO Pin which should be configured
1495  * \param outputMode the pin output mode which should be configured
1496  * \param padDriver the pad driver mode which should be configured
1497  * \return None
1498  */
1500 
1501 /** \brief Initializes a TX output
1502  * \param tx the TX Pin which should be configured
1503  * \param outputMode the pin output mode which should be configured
1504  * \param padDriver the pad driver mode which should be configured
1505  * \return None
1506  */
1508 
1509 /** \} */
1510 
1511 /******************************************************************************/
1512 /*-------------------------Inline Function Prototypes-------------------------*/
1513 /******************************************************************************/
1514 
1515 /**
1516  * \param asclin pointer to ASCLIN registers
1517  * \return returns the value of RxDATA register
1518  */
1519 IFX_INLINE uint32 IfxAsclin_readRxData(Ifx_ASCLIN *asclin);
1520 
1521 /**
1522  * \param asclin pointer to ASCLIN registers
1523  * \param data data to be written
1524  * \return None
1525  */
1526 IFX_INLINE void IfxAsclin_writeTxData(Ifx_ASCLIN *asclin, uint32 data);
1527 
1528 /******************************************************************************/
1529 /*---------------------Inline Function Implementations------------------------*/
1530 /******************************************************************************/
1531 
1532 IFX_INLINE void IfxAsclin_clearAllFlags(Ifx_ASCLIN *asclin)
1533 {
1534  asclin->FLAGSCLEAR.U = 0xFFFFFFFF;
1535 }
1536 
1537 
1539 {
1540  asclin->FLAGSCLEAR.B.BDC = 1;
1541 }
1542 
1543 
1545 {
1546  asclin->FLAGSCLEAR.B.CEC = 1;
1547 }
1548 
1549 
1551 {
1552  asclin->FLAGSCLEAR.B.FEDC = 1;
1553 }
1554 
1555 
1557 {
1558  asclin->FLAGSCLEAR.B.FEC = 1;
1559 }
1560 
1561 
1563 {
1564  asclin->FLAGSCLEAR.B.HTC = 1;
1565 }
1566 
1567 
1569 {
1570  asclin->KRSTCLR.B.CLR = 1;
1571 }
1572 
1573 
1575 {
1576  asclin->FLAGSCLEAR.B.LAC = 1;
1577 }
1578 
1579 
1581 {
1582  asclin->FLAGSCLEAR.B.LCC = 1;
1583 }
1584 
1585 
1587 {
1588  asclin->FLAGSCLEAR.B.LPC = 1;
1589 }
1590 
1591 
1593 {
1594  asclin->FLAGSCLEAR.B.PEC = 1;
1595 }
1596 
1597 
1599 {
1600  asclin->FLAGSCLEAR.B.REDC = 1;
1601 }
1602 
1603 
1605 {
1606  asclin->FLAGSCLEAR.B.RTC = 1;
1607 }
1608 
1609 
1611 {
1612  asclin->FLAGSCLEAR.B.RFLC = 1;
1613 }
1614 
1615 
1617 {
1618  asclin->FLAGSCLEAR.B.RFOC = 1;
1619 }
1620 
1621 
1623 {
1624  asclin->FLAGSCLEAR.B.RFUC = 1;
1625 }
1626 
1627 
1629 {
1630  asclin->FLAGSCLEAR.B.RHC = 1;
1631 }
1632 
1633 
1635 {
1636  asclin->FLAGSCLEAR.B.RRC = 1;
1637 }
1638 
1639 
1641 {
1642  asclin->FLAGSCLEAR.B.TCC = 1;
1643 }
1644 
1645 
1647 {
1648  asclin->FLAGSCLEAR.B.TFLC = 1;
1649 }
1650 
1651 
1653 {
1654  asclin->FLAGSCLEAR.B.TFOC = 1;
1655 }
1656 
1657 
1659 {
1660  asclin->FLAGSCLEAR.B.THC = 1;
1661 }
1662 
1663 
1665 {
1666  asclin->FLAGSCLEAR.B.TRC = 1;
1667 }
1668 
1669 
1670 IFX_INLINE void IfxAsclin_disableAllFlags(Ifx_ASCLIN *asclin)
1671 {
1672  asclin->FLAGSENABLE.U = 0x00000000;
1673 }
1674 
1675 
1677 {
1678  asclin->LIN.CON.B.ABD = enable ? 1 : 0;
1679 }
1680 
1681 
1682 IFX_INLINE void IfxAsclin_enableBreakDetectedFlag(Ifx_ASCLIN *asclin, boolean enable)
1683 {
1684  asclin->FLAGSENABLE.B.BDE = enable ? 1 : 0;
1685 }
1686 
1687 
1688 IFX_INLINE void IfxAsclin_enableCollisionDetection(Ifx_ASCLIN *asclin, boolean enable)
1689 {
1690  asclin->FRAMECON.B.CEN = enable ? 1 : 0;
1691 }
1692 
1693 
1695 {
1696  asclin->FLAGSENABLE.B.CEE = enable ? 1 : 0;
1697 }
1698 
1699 
1700 IFX_INLINE void IfxAsclin_enableCts(Ifx_ASCLIN *asclin, boolean enable)
1701 {
1702  asclin->IOCR.B.CTSEN = enable ? 1 : 0;
1703 }
1704 
1705 
1707 {
1708  asclin->FLAGSENABLE.B.FEDE = enable ? 1 : 0;
1709 }
1710 
1711 
1712 IFX_INLINE void IfxAsclin_enableFrameErrorFlag(Ifx_ASCLIN *asclin, boolean enable)
1713 {
1714  asclin->FLAGSENABLE.B.FEE = enable ? 1 : 0;
1715 }
1716 
1717 
1718 IFX_INLINE void IfxAsclin_enableHardwareChecksum(Ifx_ASCLIN *asclin, boolean enable)
1719 {
1720  asclin->LIN.CON.B.CSEN = enable ? 1 : 0;
1721 }
1722 
1723 
1724 IFX_INLINE void IfxAsclin_enableHeaderTimeoutFlag(Ifx_ASCLIN *asclin, boolean enable)
1725 {
1726  asclin->FLAGSENABLE.B.HTE = enable ? 1 : 0;
1727 }
1728 
1729 
1731 {
1732  asclin->FLAGSENABLE.B.ABE = enable ? 1 : 0;
1733 }
1734 
1735 
1736 IFX_INLINE void IfxAsclin_enableLinChecksumErrorFlag(Ifx_ASCLIN *asclin, boolean enable)
1737 {
1738  asclin->FLAGSENABLE.B.LCE = enable ? 1 : 0;
1739 }
1740 
1741 
1742 IFX_INLINE void IfxAsclin_enableLinParityErrorFlag(Ifx_ASCLIN *asclin, boolean enable)
1743 {
1744  asclin->FLAGSENABLE.B.LPE = enable ? 1 : 0;
1745 }
1746 
1747 
1748 IFX_INLINE void IfxAsclin_enableLoopBackMode(Ifx_ASCLIN *asclin, boolean enable)
1749 {
1750  asclin->IOCR.B.LB = enable ? 1 : 0;
1751 }
1752 
1753 
1754 IFX_INLINE void IfxAsclin_enableParity(Ifx_ASCLIN *asclin, boolean enable)
1755 {
1756  asclin->FRAMECON.B.PEN = enable ? 1 : 0;
1757 }
1758 
1759 
1760 IFX_INLINE void IfxAsclin_enableParityErrorFlag(Ifx_ASCLIN *asclin, boolean enable)
1761 {
1762  asclin->FLAGSENABLE.B.PEE = enable ? 1 : 0;
1763 }
1764 
1765 
1767 {
1768  asclin->FLAGSENABLE.B.REDE = enable ? 1 : 0;
1769 }
1770 
1771 
1772 IFX_INLINE void IfxAsclin_enableResponseTimeoutFlag(Ifx_ASCLIN *asclin, boolean enable)
1773 {
1774  asclin->FLAGSENABLE.B.RTE = enable ? 1 : 0;
1775 }
1776 
1777 
1778 IFX_INLINE void IfxAsclin_enableRxFifoFillLevelFlag(Ifx_ASCLIN *asclin, boolean enable)
1779 {
1780  asclin->FLAGSENABLE.B.RFLE = enable ? 1 : 0;
1781 }
1782 
1783 
1784 IFX_INLINE void IfxAsclin_enableRxFifoInlet(Ifx_ASCLIN *asclin, boolean enable)
1785 {
1786  asclin->RXFIFOCON.B.ENI = enable ? 1 : 0;
1787 }
1788 
1789 
1790 IFX_INLINE void IfxAsclin_enableRxFifoOverflowFlag(Ifx_ASCLIN *asclin, boolean enable)
1791 {
1792  asclin->FLAGSENABLE.B.RFOE = enable ? 1 : 0;
1793 }
1794 
1795 
1796 IFX_INLINE void IfxAsclin_enableRxFifoUnderflowFlag(Ifx_ASCLIN *asclin, boolean enable)
1797 {
1798  asclin->FLAGSENABLE.B.RFUE = enable ? 1 : 0;
1799 }
1800 
1801 
1802 IFX_INLINE void IfxAsclin_enableRxHeaderEndFlag(Ifx_ASCLIN *asclin, boolean enable)
1803 {
1804  asclin->FLAGSENABLE.B.RHE = enable ? 1 : 0;
1805 }
1806 
1807 
1808 IFX_INLINE void IfxAsclin_enableRxResponseEndFlag(Ifx_ASCLIN *asclin, boolean enable)
1809 {
1810  asclin->FLAGSENABLE.B.RRE = enable ? 1 : 0;
1811 }
1812 
1813 
1815 {
1816  asclin->FLAGSENABLE.B.TCE = enable ? 1 : 0;
1817 }
1818 
1819 
1820 IFX_INLINE void IfxAsclin_enableTxFifoFillLevelFlag(Ifx_ASCLIN *asclin, boolean enable)
1821 {
1822  asclin->FLAGSENABLE.B.TFLE = enable ? 1 : 0;
1823 }
1824 
1825 
1826 IFX_INLINE void IfxAsclin_enableTxFifoOutlet(Ifx_ASCLIN *asclin, boolean enable)
1827 {
1828  asclin->TXFIFOCON.B.ENO = enable ? 1 : 0;
1829 }
1830 
1831 
1832 IFX_INLINE void IfxAsclin_enableTxFifoOverflowFlag(Ifx_ASCLIN *asclin, boolean enable)
1833 {
1834  asclin->FLAGSENABLE.B.TFOE = enable ? 1 : 0;
1835 }
1836 
1837 
1838 IFX_INLINE void IfxAsclin_enableTxHeaderEndFlag(Ifx_ASCLIN *asclin, boolean enable)
1839 {
1840  asclin->FLAGSENABLE.B.THE = enable ? 1 : 0;
1841 }
1842 
1843 
1844 IFX_INLINE void IfxAsclin_enableTxResponseEndFlag(Ifx_ASCLIN *asclin, boolean enable)
1845 {
1846  asclin->FLAGSENABLE.B.TRE = enable ? 1 : 0;
1847 }
1848 
1849 
1850 IFX_INLINE void IfxAsclin_flushRxFifo(Ifx_ASCLIN *asclin)
1851 {
1852  asclin->RXFIFOCON.B.FLUSH = 1;
1853 }
1854 
1855 
1856 IFX_INLINE void IfxAsclin_flushTxFifo(Ifx_ASCLIN *asclin)
1857 {
1858  asclin->TXFIFOCON.B.FLUSH = 1;
1859 }
1860 
1861 
1863 {
1864  return asclin->FLAGS.B.BD;
1865 }
1866 
1867 
1869 {
1870  return asclin->CSR.B.CLKSEL;
1871 }
1872 
1873 
1874 IFX_INLINE boolean IfxAsclin_getClockStatus(Ifx_ASCLIN *asclin)
1875 {
1876  return asclin->CSR.B.CON;
1877 }
1878 
1879 
1881 {
1882  return asclin->FLAGS.B.CE;
1883 }
1884 
1885 
1887 {
1888  return asclin->FLAGS.B.FED;
1889 }
1890 
1891 
1893 {
1894  return asclin->FLAGS.B.FE;
1895 }
1896 
1897 
1899 {
1900  return asclin->FLAGS.B.HT;
1901 }
1902 
1903 
1904 IFX_INLINE boolean IfxAsclin_getKernelResetStatus(Ifx_ASCLIN *asclin)
1905 {
1906  return asclin->KRST0.B.RSTSTAT;
1907 }
1908 
1909 
1911 {
1912  return asclin->FLAGS.B.LA;
1913 }
1914 
1915 
1917 {
1918  return asclin->FLAGS.B.LC;
1919 }
1920 
1921 
1923 {
1924  return asclin->FLAGS.B.LP;
1925 }
1926 
1927 
1928 IFX_INLINE boolean IfxAsclin_getModuleStatus(Ifx_ASCLIN *asclin)
1929 {
1930  return asclin->CLC.B.DISS;
1931 }
1932 
1933 
1935 {
1936  return asclin->FLAGS.B.PE;
1937 }
1938 
1939 
1941 {
1942  return asclin->BITCON.B.PRESCALER + 1;
1943 }
1944 
1945 
1947 {
1948  return asclin->FLAGS.B.RED;
1949 }
1950 
1951 
1953 {
1954  return asclin->IOCR.B.RXM;
1955 }
1956 
1957 
1959 {
1960  return asclin->FLAGS.B.RT;
1961 }
1962 
1963 
1965 {
1966  return asclin->RXFIFOCON.B.FILL;
1967 }
1968 
1969 
1971 {
1972  return asclin->FLAGS.B.RFL;
1973 }
1974 
1975 
1977 {
1978  return asclin->RXFIFOCON.B.OUTW;
1979 }
1980 
1981 
1983 {
1984  return asclin->FLAGS.B.RFO;
1985 }
1986 
1987 
1989 {
1990  return asclin->FLAGS.B.RFU;
1991 }
1992 
1993 
1995 {
1996  return asclin->FLAGS.B.RH;
1997 }
1998 
1999 
2001 {
2002  return asclin->FLAGS.B.RR;
2003 }
2004 
2005 
2007 {
2008  return asclin->FLAGS.B.TC;
2009 }
2010 
2011 
2013 {
2014  return asclin->IOCR.B.TXM;
2015 }
2016 
2017 
2019 {
2020  return asclin->TXFIFOCON.B.FILL;
2021 }
2022 
2023 
2025 {
2026  return asclin->FLAGS.B.TFL;
2027 }
2028 
2029 
2031 {
2032  return asclin->TXFIFOCON.B.INW;
2033 }
2034 
2035 
2037 {
2038  return asclin->FLAGS.B.TFO;
2039 }
2040 
2041 
2043 {
2044  return asclin->FLAGS.B.TH;
2045 }
2046 
2047 
2049 {
2050  return asclin->FLAGS.B.TR;
2051 }
2052 
2053 
2055 {
2056  IfxPort_setPinModeInput(cts->pin.port, cts->pin.pinIndex, inputMode);
2059 }
2060 
2061 
2063 {
2064  IfxPort_setPinModeOutput(rts->pin.port, rts->pin.pinIndex, outputMode, rts->select);
2065  IfxPort_setPinPadDriver(rts->pin.port, rts->pin.pinIndex, padDriver);
2066 }
2067 
2068 
2070 {
2071  IfxPort_setPinModeInput(rx->pin.port, rx->pin.pinIndex, inputMode);
2073 }
2074 
2075 
2077 {
2078  IfxPort_setPinModeOutput(sclk->pin.port, sclk->pin.pinIndex, outputMode, sclk->select);
2079  IfxPort_setPinPadDriver(sclk->pin.port, sclk->pin.pinIndex, padDriver);
2080 }
2081 
2082 
2084 {
2085  IfxPort_setPinModeOutput(slso->pin.port, slso->pin.pinIndex, outputMode, slso->select);
2086  IfxPort_setPinPadDriver(slso->pin.port, slso->pin.pinIndex, padDriver);
2087 }
2088 
2089 
2091 {
2092  IfxPort_setPinModeOutput(tx->pin.port, tx->pin.pinIndex, outputMode, tx->select);
2093  IfxPort_setPinPadDriver(tx->pin.port, tx->pin.pinIndex, padDriver);
2094 }
2095 
2096 
2098 {
2099  return asclin->RXDATA.U;
2100 }
2101 
2102 
2103 IFX_INLINE void IfxAsclin_setBrdLowerlimt(Ifx_ASCLIN *asclin, uint8 limit)
2104 {
2105  asclin->BRD.B.LOWERLIMIT = limit;
2106 }
2107 
2108 
2109 IFX_INLINE void IfxAsclin_setBrdUpperlimt(Ifx_ASCLIN *asclin, uint8 limit)
2110 {
2111  asclin->BRD.B.UPPERLIMIT = limit;
2112 }
2113 
2114 
2116 {
2117  asclin->LIN.CON.B.CSI = csi;
2118 }
2119 
2120 
2122 {
2123  asclin->DATCON.B.CSM = mode;
2124 }
2125 
2126 
2128 {
2129  asclin->IOCR.B.CPOL = cpol;
2130 }
2131 
2132 
2134 {
2135  asclin->IOCR.B.CTS = ctsi;
2136 }
2137 
2138 
2140 {
2141  asclin->DATCON.B.DATLEN = length;
2142 }
2143 
2144 
2145 IFX_INLINE void IfxAsclin_setDenominator(Ifx_ASCLIN *asclin, uint16 denominator)
2146 {
2147  asclin->BRG.B.DENOMINATOR = denominator;
2148 }
2149 
2150 
2152 {
2153  asclin->CLC.B.DISR = 1;
2154 }
2155 
2156 
2158 {
2159  asclin->CLC.B.DISR = 0;
2160 }
2161 
2162 
2163 IFX_INLINE void IfxAsclin_setFilterDepth(Ifx_ASCLIN *asclin, uint8 depth)
2164 {
2165  asclin->IOCR.B.DEPTH = __minu(depth, 63);
2166 }
2167 
2168 
2170 {
2171  asclin->FRAMECON.B.MODE = mode;
2172 }
2173 
2174 
2176 {
2177  asclin->DATCON.B.HO = type;
2178 }
2179 
2180 
2182 {
2183  asclin->FRAMECON.B.IDLE = delay;
2184 }
2185 
2186 
2187 IFX_INLINE void IfxAsclin_setKernelResetOne(Ifx_ASCLIN *asclin)
2188 {
2189  asclin->KRST1.B.RST = 1;
2190 }
2191 
2192 
2194 {
2195  asclin->KRST0.B.RST = 1;
2196 }
2197 
2198 
2200 {
2201  asclin->FRAMECON.B.LEAD = delay;
2202 }
2203 
2204 
2205 IFX_INLINE void IfxAsclin_setLinBreakLength(Ifx_ASCLIN *asclin, uint8 length)
2206 {
2207  asclin->LIN.BTIMER.B.BREAK = length;
2208 }
2209 
2210 
2211 IFX_INLINE void IfxAsclin_setLinHeaderTimeout(Ifx_ASCLIN *asclin, uint8 timeout)
2212 {
2213  asclin->LIN.HTIMER.B.HEADER = timeout;
2214 }
2215 
2216 
2217 IFX_INLINE void IfxAsclin_setLinMode(Ifx_ASCLIN *asclin, IfxAsclin_LinMode mode)
2218 {
2219  asclin->LIN.CON.B.MS = mode;
2220 }
2221 
2222 
2224 {
2225  asclin->DATCON.B.RM = mode;
2226 }
2227 
2228 
2230 {
2231  asclin->DATCON.B.RESPONSE = __minu(threshold, 256);
2232 }
2233 
2234 
2235 IFX_INLINE void IfxAsclin_setNumerator(Ifx_ASCLIN *asclin, uint16 numerator)
2236 {
2237  asclin->BRG.B.NUMERATOR = numerator;
2238 }
2239 
2240 
2242 {
2243  asclin->BITCON.B.OVERSAMPLING = ovsFactor;
2244 }
2245 
2246 
2248 {
2249  asclin->FRAMECON.B.ODD = type;
2250 }
2251 
2252 
2253 IFX_INLINE void IfxAsclin_setPrescaler(Ifx_ASCLIN *asclin, uint16 prescaler)
2254 {
2255  asclin->BITCON.B.PRESCALER = prescaler - 1;
2256 }
2257 
2258 
2260 {
2261  asclin->IOCR.B.RCPOL = rcpol;
2262 }
2263 
2264 
2266 {
2267  asclin->RXFIFOCON.B.BUF = mode;
2268 }
2269 
2270 
2272 {
2273  asclin->RXFIFOCON.B.INTLEVEL = __minu(level, 15);
2274 }
2275 
2276 
2278 {
2279  asclin->RXFIFOCON.B.OUTW = width;
2280 }
2281 
2282 
2284 {
2285  asclin->IOCR.B.ALTI = alti;
2286 }
2287 
2288 
2289 IFX_INLINE void IfxAsclin_setSampleMode(Ifx_ASCLIN *asclin, IfxAsclin_SamplesPerBit medianFilter)
2290 {
2291  asclin->BITCON.B.SM = medianFilter;
2292 }
2293 
2294 
2296 {
2297  asclin->BITCON.B.SAMPLEPOINT = __minu(spPosition, asclin->BITCON.B.OVERSAMPLING);
2298 }
2299 
2300 
2302 {
2303  asclin->FRAMECON.B.MSB = dir;
2304 }
2305 
2306 
2308 {
2309  asclin->IOCR.B.SPOL = spol;
2310 }
2311 
2312 
2314 {
2316  IfxScuWdt_clearCpuEndinit(passwd);
2317  asclin->CLC.B.EDIS = mode;
2318  IfxScuWdt_setCpuEndinit(passwd);
2319 }
2320 
2321 
2322 IFX_INLINE void IfxAsclin_setStopBit(Ifx_ASCLIN *asclin, IfxAsclin_StopBit stopBit)
2323 {
2324  asclin->FRAMECON.B.STOP = stopBit;
2325 }
2326 
2327 
2329 {
2330  asclin->FLAGSSET.B.THRQS = 1;
2331 }
2332 
2333 
2335 {
2336  asclin->FLAGSSET.B.TRRQS = 1;
2337 }
2338 
2339 
2341 {
2342  asclin->FLAGSSET.B.TWRQS = 1;
2343 }
2344 
2345 
2347 {
2348  asclin->TXFIFOCON.B.INW = width;
2349 }
2350 
2351 
2353 {
2354  asclin->TXFIFOCON.B.INTLEVEL = __minu(level, 15);
2355 }
2356 
2357 
2358 IFX_INLINE void IfxAsclin_writeTxData(Ifx_ASCLIN *asclin, uint32 data)
2359 {
2360  asclin->TXDATA.U = data;
2361 }
2362 
2363 
2364 #endif /* IFXASCLIN_H */