]> git.donarmstrong.com Git - qmk_firmware.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_MCU_K64F/MK64F12/fsl_sim_hal_K64F12.c
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[qmk_firmware.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / hal / TARGET_Freescale / TARGET_KPSDK_MCUS / TARGET_MCU_K64F / MK64F12 / fsl_sim_hal_K64F12.c
1 /*
2  * Copyright (c) 2013 - 2014, Freescale Semiconductor, Inc.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without modification,
6  * are permitted provided that the following conditions are met:
7  *
8  * o Redistributions of source code must retain the above copyright notice, this list
9  *   of conditions and the following disclaimer.
10  *
11  * o Redistributions in binary form must reproduce the above copyright notice, this
12  *   list of conditions and the following disclaimer in the documentation and/or
13  *   other materials provided with the distribution.
14  *
15  * o Neither the name of Freescale Semiconductor, Inc. nor the names of its
16  *   contributors may be used to endorse or promote products derived from this
17  *   software without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
23  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30
31 #include <stdint.h>
32 #include <stdlib.h>
33 #include <stdbool.h>
34 #include "fsl_device_registers.h"
35 #include "fsl_sim_hal_K64F12.h"
36 #include "fsl_sim_hal.h"
37
38 /*******************************************************************************
39  * Definitions
40  ******************************************************************************/
41
42 /*! @brief CLOCK name config table for K64*/
43 const clock_name_config_t kClockNameConfigTable [] =  {
44     {false, kSystemClock,     kClockDividerOutdiv1},
45     {false, kSystemClock,     kClockDividerOutdiv1},
46     {false, kSystemClock,     kClockDividerOutdiv1},
47     {false, kSystemClock,     kClockDividerOutdiv2},
48     {false, kSystemClock,     kClockDividerOutdiv3},
49     {false, kSystemClock,     kClockDividerOutdiv4}
50 };
51
52 /*******************************************************************************
53  * APIs
54  ******************************************************************************/
55
56 /*FUNCTION**********************************************************************
57  *
58  * Function Name : SIM_HAL_EnableDmaClock
59  * Description   : Enable the clock for DMA module
60  * This function enables the clock for DMA moudle
61  *
62  *END**************************************************************************/
63 void SIM_HAL_EnableDmaClock(uint32_t baseAddr, uint32_t instance)
64 {
65     BW_SIM_SCGC7_DMA(baseAddr, 1);
66 }
67
68 /*FUNCTION**********************************************************************
69  *
70  * Function Name : SIM_HAL_DisableDmaClock
71  * Description   : Disable the clock for DMA module
72  * This function disables the clock for DMA moudle
73  *
74  *END**************************************************************************/
75 void SIM_HAL_DisableDmaClock(uint32_t baseAddr, uint32_t instance)
76 {
77     BW_SIM_SCGC7_DMA(baseAddr, 0);
78 }
79
80 /*FUNCTION**********************************************************************
81  *
82  * Function Name : SIM_HAL_GetDmaGateCmd
83  * Description   : Get the the clock gate state for DMA module
84  * This function will get the clock gate state for DMA moudle
85  *
86  *END**************************************************************************/
87 bool SIM_HAL_GetDmaGateCmd(uint32_t baseAddr, uint32_t instance)
88 {
89     return BR_SIM_SCGC7_DMA(baseAddr);
90 }
91
92 /*FUNCTION**********************************************************************
93  *
94  * Function Name : SIM_HAL_EnableDmamuxClock
95  * Description   : Enable the clock for DMAMUX module
96  * This function enables the clock for DMAMUX moudle
97  *
98  *END**************************************************************************/
99 void SIM_HAL_EnableDmamuxClock(uint32_t baseAddr, uint32_t instance)
100 {
101     BW_SIM_SCGC6_DMAMUX(baseAddr, 1);
102 }
103
104 /*FUNCTION**********************************************************************
105  *
106  * Function Name : SIM_HAL_DisableDmamuxClock
107  * Description   : Disable the clock for DMAMUX module
108  * This function disables the clock for DMAMUX moudle
109  *
110  *END**************************************************************************/
111 void SIM_HAL_DisableDmamuxClock(uint32_t baseAddr, uint32_t instance)
112 {
113     BW_SIM_SCGC6_DMAMUX(baseAddr, 0);
114 }
115
116 /*FUNCTION**********************************************************************
117  *
118  * Function Name : SIM_HAL_GetDmamuxGateCmd
119  * Description   : Get the the clock gate state for DMAMUX module
120  * This function will get the clock gate state for DMAMUX moudle
121  *
122  *END**************************************************************************/
123 bool SIM_HAL_GetDmamuxGateCmd(uint32_t baseAddr, uint32_t instance)
124 {
125     return BR_SIM_SCGC6_DMAMUX(baseAddr);
126 }
127
128 /*FUNCTION**********************************************************************
129  *
130  * Function Name : SIM_HAL_EnablePortClock
131  * Description   : Enable the clock for PORT module
132  * This function enables the clock for PORT moudle
133  *
134  *END**************************************************************************/
135 void SIM_HAL_EnablePortClock(uint32_t baseAddr, uint32_t instance)
136 {
137     switch (instance)
138     {
139     case 0:
140         BW_SIM_SCGC5_PORTA(baseAddr, 1);
141         break;
142     case 1:
143         BW_SIM_SCGC5_PORTB(baseAddr, 1);
144         break;
145     case 2:
146         BW_SIM_SCGC5_PORTC(baseAddr, 1);
147         break;
148     case 3:
149         BW_SIM_SCGC5_PORTD(baseAddr, 1);
150         break;
151     case 4:
152         BW_SIM_SCGC5_PORTE(baseAddr, 1);
153         break;
154     default:
155         break;
156     }
157 }
158
159 /*FUNCTION**********************************************************************
160  *
161  * Function Name : SIM_HAL_DisablePortClock
162  * Description   : Disable the clock for PORT module
163  * This function disables the clock for PORT moudle
164  *
165  *END**************************************************************************/
166 void SIM_HAL_DisablePortClock(uint32_t baseAddr, uint32_t instance)
167 {
168     switch (instance)
169     {
170     case 0:
171         BW_SIM_SCGC5_PORTA(baseAddr, 0);
172         break;
173     case 1:
174         BW_SIM_SCGC5_PORTB(baseAddr, 0);
175         break;
176     case 2:
177         BW_SIM_SCGC5_PORTC(baseAddr, 0);
178         break;
179     case 3:
180         BW_SIM_SCGC5_PORTD(baseAddr, 0);
181         break;
182     case 4:
183         BW_SIM_SCGC5_PORTE(baseAddr, 0);
184         break;
185     default:
186         break;
187     }
188 }
189
190 /*FUNCTION**********************************************************************
191  *
192  * Function Name : SIM_HAL_GetPortGateCmd
193  * Description   : Get the the clock gate state for PORT module
194  * This function will get the clock gate state for PORT moudle.
195  *
196  *END**************************************************************************/
197 bool SIM_HAL_GetPortGateCmd(uint32_t baseAddr, uint32_t instance)
198 {
199     bool retValue = false;
200
201     switch (instance)
202     {
203     case 0:
204         retValue =  BR_SIM_SCGC5_PORTA(baseAddr);
205         break;
206     case 1:
207         retValue =  BR_SIM_SCGC5_PORTB(baseAddr);
208         break;
209     case 2:
210         retValue =  BR_SIM_SCGC5_PORTC(baseAddr);
211         break;
212     case 3:
213         retValue =  BR_SIM_SCGC5_PORTD(baseAddr);
214         break;
215     case 4:
216         retValue =  BR_SIM_SCGC5_PORTE(baseAddr);
217         break;
218     default:
219         retValue =  false;
220         break;
221     }
222
223     return retValue;
224 }
225
226 /*FUNCTION**********************************************************************
227  *
228  * Function Name : SIM_HAL_EnableMpuClock
229  * Description   : Enable the clock for MPU module
230  * This function enables the clock for MPU moudle.
231  *
232  *END**************************************************************************/
233 void SIM_HAL_EnableMpuClock(uint32_t baseAddr, uint32_t instance)
234 {
235     BW_SIM_SCGC7_MPU(baseAddr, 1);
236 }
237
238 /*FUNCTION**********************************************************************
239  *
240  * Function Name : SIM_HAL_DisableMpuClock
241  * Description   : Disable the clock for MPU module.
242  * This function disables the clock for MPU moudle.
243  *
244  *END**************************************************************************/
245 void SIM_HAL_DisableMpuClock(uint32_t baseAddr, uint32_t instance)
246 {
247     BW_SIM_SCGC7_MPU(baseAddr, 0);
248 }
249
250 /*FUNCTION**********************************************************************
251  *
252  * Function Name : SIM_HAL_GetMpuGateCmd
253  * Description   : Get the the clock gate state for MPU module
254  * This function will get the clock gate state for MPU moudl.
255  *
256  *END**************************************************************************/
257 bool SIM_HAL_GetMpuGateCmd(uint32_t baseAddr, uint32_t instance)
258 {
259     return BR_SIM_SCGC7_MPU(baseAddr);
260 }
261
262 /*FUNCTION**********************************************************************
263  *
264  * Function Name : SIM_HAL_EnableEwmClock
265  * Description   : Enable the clock for EWM module
266  * This function enables the clock for EWM moudle.
267  *
268  *END**************************************************************************/
269 void SIM_HAL_EnableEwmClock(uint32_t baseAddr, uint32_t instance)
270 {
271     BW_SIM_SCGC4_EWM(baseAddr, 1);
272 }
273
274 /*FUNCTION**********************************************************************
275  *
276  * Function Name : SIM_HAL_DisableEwmClock
277  * Description   : Disable the clock for EWM modul
278  * This function disables the clock for EWM moudle.
279  *
280  *END**************************************************************************/
281 void SIM_HAL_DisableEwmClock(uint32_t baseAddr, uint32_t instance)
282 {
283     BW_SIM_SCGC4_EWM(baseAddr, 0);
284 }
285
286 /*FUNCTION**********************************************************************
287  *
288  * Function Name : SIM_HAL_GetEwmGateCmd
289  * Description   : Get the the clock gate state for EWM module
290  * This function will get the clock gate state for EWM moudle.
291  *
292  *END**************************************************************************/
293 bool SIM_HAL_GetEwmGateCmd(uint32_t baseAddr, uint32_t instance)
294 {
295     return BR_SIM_SCGC4_EWM(baseAddr);
296 }
297
298 /*FUNCTION**********************************************************************
299  *
300  * Function Name : SIM_HAL_EnableFlexbusClock
301  * Description   : Enable the clock for FLEXBUS module
302  * This function enables the clock for FLEXBUS moudle.
303  *
304  *END**************************************************************************/
305 void SIM_HAL_EnableFlexbusClock(uint32_t baseAddr, uint32_t instance)
306 {
307     BW_SIM_SCGC7_FLEXBUS(baseAddr, 1);
308 }
309
310 /*FUNCTION**********************************************************************
311  *
312  * Function Name : SIM_HAL_DisableFlexbusClock
313  * Description   : Disable the clock for FLEXBUS module
314  * This function disables the clock for FLEXBUS moudle.
315  *
316  *END**************************************************************************/
317 void SIM_HAL_DisableFlexbusClock(uint32_t baseAddr, uint32_t instance)
318 {
319     BW_SIM_SCGC7_FLEXBUS(baseAddr, 0);
320 }
321
322 /*FUNCTION**********************************************************************
323  *
324  * Function Name : SIM_HAL_GetFlexbusGateCmd
325  * Description   : Get the the clock gate state for FLEXBUS module
326  * This function will get the clock gate state for FLEXBUS moudle.
327  *
328  *END**************************************************************************/
329 bool SIM_HAL_GetFlexbusGateCmd(uint32_t baseAddr, uint32_t instance)
330 {
331     return BR_SIM_SCGC7_FLEXBUS(baseAddr);
332 }
333
334 /*FUNCTION**********************************************************************
335  *
336  * Function Name : SIM_HAL_EnableFtfClock
337  * Description   : Enable the clock for FTF module
338  * This function enables the clock for FTF moudle.
339  *
340  *END**************************************************************************/
341 void SIM_HAL_EnableFtfClock(uint32_t baseAddr, uint32_t instance)
342 {
343     BW_SIM_SCGC6_FTF(baseAddr, 1);
344 }
345
346 /*FUNCTION**********************************************************************
347  *
348  * Function Name : SIM_HAL_DisableFtfClock
349  * Description   : Disable the clock for FTF module
350  * This function disables the clock for FTF moudle.
351  *
352  *END**************************************************************************/
353 void SIM_HAL_DisableFtfClock(uint32_t baseAddr, uint32_t instance)
354 {
355     BW_SIM_SCGC6_FTF(baseAddr, 0);
356 }
357
358 /*FUNCTION**********************************************************************
359  *
360  * Function Name : SIM_HAL_GetFtfGateCmd
361  * Description   : Get the the clock gate state for FTF module
362  * This function will get the clock gate state for FTF moudle.
363  *
364  *END**************************************************************************/
365 bool SIM_HAL_GetFtfGateCmd(uint32_t baseAddr, uint32_t instance)
366 {
367     return BR_SIM_SCGC6_FTF(baseAddr);
368 }
369
370 /*FUNCTION**********************************************************************
371  *
372  * Function Name : SIM_HAL_EnableCrcClock
373  * Description   : Enable the clock for CRC module
374  * This function enables the clock for CRC moudle.
375  *
376  *END**************************************************************************/
377 void SIM_HAL_EnableCrcClock(uint32_t baseAddr, uint32_t instance)
378 {
379     BW_SIM_SCGC6_CRC(baseAddr, 1);
380 }
381
382 /*FUNCTION**********************************************************************
383  *
384  * Function Name : SIM_HAL_DisableCrcClock
385  * Description   : Disable the clock for CRC module
386  * This function disables the clock for CRC moudle.
387  *
388  *END**************************************************************************/
389 void SIM_HAL_DisableCrcClock(uint32_t baseAddr, uint32_t instance)
390 {
391     BW_SIM_SCGC6_CRC(baseAddr, 0);
392 }
393
394 /*FUNCTION**********************************************************************
395  *
396  * Function Name : SIM_HAL_GetCrcGateCmd
397  * Description   : Get the the clock gate state for CRC module
398  * This function will get the clock gate state for CRC moudle.
399  *
400  *END**************************************************************************/
401 bool SIM_HAL_GetCrcGateCmd(uint32_t baseAddr, uint32_t instance)
402 {
403     return BR_SIM_SCGC6_CRC(baseAddr);
404 }
405
406 /*FUNCTION**********************************************************************
407  *
408  * Function Name : SIM_HAL_EnableRngaClock
409  * Description   : Enable the clock for RNGA module
410  * This function enables the clock for RNGA moudle.
411  *
412  *END**************************************************************************/
413 void SIM_HAL_EnableRngaClock(uint32_t baseAddr, uint32_t instance)
414 {
415     BW_SIM_SCGC6_RNGA(baseAddr, 1);
416 }
417
418 /*FUNCTION**********************************************************************
419  *
420  * Function Name : SIM_HAL_DisableRngaClock
421  * Description   : Disable the clock for RNGA module
422  * This function disables the clock for RNGA moudle.
423  *
424  *END**************************************************************************/
425 void SIM_HAL_DisableRngaClock(uint32_t baseAddr, uint32_t instance)
426 {
427     BW_SIM_SCGC6_RNGA(baseAddr, 0);
428 }
429
430 /*FUNCTION**********************************************************************
431  *
432  * Function Name : SIM_HAL_GetRngaGateCmd
433  * Description   : Get the the clock gate state for RNGA module
434  * This function will get the clock gate state for RNGA moudle.
435  *
436  *END**************************************************************************/
437 bool SIM_HAL_GetRngaGateCmd(uint32_t baseAddr, uint32_t instance)
438 {
439     return BR_SIM_SCGC6_RNGA(baseAddr);
440 }
441
442 /*FUNCTION**********************************************************************
443  *
444  * Function Name : SIM_HAL_EnableAdcClock
445  * Description   : Enable the clock for ADC module
446  * This function enables the clock for ADC moudle
447  *
448  *END**************************************************************************/
449 void SIM_HAL_EnableAdcClock(uint32_t baseAddr, uint32_t instance)
450 {
451     switch (instance)
452     {
453     case 0:
454         BW_SIM_SCGC6_ADC0(baseAddr, 1);
455         break;
456     case 1:
457         BW_SIM_SCGC3_ADC1(baseAddr, 1);
458         break;
459     default:
460         break;
461     }
462 }
463
464 /*FUNCTION**********************************************************************
465  *
466  * Function Name : SIM_HAL_DisableAdcClock
467  * Description   : Disable the clock for ADC module
468  * This function disables the clock for ADC moudle
469  *
470  *END**************************************************************************/
471 void SIM_HAL_DisableAdcClock(uint32_t baseAddr, uint32_t instance)
472 {
473     switch (instance)
474     {
475     case 0:
476         BW_SIM_SCGC6_ADC0(baseAddr, 0);
477         break;
478     case 1:
479         BW_SIM_SCGC3_ADC1(baseAddr, 0);
480         break;
481     default:
482         break;
483     }
484 }
485
486 /*FUNCTION**********************************************************************
487  *
488  * Function Name : SIM_HAL_GetAdcGateCmd
489  * Description   : Get the the clock gate state for ADC module
490  * This function will get the clock gate state for ADC moudle.
491  *
492  *END**************************************************************************/
493 bool SIM_HAL_GetAdcGateCmd(uint32_t baseAddr, uint32_t instance)
494 {
495     bool retValue = false;
496
497     switch (instance)
498     {
499     case 0:
500         retValue =  BR_SIM_SCGC6_ADC0(baseAddr);
501         break;
502     case 1:
503         retValue =  BR_SIM_SCGC3_ADC1(baseAddr);
504         break;
505     default:
506         retValue =  false;
507         break;
508     }
509
510     return retValue;
511 }
512
513 /*FUNCTION**********************************************************************
514  *
515  * Function Name : SIM_HAL_EnableCmpClock
516  * Description   : Enable the clock for CMP module
517  * This function enables the clock for CMP moudle
518  *
519  *END**************************************************************************/
520 void SIM_HAL_EnableCmpClock(uint32_t baseAddr, uint32_t instance)
521 {
522     BW_SIM_SCGC4_CMP(baseAddr, 1);
523 }
524
525 /*FUNCTION**********************************************************************
526  *
527  * Function Name : SIM_HAL_DisableCmpClock
528  * Description   : Disable the clock for CMP module
529  * This function disables the clock for CMP moudle
530  *
531  *END**************************************************************************/
532 void SIM_HAL_DisableCmpClock(uint32_t baseAddr, uint32_t instance)
533 {
534     BW_SIM_SCGC4_CMP(baseAddr, 0);
535 }
536
537 /*FUNCTION**********************************************************************
538  *
539  * Function Name : SIM_HAL_GetCmpGateCmd
540  * Description   : Get the the clock gate state for CMP module
541  * This function will get the clock gate state for CMP moudle.
542  *
543  *END**************************************************************************/
544 bool SIM_HAL_GetCmpGateCmd(uint32_t baseAddr, uint32_t instance)
545 {
546     return BR_SIM_SCGC4_CMP(baseAddr);
547 }
548
549 /*FUNCTION**********************************************************************
550  *
551  * Function Name : SIM_HAL_EnableDacClock
552  * Description   : Enable the clock for DAC module
553  * This function enables the clock for DAC moudle
554  *
555  *END**************************************************************************/
556 void SIM_HAL_EnableDacClock(uint32_t baseAddr, uint32_t instance)
557 {
558     switch (instance)
559     {
560     case 0:
561         BW_SIM_SCGC2_DAC0(baseAddr, 1);
562         break;
563     case 1:
564         BW_SIM_SCGC2_DAC1(baseAddr, 1);
565         break;
566     default:
567         break;
568     }
569 }
570
571 /*FUNCTION**********************************************************************
572  *
573  * Function Name : SIM_HAL_DisableDacClock
574  * Description   : Disable the clock for DAC module
575  * This function disables the clock for DAC moudle
576  *
577  *END**************************************************************************/
578 void SIM_HAL_DisableDacClock(uint32_t baseAddr, uint32_t instance)
579 {
580     switch (instance)
581     {
582     case 0:
583         BW_SIM_SCGC2_DAC0(baseAddr, 0);
584         break;
585     case 1:
586         BW_SIM_SCGC2_DAC1(baseAddr, 0);
587         break;
588     default:
589         break;
590     }
591 }
592
593 /*FUNCTION**********************************************************************
594  *
595  * Function Name : SIM_HAL_GetDacGateCmd
596  * Description   : Get the the clock gate state for DAC module
597  * This function will get the clock gate state for DAC moudle.
598  *
599  *END**************************************************************************/
600 bool SIM_HAL_GetDacGateCmd(uint32_t baseAddr, uint32_t instance)
601 {
602     bool retValue = false;
603
604     switch (instance)
605     {
606     case 0:
607         retValue =  BR_SIM_SCGC2_DAC0(baseAddr);
608         break;
609     case 1:
610         retValue =  BR_SIM_SCGC2_DAC1(baseAddr);
611         break;
612     default:
613         retValue =  false;
614         break;
615     }
616
617     return retValue;
618 }
619
620 /*FUNCTION**********************************************************************
621  *
622  * Function Name : SIM_HAL_EnableVrefClock
623  * Description   : Enable the clock for VREF module
624  * This function enables the clock for VREF moudle
625  *
626  *END**************************************************************************/
627 void SIM_HAL_EnableVrefClock(uint32_t baseAddr, uint32_t instance)
628 {
629     BW_SIM_SCGC4_VREF(baseAddr, 1);
630 }
631
632 /*FUNCTION**********************************************************************
633  *
634  * Function Name : SIM_HAL_DisableVrefClock
635  * Description   : Disable the clock for VREF module
636  * This function disables the clock for VREF moudle
637  *
638  *END**************************************************************************/
639 void SIM_HAL_DisableVrefClock(uint32_t baseAddr, uint32_t instance)
640 {
641     BW_SIM_SCGC4_VREF(baseAddr, 0);
642 }
643
644 /*FUNCTION**********************************************************************
645  *
646  * Function Name : SIM_HAL_GetVrefGateCmd
647  * Description   : Get the the clock gate state for VREF module
648  * This function will get the clock gate state for VREF moudle.
649  *
650  *END**************************************************************************/
651 bool SIM_HAL_GetVrefGateCmd(uint32_t baseAddr, uint32_t instance)
652 {
653     return BR_SIM_SCGC4_VREF(baseAddr);
654 }
655
656 /*FUNCTION**********************************************************************
657  *
658  * Function Name : SIM_HAL_EnableSaiClock
659  * Description   : Enable the clock for SAI module
660  * This function enables the clock for SAI moudle
661  *
662  *END**************************************************************************/
663 void SIM_HAL_EnableSaiClock(uint32_t baseAddr, uint32_t instance)
664 {
665     BW_SIM_SCGC6_I2S(baseAddr, 1);
666 }
667
668 /*FUNCTION**********************************************************************
669  *
670  * Function Name : SIM_HAL_DisableSaiClock
671  * Description   : Disable the clock for SAI module
672  * This function disables the clock for SAI moudle
673  *
674  *END**************************************************************************/
675 void SIM_HAL_DisableSaiClock(uint32_t baseAddr, uint32_t instance)
676 {
677     BW_SIM_SCGC6_I2S(baseAddr, 0);
678 }
679
680 /*FUNCTION**********************************************************************
681  *
682  * Function Name : SIM_HAL_GetSaiGateCmd
683  * Description   : Get the the clock gate state for SAI module
684  * This function will get the clock gate state for SAI moudle.
685  *
686  *END**************************************************************************/
687 bool SIM_HAL_GetSaiGateCmd(uint32_t baseAddr, uint32_t instance)
688 {
689     return BR_SIM_SCGC6_I2S(baseAddr);
690 }
691
692 /*FUNCTION**********************************************************************
693  *
694  * Function Name : SIM_HAL_EnablePdbClock
695  * Description   : Enable the clock for PDB module
696  * This function enables the clock for PDB moudle
697  *
698  *END**************************************************************************/
699 void SIM_HAL_EnablePdbClock(uint32_t baseAddr, uint32_t instance)
700 {
701     BW_SIM_SCGC6_PDB(baseAddr, 1);
702 }
703
704 /*FUNCTION**********************************************************************
705  *
706  * Function Name : SIM_HAL_DisablePdbClock
707  * Description   : Disable the clock for PDB module
708  * This function disables the clock for PDB moudle
709  *
710  *END**************************************************************************/
711 void SIM_HAL_DisablePdbClock(uint32_t baseAddr, uint32_t instance)
712 {
713     BW_SIM_SCGC6_PDB(baseAddr, 0);
714 }
715
716 /*FUNCTION**********************************************************************
717  *
718  * Function Name : SIM_HAL_GetPdbGateCmd
719  * Description   : Get the the clock gate state for PDB module
720  * This function will get the clock gate state for PDB moudle.
721  *
722  *END**************************************************************************/
723 bool SIM_HAL_GetPdbGateCmd(uint32_t baseAddr, uint32_t instance)
724 {
725     return BR_SIM_SCGC6_PDB(baseAddr);
726 }
727
728 /*FUNCTION**********************************************************************
729  *
730  * Function Name : SIM_HAL_EnableFtmClock
731  * Description   : Enable the clock for FTM module
732  * This function enables the clock for FTM moudle
733  *
734  *END**************************************************************************/
735 void SIM_HAL_EnableFtmClock(uint32_t baseAddr, uint32_t instance)
736 {
737     switch (instance)
738     {
739     case 0:
740         BW_SIM_SCGC6_FTM0(baseAddr, 1);
741         break;
742     case 1:
743         BW_SIM_SCGC6_FTM1(baseAddr, 1);
744         break;
745     case 2:
746         BW_SIM_SCGC6_FTM2(baseAddr, 1);
747         break;
748     case 3:
749         BW_SIM_SCGC3_FTM3(baseAddr, 1);
750         break;
751     default:
752         break;
753     }
754 }
755
756 /*FUNCTION**********************************************************************
757  *
758  * Function Name : SIM_HAL_DisableFtmClock
759  * Description   : Disable the clock for FTM module
760  * This function disables the clock for FTM moudle
761  *
762  *END**************************************************************************/
763 void SIM_HAL_DisableFtmClock(uint32_t baseAddr, uint32_t instance)
764 {
765     switch (instance)
766     {
767     case 0:
768         BW_SIM_SCGC6_FTM0(baseAddr, 0);
769         break;
770     case 1:
771         BW_SIM_SCGC6_FTM1(baseAddr, 0);
772         break;
773     case 2:
774         BW_SIM_SCGC6_FTM2(baseAddr, 0);
775         break;
776     case 3:
777         BW_SIM_SCGC3_FTM3(baseAddr, 0);
778         break;
779     default:
780         break;
781     }
782 }
783
784 /*FUNCTION**********************************************************************
785  *
786  * Function Name : SIM_HAL_GetFtmGateCmd
787  * Description   : Get the the clock gate state for FTM module
788  * This function will get the clock gate state for FTM moudle.
789  *
790  *END**************************************************************************/
791 bool SIM_HAL_GetFtmGateCmd(uint32_t baseAddr, uint32_t instance)
792 {
793     bool retValue = false;
794
795     switch (instance)
796     {
797     case 0:
798         retValue =  BR_SIM_SCGC6_FTM0(baseAddr);
799         break;
800     case 1:
801         retValue =  BR_SIM_SCGC6_FTM1(baseAddr);
802         break;
803     case 2:
804         retValue =  BR_SIM_SCGC6_FTM2(baseAddr);
805         break;
806     case 3:
807         retValue =  BR_SIM_SCGC3_FTM3(baseAddr);
808         break;
809     default:
810         retValue =  false;
811         break;
812     }
813
814     return retValue;
815 }
816
817 /*FUNCTION**********************************************************************
818  *
819  * Function Name : SIM_HAL_EnablePitClock
820  * Description   : Enable the clock for PIT module
821  * This function enables the clock for PIT moudle
822  *
823  *END**************************************************************************/
824 void SIM_HAL_EnablePitClock(uint32_t baseAddr, uint32_t instance)
825 {
826     BW_SIM_SCGC6_PIT(baseAddr, 1);
827 }
828
829 /*FUNCTION**********************************************************************
830  *
831  * Function Name : SIM_HAL_DisablePitClock
832  * Description   : Disable the clock for PIT module
833  * This function disables the clock for PIT moudle
834  *
835  *END**************************************************************************/
836 void SIM_HAL_DisablePitClock(uint32_t baseAddr, uint32_t instance)
837 {
838     BW_SIM_SCGC6_PIT(baseAddr, 0);
839 }
840
841 /*FUNCTION**********************************************************************
842  *
843  * Function Name : SIM_HAL_GetPitGateCmd
844  * Description   : Get the the clock gate state for PIT module
845  * This function will get the clock gate state for PIT moudle.
846  *
847  *END**************************************************************************/
848 bool SIM_HAL_GetPitGateCmd(uint32_t baseAddr, uint32_t instance)
849 {
850     return BR_SIM_SCGC6_PIT(baseAddr);
851 }
852
853 /*FUNCTION**********************************************************************
854  *
855  * Function Name : SIM_HAL_EnableLptimerClock
856  * Description   : Enable the clock for LPTIMER module
857  * This function enables the clock for LPTIMER moudle
858  *
859  *END**************************************************************************/
860 void SIM_HAL_EnableLptimerClock(uint32_t baseAddr, uint32_t instance)
861 {
862     BW_SIM_SCGC5_LPTMR(baseAddr, 1);
863 }
864
865 /*FUNCTION**********************************************************************
866  *
867  * Function Name : SIM_HAL_DisableLptimerClock
868  * Description   : Disable the clock for LPTIMER module
869  * This function disables the clock for LPTIMER moudle
870  *
871  *END**************************************************************************/
872 void SIM_HAL_DisableLptimerClock(uint32_t baseAddr, uint32_t instance)
873 {
874     BW_SIM_SCGC5_LPTMR(baseAddr, 0);
875 }
876
877 /*FUNCTION**********************************************************************
878  *
879  * Function Name : SIM_HAL_GetLptimerGateCmd
880  * Description   : Get the the clock gate state for LPTIMER module
881  * This function will get the clock gate state for LPTIMER moudle.
882  *
883  *END**************************************************************************/
884 bool SIM_HAL_GetLptimerGateCmd(uint32_t baseAddr, uint32_t instance)
885 {
886     return BR_SIM_SCGC5_LPTMR(baseAddr);
887 }
888
889 /*FUNCTION**********************************************************************
890  *
891  * Function Name : SIM_HAL_EnableCmtClock
892  * Description   : Enable the clock for CMT module
893  * This function enables the clock for CMT moudle
894  *
895  *END**************************************************************************/
896 void SIM_HAL_EnableCmtClock(uint32_t baseAddr, uint32_t instance)
897 {
898     BW_SIM_SCGC4_CMT(baseAddr, 1);
899 }
900
901 /*FUNCTION**********************************************************************
902  *
903  * Function Name : SIM_HAL_DisableCmtClock
904  * Description   : Disable the clock for CMT module
905  * This function disables the clock for CMT moudle
906  *
907  *END**************************************************************************/
908 void SIM_HAL_DisableCmtClock(uint32_t baseAddr, uint32_t instance)
909 {
910     BW_SIM_SCGC4_CMT(baseAddr, 0);
911 }
912
913 /*FUNCTION**********************************************************************
914  *
915  * Function Name : SIM_HAL_GetCmtGateCmd
916  * Description   : Get the the clock gate state for CMT module
917  * This function will get the clock gate state for CMT moudle.
918  *
919  *END**************************************************************************/
920 bool SIM_HAL_GetCmtGateCmd(uint32_t baseAddr, uint32_t instance)
921 {
922     return BR_SIM_SCGC4_CMT(baseAddr);
923 }
924
925 /*FUNCTION**********************************************************************
926  *
927  * Function Name : SIM_HAL_EnableRtcClock
928  * Description   : Enable the clock for RTC module
929  * This function enables the clock for RTC moudle
930  *
931  *END**************************************************************************/
932 void SIM_HAL_EnableRtcClock(uint32_t baseAddr, uint32_t instance)
933 {
934     BW_SIM_SCGC6_RTC(baseAddr, 1);
935 }
936
937 /*FUNCTION**********************************************************************
938  *
939  * Function Name : SIM_HAL_DisableRtcClock
940  * Description   : Disable the clock for RTC module
941  * This function disables the clock for RTC moudle
942  *
943  *END**************************************************************************/
944 void SIM_HAL_DisableRtcClock(uint32_t baseAddr, uint32_t instance)
945 {
946     BW_SIM_SCGC6_RTC(baseAddr, 0);
947 }
948
949 /*FUNCTION**********************************************************************
950  *
951  * Function Name : SIM_HAL_GetRtcGateCmd
952  * Description   : Get the the clock gate state for RTC module
953  * This function will get the clock gate state for RTC moudle.
954  *
955  *END**************************************************************************/
956 bool SIM_HAL_GetRtcGateCmd(uint32_t baseAddr, uint32_t instance)
957 {
958     return BR_SIM_SCGC6_RTC(baseAddr);
959 }
960
961 /*FUNCTION**********************************************************************
962  *
963  * Function Name : SIM_HAL_EnableEnetClock
964  * Description   : Enable the clock for ENET module
965  * This function enables the clock for ENET moudle
966  *
967  *END**************************************************************************/
968 void SIM_HAL_EnableEnetClock(uint32_t baseAddr, uint32_t instance)
969 {
970     BW_SIM_SCGC2_ENET(baseAddr, 1);
971 }
972
973 /*FUNCTION**********************************************************************
974  *
975  * Function Name : SIM_HAL_DisableEnetClock
976  * Description   : Disable the clock for ENET module
977  * This function disables the clock for ENET moudle
978  *
979  *END**************************************************************************/
980 void SIM_HAL_DisableEnetClock(uint32_t baseAddr, uint32_t instance)
981 {
982     BW_SIM_SCGC2_ENET(baseAddr, 0);
983 }
984
985 /*FUNCTION**********************************************************************
986  *
987  * Function Name : SIM_HAL_GetEnetGateCmd
988  * Description   : Get the the clock gate state for ENET module
989  * This function will get the clock gate state for ENET moudle.
990  *
991  *END**************************************************************************/
992 bool SIM_HAL_GetEnetGateCmd(uint32_t baseAddr, uint32_t instance)
993 {
994     return BR_SIM_SCGC2_ENET(baseAddr);
995 }
996
997 /*FUNCTION**********************************************************************
998  *
999  * Function Name : SIM_HAL_EnableUsbClock
1000  * Description   : Enable the clock for USBFS module
1001  * This function enables the clock for USBFS moudle
1002  *
1003  *END**************************************************************************/
1004 void SIM_HAL_EnableUsbClock(uint32_t baseAddr, uint32_t instance)
1005 {
1006     BW_SIM_SCGC4_USBOTG(baseAddr, 1);
1007 }
1008
1009 /*FUNCTION**********************************************************************
1010  *
1011  * Function Name : SIM_HAL_DisableUsbClock
1012  * Description   : Disable the clock for USBFS module
1013  * This function disables the clock for USBFS moudle
1014  *
1015  *END**************************************************************************/
1016 void SIM_HAL_DisableUsbClock(uint32_t baseAddr, uint32_t instance)
1017 {
1018     BW_SIM_SCGC4_USBOTG(baseAddr, 0);
1019 }
1020
1021 /*FUNCTION**********************************************************************
1022  *
1023  * Function Name : SIM_HAL_GetUsbGateCmd
1024  * Description   : Get the the clock gate state for USB module
1025  * This function will get the clock gate state for USB moudle.
1026  *
1027  *END**************************************************************************/
1028 bool SIM_HAL_GetUsbGateCmd(uint32_t baseAddr, uint32_t instance)
1029 {
1030     return BR_SIM_SCGC4_USBOTG(baseAddr);
1031 }
1032
1033 /*FUNCTION**********************************************************************
1034  *
1035  * Function Name : SIM_HAL_EnableUsbdcdClock
1036  * Description   : Enable the clock for USBDCD module
1037  * This function enables the clock for USBDCD moudle
1038  *
1039  *END**************************************************************************/
1040 void SIM_HAL_EnableUsbdcdClock(uint32_t baseAddr, uint32_t instance)
1041 {
1042     BW_SIM_SCGC6_USBDCD(baseAddr, 1);
1043 }
1044
1045 /*FUNCTION**********************************************************************
1046  *
1047  * Function Name : SIM_HAL_DisableUsbdcdClock
1048  * Description   : Disable the clock for USBDCD module
1049  * This function disables the clock for USBDCD moudle
1050  *
1051  *END**************************************************************************/
1052 void SIM_HAL_DisableUsbdcdClock(uint32_t baseAddr, uint32_t instance)
1053 {
1054     BW_SIM_SCGC6_USBDCD(baseAddr, 0);
1055 }
1056
1057 /*FUNCTION**********************************************************************
1058  *
1059  * Function Name : SIM_HAL_GetUsbdcdGateCmd
1060  * Description   : Get the the clock gate state for USBDCD module
1061  * This function will get the clock gate state for USBDCD moudle.
1062  *
1063  *END**************************************************************************/
1064 bool SIM_HAL_GetUsbdcdGateCmd(uint32_t baseAddr, uint32_t instance)
1065 {
1066     return BR_SIM_SCGC6_USBDCD(baseAddr);
1067 }
1068
1069 /*FUNCTION**********************************************************************
1070  *
1071  * Function Name : SIM_HAL_EnableFlexcanClock
1072  * Description   : Enable the clock for FLEXCAN module
1073  * This function enables the clock for FLEXCAN moudle
1074  *
1075  *END**************************************************************************/
1076 void SIM_HAL_EnableFlexcanClock(uint32_t baseAddr, uint32_t instance)
1077 {
1078     BW_SIM_SCGC6_FLEXCAN0(baseAddr, 1);
1079 }
1080
1081 /*FUNCTION**********************************************************************
1082  *
1083  * Function Name : SIM_HAL_DisableFlexcanClock
1084  * Description   : Disable the clock for FLEXCAN module
1085  * This function disables the clock for FLEXCAN moudle
1086  *
1087  *END**************************************************************************/
1088 void SIM_HAL_DisableFlexcanClock(uint32_t baseAddr, uint32_t instance)
1089 {
1090     BW_SIM_SCGC6_FLEXCAN0(baseAddr, 0);
1091 }
1092
1093 /*FUNCTION**********************************************************************
1094  *
1095  * Function Name : SIM_HAL_GetFlexcanGateCmd
1096  * Description   : Get the the clock gate state for FLEXCAN module
1097  * This function will get the clock gate state for FLEXCAN moudle.
1098  *
1099  *END**************************************************************************/
1100 bool SIM_HAL_GetFlexcanGateCmd(uint32_t baseAddr, uint32_t instance)
1101 {
1102     return BR_SIM_SCGC6_FLEXCAN0(baseAddr);
1103 }
1104
1105 /*FUNCTION**********************************************************************
1106  *
1107  * Function Name : SIM_HAL_EnableSpiClock
1108  * Description   : Enable the clock for SPI module
1109  * This function enables the clock for SPI moudle
1110  *
1111  *END**************************************************************************/
1112 void SIM_HAL_EnableSpiClock(uint32_t baseAddr, uint32_t instance)
1113 {
1114     switch (instance)
1115     {
1116     case 0:
1117         BW_SIM_SCGC6_SPI0(baseAddr, 1);
1118         break;
1119     case 1:
1120         BW_SIM_SCGC6_SPI1(baseAddr, 1);
1121         break;
1122     case 2:
1123         BW_SIM_SCGC3_SPI2(baseAddr, 1);
1124         break;
1125     default:
1126         break;
1127     }
1128 }
1129
1130 /*FUNCTION**********************************************************************
1131  *
1132  * Function Name : SIM_HAL_DisableSpiClock
1133  * Description   : Disable the clock for SPI module
1134  * This function disables the clock for SPI moudle
1135  *
1136  *END**************************************************************************/
1137 void SIM_HAL_DisableSpiClock(uint32_t baseAddr, uint32_t instance)
1138 {
1139     switch (instance)
1140     {
1141     case 0:
1142         BW_SIM_SCGC6_SPI0(baseAddr, 0);
1143         break;
1144     case 1:
1145         BW_SIM_SCGC6_SPI1(baseAddr, 0);
1146         break;
1147     case 2:
1148         BW_SIM_SCGC3_SPI2(baseAddr, 0);
1149         break;
1150     default:
1151         break;
1152     }
1153 }
1154
1155 /*FUNCTION**********************************************************************
1156  *
1157  * Function Name : SIM_HAL_GetSpiGateCmd
1158  * Description   : Get the the clock gate state for SPI module
1159  * This function will get the clock gate state for SPI moudle.
1160  *
1161  *END**************************************************************************/
1162 bool SIM_HAL_GetSpiGateCmd(uint32_t baseAddr, uint32_t instance)
1163 {
1164     bool retValue = false;
1165
1166     switch (instance)
1167     {
1168     case 0:
1169         retValue =  BR_SIM_SCGC6_SPI0(baseAddr);
1170         break;
1171     case 1:
1172         retValue =  BR_SIM_SCGC6_SPI1(baseAddr);
1173         break;
1174     case 2:
1175         retValue =  BR_SIM_SCGC3_SPI2(baseAddr);
1176         break;
1177     default:
1178         retValue =  false;
1179         break;
1180     }
1181
1182     return retValue;
1183 }
1184
1185 /*FUNCTION**********************************************************************
1186  *
1187  * Function Name : SIM_HAL_EnableI2cClock
1188  * Description   : Enable the clock for I2C module
1189  * This function enables the clock for I2C moudle
1190  *
1191  *END**************************************************************************/
1192 void SIM_HAL_EnableI2cClock(uint32_t baseAddr, uint32_t instance)
1193 {
1194     switch (instance)
1195     {
1196     case 0:
1197         BW_SIM_SCGC4_I2C0(baseAddr, 1);
1198         break;
1199     case 1:
1200         BW_SIM_SCGC4_I2C1(baseAddr, 1);
1201         break;
1202     case 2:
1203         BW_SIM_SCGC1_I2C2(baseAddr, 1);
1204         break;
1205     default:
1206         break;
1207     }
1208 }
1209
1210 /*FUNCTION**********************************************************************
1211  *
1212  * Function Name : SIM_HAL_DisableI2cClock
1213  * Description   : Disable the clock for I2C module
1214  * This function disables the clock for I2C moudle
1215  *
1216  *END**************************************************************************/
1217 void SIM_HAL_DisableI2cClock(uint32_t baseAddr, uint32_t instance)
1218 {
1219     switch (instance)
1220     {
1221     case 0:
1222         BW_SIM_SCGC4_I2C0(baseAddr, 0);
1223         break;
1224     case 1:
1225         BW_SIM_SCGC4_I2C1(baseAddr, 0);
1226         break;
1227     case 2:
1228         BW_SIM_SCGC1_I2C2(baseAddr, 0);
1229         break;
1230     default:
1231         break;
1232     }
1233 }
1234
1235 /*FUNCTION**********************************************************************
1236  *
1237  * Function Name : SIM_HAL_GetI2cGateCmd
1238  * Description   : Get the the clock gate state for I2C module
1239  * This function will get the clock gate state for I2C moudle.
1240  *
1241  *END**************************************************************************/
1242 bool SIM_HAL_GetI2cGateCmd(uint32_t baseAddr, uint32_t instance)
1243 {
1244     bool retValue = false;
1245
1246     switch (instance)
1247     {
1248     case 0:
1249         retValue =  BR_SIM_SCGC4_I2C0(baseAddr);
1250         break;
1251     case 1:
1252         retValue =  BR_SIM_SCGC4_I2C1(baseAddr);
1253         break;
1254     case 2:
1255         retValue =  BR_SIM_SCGC1_I2C2(baseAddr);
1256         break;
1257     default:
1258         retValue =  false;
1259         break;
1260     }
1261
1262     return retValue;
1263 }
1264
1265 /*FUNCTION**********************************************************************
1266  *
1267  * Function Name : SIM_HAL_EnableUartClock
1268  * Description   : Enable the clock for UART module
1269  * This function enables the clock for UART moudle
1270  *
1271  *END**************************************************************************/
1272 void SIM_HAL_EnableUartClock(uint32_t baseAddr, uint32_t instance)
1273 {
1274     switch (instance)
1275     {
1276     case 0:
1277         BW_SIM_SCGC4_UART0(baseAddr, 1);
1278         break;
1279     case 1:
1280         BW_SIM_SCGC4_UART1(baseAddr, 1);
1281         break;
1282     case 2:
1283         BW_SIM_SCGC4_UART2(baseAddr, 1);
1284         break;
1285     case 3:
1286         BW_SIM_SCGC4_UART3(baseAddr, 1);
1287         break;
1288     case 4:
1289         BW_SIM_SCGC1_UART4(baseAddr, 1);
1290         break;
1291     case 5:
1292         BW_SIM_SCGC1_UART5(baseAddr, 1);
1293         break;
1294     default:
1295         break;
1296     }
1297 }
1298
1299 /*FUNCTION**********************************************************************
1300  *
1301  * Function Name : SIM_HAL_DisableUartClock
1302  * Description   : Disable the clock for UART module
1303  * This function disables the clock for UART moudle
1304  *
1305  *END**************************************************************************/
1306 void SIM_HAL_DisableUartClock(uint32_t baseAddr, uint32_t instance)
1307 {
1308     switch (instance)
1309     {
1310     case 0:
1311         BW_SIM_SCGC4_UART0(baseAddr, 0);
1312         break;
1313     case 1:
1314         BW_SIM_SCGC4_UART1(baseAddr, 0);
1315         break;
1316     case 2:
1317         BW_SIM_SCGC4_UART2(baseAddr, 0);
1318         break;
1319     case 3:
1320         BW_SIM_SCGC4_UART3(baseAddr, 0);
1321         break;
1322     case 4:
1323         BW_SIM_SCGC1_UART4(baseAddr, 0);
1324         break;
1325     case 5:
1326         BW_SIM_SCGC1_UART5(baseAddr, 0);
1327         break;
1328     default:
1329         break;
1330     }
1331 }
1332
1333 /*FUNCTION**********************************************************************
1334  *
1335  * Function Name : SIM_HAL_GetUartGateCmd
1336  * Description   : Get the the clock gate state for UART module
1337  * This function will get the clock gate state for UART moudle.
1338  *
1339  *END**************************************************************************/
1340 bool SIM_HAL_GetUartGateCmd(uint32_t baseAddr, uint32_t instance)
1341 {
1342     bool retValue = false;
1343
1344     switch (instance)
1345     {
1346     case 0:
1347         retValue =  BR_SIM_SCGC4_UART0(baseAddr);
1348         break;
1349     case 1:
1350         retValue =  BR_SIM_SCGC4_UART1(baseAddr);
1351         break;
1352     case 2:
1353         retValue =  BR_SIM_SCGC4_UART2(baseAddr);
1354         break;
1355     case 3:
1356         retValue =  BR_SIM_SCGC4_UART3(baseAddr);
1357         break;
1358     case 4:
1359         retValue =  BR_SIM_SCGC1_UART4(baseAddr);
1360         break;
1361     case 5:
1362         retValue =  BR_SIM_SCGC1_UART5(baseAddr);
1363         break;
1364     default:
1365         retValue =  false;
1366         break;
1367     }
1368
1369     return retValue;
1370 }
1371
1372 /*FUNCTION**********************************************************************
1373  *
1374  * Function Name : SIM_HAL_EnableSdhcClock
1375  * Description   : Enable the clock for SDHC module
1376  * This function enables the clock for SDHC moudle
1377  *
1378  *END**************************************************************************/
1379 void SIM_HAL_EnableSdhcClock(uint32_t baseAddr, uint32_t instance)
1380 {
1381     BW_SIM_SCGC3_SDHC(baseAddr, 1);
1382 }
1383
1384 /*FUNCTION**********************************************************************
1385  *
1386  * Function Name : SIM_HAL_DisableSdhcClock
1387  * Description   : Disable the clock for SDHC module
1388  * This function disables the clock for SDHC moudle
1389  *
1390  *END**************************************************************************/
1391 void SIM_HAL_DisableSdhcClock(uint32_t baseAddr, uint32_t instance)
1392 {
1393     BW_SIM_SCGC3_SDHC(baseAddr, 0);
1394 }
1395
1396 /*FUNCTION**********************************************************************
1397  *
1398  * Function Name : SIM_HAL_GetSdhcGateCmd
1399  * Description   : Get the the clock gate state for SDHC module
1400  * This function will get the clock gate state for SDHC moudle.
1401  *
1402  *END**************************************************************************/
1403 bool SIM_HAL_GetSdhcGateCmd(uint32_t baseAddr, uint32_t instance)
1404 {
1405     return BR_SIM_SCGC3_SDHC(baseAddr);
1406 }
1407 /*******************************************************************************
1408  * EOF
1409  ******************************************************************************/
1410