iLLD_TC29x  1.0
IfxHssl.h
Go to the documentation of this file.
1 /**
2  * \file IfxHssl.h
3  * \brief HSSL basic functionality
4  * \ingroup IfxLld_Hssl
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  *
25  * \defgroup IfxLld_Hssl_Std_Enumerations Enumerations
26  * \ingroup IfxLld_Hssl_Std
27  * \defgroup IfxLld_Hssl_Std_HsctFunctions Hsct Functions
28  * \ingroup IfxLld_Hssl_Std
29  * \defgroup IfxLld_Hssl_Std_Structures Data Structures
30  * \ingroup IfxLld_Hssl_Std
31  * \defgroup IfxLld_Hssl_Std_HsslFunctions Hssl Functions
32  * \ingroup IfxLld_Hssl_Std
33  */
34 
35 #ifndef IFXHSSL_H
36 #define IFXHSSL_H 1
37 
38 /******************************************************************************/
39 /*----------------------------------Includes----------------------------------*/
40 /******************************************************************************/
41 
42 #include "_Impl/IfxHssl_cfg.h"
44 #include "IfxHssl_reg.h"
45 #include "IfxHsct_reg.h"
46 #include "Scu/Std/IfxScuWdt.h"
47 #include "IfxHssl_bf.h"
48 #include "IfxHsct_bf.h"
49 #include "Src/Std/IfxSrc.h"
50 
51 /******************************************************************************/
52 /*--------------------------------Enumerations--------------------------------*/
53 /******************************************************************************/
54 
55 /** \addtogroup IfxLld_Hssl_Std_Enumerations
56  * \{ */
57 /** \brief channel selection
58  */
59 typedef enum
60 {
61  IfxHssl_ChannelId_0, /**< \brief Channel 0 */
62  IfxHssl_ChannelId_1, /**< \brief Channel 1 */
63  IfxHssl_ChannelId_2, /**< \brief Channel 2 */
64  IfxHssl_ChannelId_3 /**< \brief Channel 3 */
66 
67 /** \brief SysClk / Reference Clock Frequency rate
68  * Definition in Ifx_HSCT.INIT.B.SRCF
69  */
70 typedef enum
71 {
72  IfxHssl_ClockFrequencyRate_20Mhz = 0, /**< \brief SysClk/ RefClk is 20 MHz (Divider 1/1) */
73  IfxHssl_ClockFrequencyRate_10Mhz = 1 /**< \brief SysClk/ RefClk is 10 MHz (Divider 1/2) */
75 
76 /** \brief communication command selection
77  * Definition in Ifx_HSSL.I.ICON.B.RWT
78  */
79 typedef enum
80 {
81  IfxHssl_Command_noAction = 0, /**< \brief command no action */
82  IfxHssl_Command_readFrame = 1, /**< \brief command read frame */
83  IfxHssl_Command_writeFrame = 2, /**< \brief command write frame */
84  IfxHssl_Command_triggerFrame = 3 /**< \brief command trigger frame */
86 
87 /** \brief predefined control command payload values
88  */
89 typedef enum
90 {
91  IfxHssl_ControlCommand_ping = 0, /**< \brief ping (send by master. Slave sends back a fixed 32-bit payload result.) */
92  IfxHssl_ControlCommand_highSpeedClockStart = 2, /**< \brief slave interface clock multiplier start (in preparation for high speed mode) */
93  IfxHssl_ControlCommand_highSpeedClockStop = 4, /**< \brief slave interface clock multiplier stop (after fallback from high speed mode) */
94  IfxHssl_ControlCommand_lowSpeedTransmission = 8, /**< \brief select low speed mode for transfers from the Master to the Slave */
95  IfxHssl_ControlCommand_highSpeedTransmission = 16, /**< \brief select high speed mode for transfers from the Master to the Slave */
96  IfxHssl_ControlCommand_lowSpeedReception = 32, /**< \brief select low speed mode for transfers from the Slave to the Master */
97  IfxHssl_ControlCommand_mediumSpeedReception = 64, /**< \brief select medium speed mode for transfers from the Slave to the master */
98  IfxHssl_ControlCommand_highSpeedReception = 128, /**< \brief select high speed mode for transfers from the Slave to the master */
99  IfxHssl_ControlCommand_enableReception = 49, /**< \brief enable Slave interface transmitter */
100  IfxHssl_ControlCommand_disableReception = 50, /**< \brief disable Slave interface transmitter */
101  IfxHssl_ControlCommand_turnOnClockTestMode = 52, /**< \brief turn on clock test mode */
102  IfxHssl_ControlCommand_turnOffClockTestMode = 56, /**< \brief turn off clock test mode */
103  IfxHssl_ControlCommand_turnOnPayloadLoopback = 255 /**< \brief turn on payload loopback */
105 
106 /** \brief Defines the length of the data in bits of the write and read command.
107  * Definition in Ifx_HSSL.I.ICON.B.DATLEN
108  */
109 typedef enum
110 {
111  IfxHssl_DataLength_8bit = 0, /**< \brief 8 bit */
112  IfxHssl_DataLength_16bit = 1, /**< \brief 16 bit */
113  IfxHssl_DataLength_32bit = 2 /**< \brief 32 bit */
115 
116 /** \brief HSCT interrupt source
117  * Definition in Ifx_HSCT.IRQ
118  */
119 typedef enum
120 {
121  IfxHssl_Hsct_InterruptSource_headerError = IFX_HSCT_IRQ_HER_OFF, /**< \brief Header error detected */
122  IfxHssl_Hsct_InterruptSource_payloadError = IFX_HSCT_IRQ_PYER_OFF, /**< \brief Payload error detected */
123  IfxHssl_Hsct_InterruptSource_commandError = IFX_HSCT_IRQ_CER_OFF, /**< \brief HSCT Command error */
124  IfxHssl_Hsct_InterruptSource_interfaceControlFrameSend = IFX_HSCT_IRQ_IFCFS_OFF, /**< \brief Interface control frame send */
125  IfxHssl_Hsct_InterruptSource_speedModeSwitchError = IFX_HSCT_IRQ_SMER_OFF, /**< \brief Speed mode switch error */
126  IfxHssl_Hsct_InterruptSource_unsolicitedMessageSendFinished = IFX_HSCT_IRQ_USMSF_OFF, /**< \brief Unsolicited message frame send finished */
127  IfxHssl_Hsct_InterruptSource_pllLockLosterror = IFX_HSCT_IRQ_PLER_OFF, /**< \brief Pll lock lost error */
128  IfxHssl_Hsct_InterruptSource_UnsolicitedMessageReceived = IFX_HSCT_IRQ_USM_OFF, /**< \brief Unsolicited message received */
129  IfxHssl_Hsct_InterruptSource_pingAnswerReceived = IFX_HSCT_IRQ_PAR_OFF, /**< \brief PING Answer Received */
130  IfxHssl_Hsct_InterruptSource_txTransferError = IFX_HSCT_IRQ_TXTE_OFF, /**< \brief TX transfer error occurred on a disabled
131  * TX channel */
132  IfxHssl_Hsct_InterruptSource_synchronizationFifoOverflow = IFX_HSCT_IRQ_SFO_OFF, /**< \brief Synchronization FIFO overflow (in RX
133  * direction) */
134  IfxHssl_Hsct_InterruptSource_synchronizationFifoUnderflow = IFX_HSCT_IRQ_SFU_OFF /**< \brief Synchronization FIFO underflow (in TX
135  * direction) */
137 
138 /** \brief Enable/disable the sensitivity of the module to sleep signal\n
139  * Definition in Ifx_HSCT.CLC.B.EDIS
140  */
141 typedef enum
142 {
143  IfxHssl_Hsct_SleepMode_enable = 0, /**< \brief enables sleep mode */
144  IfxHssl_Hsct_SleepMode_disable = 1 /**< \brief disables sleep mode */
146 
147 /** \brief Enable/disable the sensitivity of the module to sleep signal\n
148  * Definition in Ifx_HSSL.CLC.B.EDIS
149  */
150 typedef enum
151 {
152  IfxHssl_Hssl_SleepMode_enable = 0, /**< \brief enables sleep mode */
153  IfxHssl_Hssl_SleepMode_disable = 1 /**< \brief disables sleep mode */
155 
156 /** \brief interface mode (master IF /slave IF)
157  * Definition in Ifx_HSCT.INIT.B.IFM
158  */
159 typedef enum
160 {
161  IfxHssl_InterfaceMode_master = 0, /**< \brief master IF mode */
162  IfxHssl_InterfaceMode_slave = 1 /**< \brief slave IF mode */
164 
165 /** \brief master mode receive speed
166  * Definition in Ifx_HSCT.IFCTRL.B.MRXSPEED
167  */
168 typedef enum
169 {
170  IfxHssl_MasterModeRxSpeed_lowSpeed = 0, /**< \brief low speed */
171  IfxHssl_MasterModeRxSpeed_mediumSpeed = 1, /**< \brief medium speed */
172  IfxHssl_MasterModeRxSpeed_highSpeed = 2 /**< \brief high speed */
174 
175 /** \brief master mode transmit speed
176  * Definition in Ifx_HSCT.IFCTRL.B.MTXSPEED
177  */
178 typedef enum
179 {
180  IfxHssl_MasterModeTxSpeed_lowSpeed = 0, /**< \brief low speed */
181  IfxHssl_MasterModeTxSpeed_highSpeed = 2 /**< \brief high speed */
183 
184 /** \brief PLL reference clock
185  * Definition in Ifx_HSCT.CONFIGPHY.B.OSCCLKEN
186  */
187 typedef enum
188 {
189  IfxHssl_PllReferenceClock_hsctSystemClockInput = 0, /**< \brief hsct system clock input (HSCT SysClk_i) */
190  IfxHssl_PllReferenceClock_oscillatorInput = 1 /**< \brief oscillator input */
192 
193 /** \brief streaming mode ( single / continuous )
194  * Definition in Ifx_HSSL.CFG.B.SMT/SMR
195  */
196 typedef enum
197 {
198  IfxHssl_StreamingMode_continuous = 0, /**< \brief streaming mode continuous (with two memory blocks) */
199  IfxHssl_StreamingMode_single = 1 /**< \brief streaming mode single (with one memory block) */
201 
202 /** \} */
203 
204 /** \brief HSSL channel error interrupt source, which triggers the ERR interrupt
205  * Definition in Ifx_HSSL.MFLAGS
206  */
207 typedef enum
208 {
209  IfxHssl_Hssl_ERRInterruptSource_notAcknowledgeError = IFX_HSSL_MFLAGS_NACK_OFF, /**< \brief NACK error (triggers ERR interrupt) */
210  IfxHssl_Hssl_ERRInterruptSource_transactionTagError = IFX_HSSL_MFLAGS_TTE_OFF, /**< \brief Transaction Tag Error (triggers ERR interrupt) */
211  IfxHssl_Hssl_ERRInterruptSource_timeoutError = IFX_HSSL_MFLAGS_TIMEOUT_OFF, /**< \brief Timeout error (triggers ERR interrupt) */
212  IfxHssl_Hssl_ERRInterruptSource_unexpectedError = IFX_HSSL_MFLAGS_UNEXPECTED_OFF /**< \brief Unexpected error (triggers ERR interrupt) */
214 
215 /** \brief HSSL global error interrupt source, which triggers the EXI interrupt
216  * Definition in Ifx_HSSL.MFLAGS
217  */
218 typedef enum
219 {
220  IfxHssl_Hssl_EXIInterruptSource_memoryAccessViolation = IFX_HSSL_MFLAGS_MAV_OFF, /**< \brief Memory Access Violation error (triggers EXI interrupt) */
221  IfxHssl_Hssl_EXIInterruptSource_busAccessError = IFX_HSSL_MFLAGS_SRIE_OFF, /**< \brief SRI/SPB Bus Access Error (triggers EXI interrupt) */
222  IfxHssl_Hssl_EXIInterruptSource_channelNumberCodeError = IFX_HSSL_MFLAGS_PIE1_OFF, /**< \brief PHY Inconsistency Error 1 (Channel Number
223  * Code Error, triggers EXI interrupt) */
224  IfxHssl_Hssl_EXIInterruptSource_dataLengthError = IFX_HSSL_MFLAGS_PIE2_OFF, /**< \brief PHY Inconsistency Error 2 (Data Length Error, triggers EXI interrupt) */
225  IfxHssl_Hssl_EXIInterruptSource_crcError = IFX_HSSL_MFLAGS_CRCE_OFF /**< \brief CRC error (triggers EXI interrupt) */
227 
228 /******************************************************************************/
229 /*-----------------------------Data Structures--------------------------------*/
230 /******************************************************************************/
231 
232 /** \addtogroup IfxLld_Hssl_Std_Structures
233  * \{ */
234 /** \brief HSCT module handle
235  */
236 typedef struct
237 {
238  Ifx_HSCT *hsct; /**< \brief pointer to HSCT registers */
239 } IfxHssl_Hsct;
240 
241 /** \brief Configuration structure of the HSCT module
242  */
243 typedef struct
244 {
245  Ifx_HSCT *hsct; /**< \brief pointer to HSCT registers */
246  IfxHssl_InterfaceMode interfaceMode; /**< \brief interface mode (master IF /slave IF) */
247  boolean highSpeedMode; /**< \brief high speed mode selection */
249 
250 /** \} */
251 
252 /** \addtogroup IfxLld_Hssl_Std_HsctFunctions
253  * \{ */
254 
255 /******************************************************************************/
256 /*-------------------------Inline Function Prototypes-------------------------*/
257 /******************************************************************************/
258 
259 /** \brief Clears the HSCT interrupt flag
260  * \param hsct pointer to HSCT registers
261  * \param source HSCT interrupt source
262  * \return None
263  */
265 
266 /** \brief Enables HSCT interrupt flag
267  * \param hsct pointer to HSCT registers
268  * \param source HSCT interrupt source
269  * \return None
270  */
272 
273 /** \brief Enables HSCT interrupt
274  * \param hsct pointer to HSCT registers
275  * \param typeOfService Type of Service (Cpu or DMA)
276  * \param priority Priority of the interrupt
277  * \return None
278  */
279 IFX_INLINE void IfxHssl_enableHsctInterrupt(Ifx_HSCT *hsct, IfxSrc_Tos typeOfService, uint16 priority);
280 
281 /** \brief Enables HSCT interrupt flag
282  * \param hsct pointer to HSCT registers
283  * \param source HSCT interrupt source
284  * \return None
285  */
287 
288 /** \brief Returns the HSCT interrupt flag status
289  * \param hsct pointer to HSCT registers
290  * \param source HSCT interrupt source
291  * \return Status (TRUE / FALSE)
292  */
294 
295 /** \brief Sets the sensitivity of the module to sleep signal
296  * \param hsct pointer to HSCT registers
297  * \param mode mode selection (enable/disable)
298  * \return None
299  */
301 
302 /******************************************************************************/
303 /*-------------------------Global Function Prototypes-------------------------*/
304 /******************************************************************************/
305 
306 /** \brief Enables hsct module
307  * \param hsct pointer to HSCT registers
308  * \return None
309  */
310 IFX_EXTERN void IfxHssl_enableHsctModule(Ifx_HSCT *hsct);
311 
312 /** \brief Returns the SRC pointer for HSCT
313  * \param hsct pointer to HSCT registers
314  * \return SRC pointer for HSCT
315  */
316 IFX_EXTERN volatile Ifx_SRC_SRCR *IfxHssl_getHsctSrcPointer(Ifx_HSCT *hsct);
317 
318 /** \} */
319 
320 /** \addtogroup IfxLld_Hssl_Std_HsslFunctions
321  * \{ */
322 
323 /******************************************************************************/
324 /*-------------------------Inline Function Prototypes-------------------------*/
325 /******************************************************************************/
326 
327 /** \brief Clears the HSSl channel error interrupt flag
328  * \param hssl pointer to HSSl registers
329  * \param source HSSL channel error interrupt source
330  * \param channelId HSSL channel number
331  * \return None
332  */
334 
335 /** \brief Clears the HSSl global error interrupt flag
336  * \param hssl pointer to HSSl registers
337  * \param source HSSL channel error interrupt source
338  * \return None
339  */
341 
342 /** \brief Enables the HSSl channel error interrupt flag, which trggers the ERR interrupt
343  * \param hssl pointer to HSSl registers
344  * \param source HSSL channel error interrupt source
345  * \param channelId HSSL channel number
346  * \return None
347  */
349 
350 /** \brief Disables the HSSl channel error interrupt flag, which trggers the EXI interrupt
351  * \param hssl pointer to HSSl registers
352  * \param source HSSL channel error interrupt source
353  * \return None
354  */
356 
357 /** \brief Enables HSSL COK interrupt of specified channel
358  * \param hssl pointer to HSSl registers
359  * \param channelId HSSL channel number
360  * \param typeOfService Type of Service (Cpu or DMA)
361  * \param priority Priority of the interrupt
362  * \return None
363  */
364 IFX_INLINE void IfxHssl_enableHsslCOKInterrupt(Ifx_HSSL *hssl, IfxHssl_ChannelId channelId, IfxSrc_Tos typeOfService, uint16 priority);
365 
366 /** \brief Enables the HSSl channel error interrupt flag, which trggers the ERR interrupt
367  * \param hssl pointer to HSSl registers
368  * \param source HSSL channel error interrupt source
369  * \param channelId HSSL channel number
370  * \return None
371  */
373 
374 /** \brief Enables HSSL ERR interrupt of specified channel
375  * \param hssl pointer to HSSl registers
376  * \param channelId HSSL channel number
377  * \param typeOfService Type of Service (Cpu or DMA)
378  * \param priority Priority of the interrupt
379  * \return None
380  */
381 IFX_INLINE void IfxHssl_enableHsslERRInterrupt(Ifx_HSSL *hssl, IfxHssl_ChannelId channelId, IfxSrc_Tos typeOfService, uint16 priority);
382 
383 /** \brief Enables HSSL EXI interrupt of specified channel
384  * \param hssl pointer to HSSl registers
385  * \param typeOfService Type of Service (Cpu or DMA)
386  * \param priority Priority of the interrupt
387  * \return None
388  */
389 IFX_INLINE void IfxHssl_enableHsslEXIInterrupt(Ifx_HSSL *hssl, IfxSrc_Tos typeOfService, uint16 priority);
390 
391 /** \brief Enables the HSSl global error interrupt flag, which trggers the EXI interrupt
392  * \param hssl pointer to HSSl registers
393  * \param source HSSL channel error interrupt source
394  * \return None
395  */
397 
398 /** \brief Enables HSSL RDI interrupt of specified channel
399  * \param hssl pointer to HSSl registers
400  * \param channelId HSSL channel number
401  * \param typeOfService Type of Service (Cpu or DMA)
402  * \param priority Priority of the interrupt
403  * \return None
404  */
405 IFX_INLINE void IfxHssl_enableHsslRDIInterrupt(Ifx_HSSL *hssl, IfxHssl_ChannelId channelId, IfxSrc_Tos typeOfService, uint16 priority);
406 
407 /** \brief Enables HSSL TRG interrupt of specified channel
408  * \param hssl pointer to HSSl registers
409  * \param channelId HSSL channel number
410  * \param typeOfService Type of Service (Cpu or DMA)
411  * \param priority Priority of the interrupt
412  * \return None
413  */
414 IFX_INLINE void IfxHssl_enableHsslTRGInterrupt(Ifx_HSSL *hssl, IfxHssl_ChannelId channelId, IfxSrc_Tos typeOfService, uint16 priority);
415 
416 /** \brief Clears the HSSl channel error interrupt flag
417  * \param hssl pointer to HSSl registers
418  * \param source HSSL channel error interrupt source
419  * \param channelId HSSL channel number
420  * \return Status (TRUE / FALSE)
421  */
423 
424 /** \brief Clears the HSSl global error interrupt flag
425  * \param hssl pointer to HSSl registers
426  * \param source HSSL channel error interrupt source
427  * \return Status (TRUE / FALSE)
428  */
430 
431 /** \brief Sets the sensitivity of the module to sleep signal
432  * \param hssl pointer to HSSL registers
433  * \param mode mode selection (enable/disable)
434  * \return None
435  */
437 
438 /******************************************************************************/
439 /*-------------------------Global Function Prototypes-------------------------*/
440 /******************************************************************************/
441 
442 /** \brief Enables the hssl module
443  * \param hssl pointer to HSSl registers
444  * \return None
445  */
446 IFX_EXTERN void IfxHssl_enableHsslModule(Ifx_HSSL *hssl);
447 
448 /** \brief Returns the SRC pointer for HSSL COK of specified channel
449  * \param hssl pointer to HSSl registers
450  * \param channelId HSSL channel number
451  * \return SRC pointer for HSSL COK interrupt of specific channel
452  */
453 IFX_EXTERN volatile Ifx_SRC_SRCR *IfxHssl_getHsslCOKSrcPointer(Ifx_HSSL *hssl, IfxHssl_ChannelId channelId);
454 
455 /** \brief Returns the SRC pointer for HSSL ERR of specified channel
456  * \param hssl pointer to HSSl registers
457  * \param channelId HSSL channel number
458  * \return SRC pointer for HSSL ERR interrupt of specific channel
459  */
460 IFX_EXTERN volatile Ifx_SRC_SRCR *IfxHssl_getHsslERRSrcPointer(Ifx_HSSL *hssl, IfxHssl_ChannelId channelId);
461 
462 /** \brief Returns the SRC pointer for HSSL EXI interrupt
463  * \param hssl pointer to HSSl registers
464  * \return SRC pointer for HSSL EXI interrupt
465  */
466 IFX_EXTERN volatile Ifx_SRC_SRCR *IfxHssl_getHsslEXISrcPointer(Ifx_HSSL *hssl);
467 
468 /** \brief Returns the SRC pointer for HSSL COK of specified channel
469  * \param hssl pointer to HSSl registers
470  * \param channelId HSSL channel number
471  * \return SRC pointer for HSSL RDI interrupt of specific channel
472  */
473 IFX_EXTERN volatile Ifx_SRC_SRCR *IfxHssl_getHsslRDISrcPointer(Ifx_HSSL *hssl, IfxHssl_ChannelId channelId);
474 
475 /** \brief Returns the SRC pointer for HSSL TRG of specified channel
476  * \param hssl pointer to HSSl registers
477  * \param channelId HSSL channel number
478  * \return SRC pointer for HSSL TRG interrupt of specific channel
479  */
480 IFX_EXTERN volatile Ifx_SRC_SRCR *IfxHssl_getHsslTRGSrcPointer(Ifx_HSSL *hssl, IfxHssl_ChannelId channelId);
481 
482 /** \brief resets the HSSL kernel
483  * \param hssl pointer to HSSL registers
484  * \return None
485  */
486 IFX_EXTERN void IfxHssl_resetHsslKernel(Ifx_HSSL *hssl);
487 
488 /** \} */
489 
490 /******************************************************************************/
491 /*-------------------------Global Function Prototypes-------------------------*/
492 /******************************************************************************/
493 
494 /** \brief resets HSCT kernel
495  * \param hsct pointer to HSCT registers
496  * \return None
497  */
498 IFX_EXTERN void IfxHssl_resetHsctKernel(Ifx_HSCT *hsct);
499 
500 /******************************************************************************/
501 /*---------------------Inline Function Implementations------------------------*/
502 /******************************************************************************/
503 
505 {
506  uint32 value = 1 << source;
507  hsct->IRQCLR.U &= ~value;
508 }
509 
510 
512 {
513  uint32 value = 1 << ((uint32)(channelId + source));
514  hssl->MFLAGSCL.U &= ~value;
515 }
516 
517 
519 {
520  uint32 value = 1 << source;
521  hssl->MFLAGSCL.U &= ~value;
522 }
523 
524 
526 {
527  uint32 value = 1 << source;
528  hsct->IRQEN.U &= ~value;
529 }
530 
531 
533 {
534  uint32 value = 1 << ((uint32)(channelId + source));
535  hssl->MFLAGSEN.U &= ~value;
536 }
537 
538 
540 {
541  uint32 value = 1 << source;
542  hssl->MFLAGSEN.U &= ~value;
543 }
544 
545 
546 IFX_INLINE void IfxHssl_enableHsctInterrupt(Ifx_HSCT *hsct, IfxSrc_Tos typeOfService, uint16 priority)
547 {
548  volatile Ifx_SRC_SRCR *src;
549  src = IfxHssl_getHsctSrcPointer(hsct);
550  IfxSrc_init(src, typeOfService, priority);
551  IfxSrc_enable(src);
552 }
553 
554 
556 {
557  uint32 value = 1 << source;
558  hsct->IRQEN.U |= value;
559 }
560 
561 
562 IFX_INLINE void IfxHssl_enableHsslCOKInterrupt(Ifx_HSSL *hssl, IfxHssl_ChannelId channelId, IfxSrc_Tos typeOfService, uint16 priority)
563 {
564  volatile Ifx_SRC_SRCR *src;
565  src = IfxHssl_getHsslCOKSrcPointer(hssl, channelId);
566  IfxSrc_init(src, typeOfService, priority);
567  IfxSrc_enable(src);
568 }
569 
570 
572 {
573  uint32 value = 1 << ((uint32)(channelId + source));
574  hssl->MFLAGSEN.U |= value;
575 }
576 
577 
578 IFX_INLINE void IfxHssl_enableHsslERRInterrupt(Ifx_HSSL *hssl, IfxHssl_ChannelId channelId, IfxSrc_Tos typeOfService, uint16 priority)
579 {
580  volatile Ifx_SRC_SRCR *src;
581  src = IfxHssl_getHsslERRSrcPointer(hssl, channelId);
582  IfxSrc_init(src, typeOfService, priority);
583  IfxSrc_enable(src);
584 }
585 
586 
587 IFX_INLINE void IfxHssl_enableHsslEXIInterrupt(Ifx_HSSL *hssl, IfxSrc_Tos typeOfService, uint16 priority)
588 {
589  volatile Ifx_SRC_SRCR *src;
590  src = IfxHssl_getHsslEXISrcPointer(hssl);
591  IfxSrc_init(src, typeOfService, priority);
592  IfxSrc_enable(src);
593 }
594 
595 
597 {
598  uint32 value = 1 << source;
599  hssl->MFLAGSEN.U |= value;
600 }
601 
602 
603 IFX_INLINE void IfxHssl_enableHsslRDIInterrupt(Ifx_HSSL *hssl, IfxHssl_ChannelId channelId, IfxSrc_Tos typeOfService, uint16 priority)
604 {
605  volatile Ifx_SRC_SRCR *src;
606  src = IfxHssl_getHsslRDISrcPointer(hssl, channelId);
607  IfxSrc_init(src, typeOfService, priority);
608  IfxSrc_enable(src);
609 }
610 
611 
612 IFX_INLINE void IfxHssl_enableHsslTRGInterrupt(Ifx_HSSL *hssl, IfxHssl_ChannelId channelId, IfxSrc_Tos typeOfService, uint16 priority)
613 {
614  volatile Ifx_SRC_SRCR *src;
615  src = IfxHssl_getHsslTRGSrcPointer(hssl, channelId);
616  IfxSrc_init(src, typeOfService, priority);
617  IfxSrc_enable(src);
618 }
619 
620 
622 {
623  return (hsct->IRQ.U >> source) & 0x1;
624 }
625 
626 
628 {
629  return (hssl->MFLAGS.U >> ((uint32)(channelId + source))) & 0x1;
630 }
631 
632 
634 {
635  return (hssl->MFLAGS.U >> source) & 0x1;
636 }
637 
638 
640 {
643  hsct->CLC.B.EDIS = mode;
644  IfxScuWdt_setCpuEndinit(passwd);
645 }
646 
647 
649 {
652  hssl->CLC.B.EDIS = mode;
653  IfxScuWdt_setCpuEndinit(passwd);
654 }
655 
656 
657 #endif /* IFXHSSL_H */