2 * Copyright (c) 2013 - 2014, Freescale Semiconductor, Inc.
5 * Redistribution and use in source and binary forms, with or without modification,
6 * are permitted provided that the following conditions are met:
8 * o Redistributions of source code must retain the above copyright notice, this list
9 * of conditions and the following disclaimer.
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.
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.
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.
31 #if !defined(__FSL_SIM_HAL_K64F12_H__)
32 #define __FSL_SIM_HAL_K64F12_H__
34 /*! @addtogroup sim_hal*/
39 /*******************************************************************************
41 ******************************************************************************/
43 /*! @brief SIM SDHC clock source */
44 typedef enum _sim_sdhc_clock_source
46 kSimSdhcSrcCoreSysClk
, /* Core/system clock */
47 kSimSdhcSrcPllFllSel
, /* clock as selected by SOPT2[PLLFLLSEL]. */
48 kSimSdhcSrcOscerclk
, /* OSCERCLK clock */
49 kSimSdhcSrcExt
/* External bypass clock (SDHC0_CLKIN) */
50 } sim_sdhc_clock_source_t
;
52 /*! @brief SIM TIME clock source */
53 typedef enum _sim_time_clock_source
55 kSimTimeSrcCoreSysClk
, /* Core/system clock */
56 kSimTimeSrcPllFllSel
, /* clock as selected by SOPT2[PLLFLLSEL]. */
57 kSimTimeSrcOscerclk
, /* OSCERCLK clock */
58 kSimTimeSrcExt
/* ENET 1588 clock in (ENET_1588_CLKIN) */
59 } sim_time_clock_source_t
;
61 /*! @brief SIM RMII clock source */
62 typedef enum _sim_rmii_clock_source
64 kSimRmiiSrcExtalClk
, /* EXTAL Clock */
65 kSimRmiiSrcExt
/* ENET 1588 clock in (ENET_1588_CLKIN) */
66 } sim_rmii_clock_source_t
;
68 /*! @brief SIM USB clock source */
69 typedef enum _sim_usb_clock_source
71 kSimUsbSrcClkIn
, /* USB CLKIN Clock */
72 kSimUsbSrcPllFllSel
/* clock as selected by SOPT2[PLLFLLSEL] */
73 } sim_usb_clock_source_t
;
75 /*! @brief SIM PLLFLLSEL clock source select */
76 typedef enum _sim_pllfll_clock_sel
78 kSimPllFllSelFll
, /* Fll clock */
79 kSimPllFllSelPll
/* Pll0 clock */
80 } sim_pllfll_clock_sel_t
;
82 /*! @brief SIM OSC32KSEL clock source select */
83 typedef enum _sim_osc32k_clock_sel
85 kSimOsc32kSelOsc32k
, /* OSC 32k clock */
86 kSimOsc32kSelReserved
, /* Reserved */
87 kSimOsc32kSelRtc32k
, /* RTC 32k clock */
88 kSimOsc32kSelLpo
/* LPO clock */
89 } sim_osc32k_clock_sel_t
;
91 /*! @brief SIM TRACESEL clock source select */
92 typedef enum _sim_trace_clock_sel
94 kSimTraceMcgoutClk
, /* MCG out clock */
95 kSimTraceCoreClk
/* core clock */
96 } sim_trace_clock_sel_t
;
98 /*! @brief SIM CLKOUT_SEL clock source select */
99 typedef enum _sim_clkout_clock_sel
101 kSimClkoutFlexbusClk
, /* Flexbus clock */
102 kSimClkoutReserved
, /* Reserved */
103 kSimClkoutFlashClk
, /* Flash clock */
104 kSimClkoutLpoClk
, /* LPO clock */
105 kSimClkoutMcgIrcClk
, /* MCG out clock */
106 kSimClkoutRtc32kClk
, /* RTC 32k clock */
108 } sim_clkout_clock_sel_t
;
110 /*! @brief SIM RTCCLKOUTSEL clock source select */
111 typedef enum _sim_rtcclkout_clock_sel
113 kSimRtcClkout1hzClk
, /* 1Hz clock */
114 kSimRtcClkout32kClk
/* 32KHz clock */
115 } sim_rtcclkout_clock_sel_t
;
117 /*******************************************************************************
119 ******************************************************************************/
121 #if defined(__cplusplus)
123 #endif /* __cplusplus*/
125 /*! @name IP related clock feature APIs*/
129 * @brief Enable the clock for DMA module.
131 * This function enables the clock for DMA moudle.
133 * @param baseAddr Base address for current SIM instance.
134 * @param instance module device instance
136 void SIM_HAL_EnableDmaClock(uint32_t baseAddr
, uint32_t instance
);
139 * @brief Disable the clock for DMA module.
141 * This function disables the clock for DMA moudle.
143 * @param baseAddr Base address for current SIM instance.
144 * @param instance module device instance
146 void SIM_HAL_DisableDmaClock(uint32_t baseAddr
, uint32_t instance
);
149 * @brief Get the the clock gate state for DMA module.
151 * This function will get the clock gate state for DMA moudle.
153 * @param baseAddr Base address for current SIM instance.
154 * @param instance module device instance
155 * @return state true - ungated(Enabled), false - gated (Disabled)
157 bool SIM_HAL_GetDmaGateCmd(uint32_t baseAddr
, uint32_t instance
);
160 * @brief Enable the clock for DMAMUX module.
162 * This function enables the clock for DMAMUX moudle.
164 * @param baseAddr Base address for current SIM instance.
165 * @param instance module device instance
167 void SIM_HAL_EnableDmamuxClock(uint32_t baseAddr
, uint32_t instance
);
170 * @brief Disable the clock for DMAMUX module.
172 * This function disables the clock for DMAMUX moudle.
174 * @param baseAddr Base address for current SIM instance.
175 * @param instance module device instance
177 void SIM_HAL_DisableDmamuxClock(uint32_t baseAddr
, uint32_t instance
);
180 * @brief Get the the clock gate state for DMAMUX module.
182 * This function will get the clock gate state for DMAMUX moudle.
184 * @param baseAddr Base address for current SIM instance.
185 * @param instance module device instance
186 * @return state true - ungated(Enabled), false - gated (Disabled)
188 bool SIM_HAL_GetDmamuxGateCmd(uint32_t baseAddr
, uint32_t instance
);
191 * @brief Enable the clock for PORT module.
193 * This function enables the clock for PORT moudle.
195 * @param baseAddr Base address for current SIM instance.
196 * @param instance module device instance
198 void SIM_HAL_EnablePortClock(uint32_t baseAddr
, uint32_t instance
);
201 * @brief Disable the clock for PORT module.
203 * This function disables the clock for PORT moudle.
205 * @param baseAddr Base address for current SIM instance.
206 * @param instance module device instance
208 void SIM_HAL_DisablePortClock(uint32_t baseAddr
, uint32_t instance
);
211 * @brief Get the the clock gate state for PORT module.
213 * This function will get the clock gate state for PORT moudle.
215 * @param baseAddr Base address for current SIM instance.
216 * @param instance module device instance
217 * @return state true - ungated(Enabled), false - gated (Disabled)
219 bool SIM_HAL_GetPortGateCmd(uint32_t baseAddr
, uint32_t instance
);
222 * @brief Enable the clock for MPU module.
224 * This function enables the clock for MPU moudle.
226 * @param baseAddr Base address for current SIM instance.
227 * @param instance module device instance
229 void SIM_HAL_EnableMpuClock(uint32_t baseAddr
, uint32_t instance
);
232 * @brief Disable the clock for MPU module.
234 * This function disables the clock for MPU moudle.
236 * @param baseAddr Base address for current SIM instance.
237 * @param instance module device instance
239 void SIM_HAL_DisableMpuClock(uint32_t baseAddr
, uint32_t instance
);
242 * @brief Get the the clock gate state for MPU module.
244 * This function will get the clock gate state for MPU moudle.
246 * @param baseAddr Base address for current SIM instance.
247 * @param instance module device instance
248 * @return state true - ungated(Enabled), false - gated (Disabled)
250 bool SIM_HAL_GetMpuGateCmd(uint32_t baseAddr
, uint32_t instance
);
253 * @brief Enable the clock for EWM module.
255 * This function enables the clock for EWM moudle.
257 * @param baseAddr Base address for current SIM instance.
258 * @param instance module device instance
260 void SIM_HAL_EnableEwmClock(uint32_t baseAddr
, uint32_t instance
);
263 * @brief Disable the clock for EWM module.
265 * This function disables the clock for EWM moudle.
267 * @param baseAddr Base address for current SIM instance.
268 * @param instance module device instance
270 void SIM_HAL_DisableEwmClock(uint32_t baseAddr
, uint32_t instance
);
273 * @brief Get the the clock gate state for EWM module.
275 * This function will get the clock gate state for EWM moudle.
277 * @param baseAddr Base address for current SIM instance.
278 * @param instance module device instance
279 * @return state true - ungated(Enabled), false - gated (Disabled)
281 bool SIM_HAL_GetEwmGateCmd(uint32_t baseAddr
, uint32_t instance
);
284 * @brief Enable the clock for FLEXBUS module.
286 * This function enables the clock for FLEXBUS moudle.
288 * @param baseAddr Base address for current SIM instance.
289 * @param instance module device instance
291 void SIM_HAL_EnableFlexbusClock(uint32_t baseAddr
, uint32_t instance
);
294 * @brief Disable the clock for FLEXBUS module.
296 * This function disables the clock for FLEXBUS moudle.
298 * @param baseAddr Base address for current SIM instance.
299 * @param instance module device instance
301 void SIM_HAL_DisableFlexbusClock(uint32_t baseAddr
, uint32_t instance
);
304 * @brief Get the the clock gate state for FLEXBUS module.
306 * This function will get the clock gate state for FLEXBUS moudle.
308 * @param baseAddr Base address for current SIM instance.
309 * @param instance module device instance
310 * @return state true - ungated(Enabled), false - gated (Disabled)
312 bool SIM_HAL_GetFlexbusGateCmd(uint32_t baseAddr
, uint32_t instance
);
315 * @brief Enable the clock for FTF module.
317 * This function enables the clock for FTF moudle.
319 * @param baseAddr Base address for current SIM instance.
320 * @param instance module device instance
322 void SIM_HAL_EnableFtfClock(uint32_t baseAddr
, uint32_t instance
);
325 * @brief Disable the clock for FTF module.
327 * This function disables the clock for FTF moudle.
329 * @param baseAddr Base address for current SIM instance.
330 * @param instance module device instance
332 void SIM_HAL_DisableFtfClock(uint32_t baseAddr
, uint32_t instance
);
335 * @brief Get the the clock gate state for FTF module.
337 * This function will get the clock gate state for FTF moudle.
339 * @param baseAddr Base address for current SIM instance.
340 * @param instance module device instance
341 * @return state true - ungated(Enabled), false - gated (Disabled)
343 bool SIM_HAL_GetFtfGateCmd(uint32_t baseAddr
, uint32_t instance
);
346 * @brief Enable the clock for CRC module.
348 * This function enables the clock for CRC moudle.
350 * @param baseAddr Base address for current SIM instance.
351 * @param instance module device instance
353 void SIM_HAL_EnableCrcClock(uint32_t baseAddr
, uint32_t instance
);
356 * @brief Disable the clock for CRC module.
358 * This function disables the clock for CRC moudle.
360 * @param baseAddr Base address for current SIM instance.
361 * @param instance module device instance
363 void SIM_HAL_DisableCrcClock(uint32_t baseAddr
, uint32_t instance
);
366 * @brief Get the the clock gate state for CRC module.
368 * This function will get the clock gate state for CRC moudle.
370 * @param baseAddr Base address for current SIM instance.
371 * @param instance module device instance
372 * @return state true - ungated(Enabled), false - gated (Disabled)
374 bool SIM_HAL_GetCrcGateCmd(uint32_t baseAddr
, uint32_t instance
);
377 * @brief Enable the clock for RNGA module.
379 * This function enables the clock for RNGA moudle.
381 * @param baseAddr Base address for current SIM instance.
382 * @param instance module device instance
384 void SIM_HAL_EnableRngaClock(uint32_t baseAddr
, uint32_t instance
);
387 * @brief Disable the clock for RNGA module.
389 * This function disables the clock for RNGA moudle.
391 * @param baseAddr Base address for current SIM instance.
392 * @param instance module device instance
394 void SIM_HAL_DisableRngaClock(uint32_t baseAddr
, uint32_t instance
);
397 * @brief Get the the clock gate state for RNGA module.
399 * This function will get the clock gate state for RNGA moudle.
401 * @param baseAddr Base address for current SIM instance.
402 * @param instance module device instance
403 * @return state true - ungated(Enabled), false - gated (Disabled)
405 bool SIM_HAL_GetRngaGateCmd(uint32_t baseAddr
, uint32_t instance
);
408 * @brief Enable the clock for ADC module.
410 * This function enables the clock for ADC moudle.
412 * @param baseAddr Base address for current SIM instance.
413 * @param instance module device instance
415 void SIM_HAL_EnableAdcClock(uint32_t baseAddr
, uint32_t instance
);
418 * @brief Disable the clock for ADC module.
420 * This function disables the clock for ADC moudle.
422 * @param baseAddr Base address for current SIM instance.
423 * @param instance module device instance
425 void SIM_HAL_DisableAdcClock(uint32_t baseAddr
, uint32_t instance
);
428 * @brief Get the the clock gate state for ADC module.
430 * This function will get the clock gate state for ADC moudle.
432 * @param baseAddr Base address for current SIM instance.
433 * @param instance module device instance
434 * @return state true - ungated(Enabled), false - gated (Disabled)
436 bool SIM_HAL_GetAdcGateCmd(uint32_t baseAddr
, uint32_t instance
);
439 * @brief Enable the clock for CMP module.
441 * This function enables the clock for CMP moudle.
443 * @param baseAddr Base address for current SIM instance.
444 * @param instance module device instance
446 void SIM_HAL_EnableCmpClock(uint32_t baseAddr
, uint32_t instance
);
449 * @brief Disable the clock for CMP module.
451 * This function disables the clock for CMP moudle.
453 * @param baseAddr Base address for current SIM instance.
454 * @param instance module device instance
456 void SIM_HAL_DisableCmpClock(uint32_t baseAddr
, uint32_t instance
);
459 * @brief Get the the clock gate state for CMP module.
461 * This function will get the clock gate state for CMP moudle.
463 * @param baseAddr Base address for current SIM instance.
464 * @param instance module device instance
465 * @return state true - ungated(Enabled), false - gated (Disabled)
467 bool SIM_HAL_GetCmpGateCmd(uint32_t baseAddr
, uint32_t instance
);
470 * @brief Enable the clock for DAC module.
472 * This function enables the clock for DAC moudle.
474 * @param baseAddr Base address for current SIM instance.
475 * @param instance module device instance
477 void SIM_HAL_EnableDacClock(uint32_t baseAddr
, uint32_t instance
);
480 * @brief Disable the clock for DAC module.
482 * This function disables the clock for DAC moudle.
484 * @param baseAddr Base address for current SIM instance.
485 * @param instance module device instance
487 void SIM_HAL_DisableDacClock(uint32_t baseAddr
, uint32_t instance
);
490 * @brief Get the the clock gate state for DAC module.
492 * This function will get the clock gate state for DAC moudle.
494 * @param baseAddr Base address for current SIM instance.
495 * @param instance module device instance
496 * @return state true - ungated(Enabled), false - gated (Disabled)
498 bool SIM_HAL_GetDacGateCmd(uint32_t baseAddr
, uint32_t instance
);
501 * @brief Enable the clock for VREF module.
503 * This function enables the clock for VREF moudle.
505 * @param baseAddr Base address for current SIM instance.
506 * @param instance module device instance
508 void SIM_HAL_EnableVrefClock(uint32_t baseAddr
, uint32_t instance
);
511 * @brief Disable the clock for VREF module.
513 * This function disables the clock for VREF moudle.
515 * @param baseAddr Base address for current SIM instance.
516 * @param instance module device instance
518 void SIM_HAL_DisableVrefClock(uint32_t baseAddr
, uint32_t instance
);
521 * @brief Get the the clock gate state for VREF module.
523 * This function will get the clock gate state for VREF moudle.
525 * @param baseAddr Base address for current SIM instance.
526 * @param instance module device instance
527 * @return state true - ungated(Enabled), false - gated (Disabled)
529 bool SIM_HAL_GetVrefGateCmd(uint32_t baseAddr
, uint32_t instance
);
532 * @brief Enable the clock for SAI module.
534 * This function enables the clock for SAI moudle.
536 * @param baseAddr Base address for current SIM instance.
537 * @param instance module device instance
539 void SIM_HAL_EnableSaiClock(uint32_t baseAddr
, uint32_t instance
);
542 * @brief Disable the clock for SAI module.
544 * This function disables the clock for SAI moudle.
546 * @param baseAddr Base address for current SIM instance.
547 * @param instance module device instance
549 void SIM_HAL_DisableSaiClock(uint32_t baseAddr
, uint32_t instance
);
552 * @brief Get the the clock gate state for SAI module.
554 * This function will get the clock gate state for SAI moudle.
556 * @param baseAddr Base address for current SIM instance.
557 * @param instance module device instance
558 * @return state true - ungated(Enabled), false - gated (Disabled)
560 bool SIM_HAL_GetSaiGateCmd(uint32_t baseAddr
, uint32_t instance
);
563 * @brief Enable the clock for PDB module.
565 * This function enables the clock for PDB moudle.
567 * @param baseAddr Base address for current SIM instance.
568 * @param instance module device instance
570 void SIM_HAL_EnablePdbClock(uint32_t baseAddr
, uint32_t instance
);
573 * @brief Disable the clock for PDB module.
575 * This function disables the clock for PDB moudle.
577 * @param baseAddr Base address for current SIM instance.
578 * @param instance module device instance
580 void SIM_HAL_DisablePdbClock(uint32_t baseAddr
, uint32_t instance
);
583 * @brief Get the the clock gate state for PDB module.
585 * This function will get the clock gate state for PDB moudle.
587 * @param baseAddr Base address for current SIM instance.
588 * @param instance module device instance
589 * @return state true - ungated(Enabled), false - gated (Disabled)
591 bool SIM_HAL_GetPdbGateCmd(uint32_t baseAddr
, uint32_t instance
);
594 * @brief Enable the clock for FTM module.
596 * This function enables the clock for FTM moudle.
598 * @param baseAddr Base address for current SIM instance.
599 * @param instance module device instance
601 void SIM_HAL_EnableFtmClock(uint32_t baseAddr
, uint32_t instance
);
604 * @brief Disable the clock for FTM module.
606 * This function disables the clock for FTM moudle.
608 * @param baseAddr Base address for current SIM instance.
609 * @param instance module device instance
611 void SIM_HAL_DisableFtmClock(uint32_t baseAddr
, uint32_t instance
);
614 * @brief Get the the clock gate state for FTM module.
616 * This function will get the clock gate state for FTM moudle.
618 * @param baseAddr Base address for current SIM instance.
619 * @param instance module device instance
620 * @return state true - ungated(Enabled), false - gated (Disabled)
622 bool SIM_HAL_GetFtmGateCmd(uint32_t baseAddr
, uint32_t instance
);
625 * @brief Enable the clock for PIT module.
627 * This function enables the clock for PIT moudle.
629 * @param baseAddr Base address for current SIM instance.
630 * @param instance module device instance
632 void SIM_HAL_EnablePitClock(uint32_t baseAddr
, uint32_t instance
);
635 * @brief Disable the clock for PIT module.
637 * This function disables the clock for PIT moudle.
639 * @param baseAddr Base address for current SIM instance.
640 * @param instance module device instance
642 void SIM_HAL_DisablePitClock(uint32_t baseAddr
, uint32_t instance
);
645 * @brief Get the the clock gate state for PIT module.
647 * This function will get the clock gate state for PIT moudle.
649 * @param baseAddr Base address for current SIM instance.
650 * @param instance module device instance
651 * @return state true - ungated(Enabled), false - gated (Disabled)
653 bool SIM_HAL_GetPitGateCmd(uint32_t baseAddr
, uint32_t instance
);
656 * @brief Enable the clock for LPTIMER module.
658 * This function enables the clock for LPTIMER moudle.
660 * @param baseAddr Base address for current SIM instance.
661 * @param instance module device instance
663 void SIM_HAL_EnableLptimerClock(uint32_t baseAddr
, uint32_t instance
);
666 * @brief Disable the clock for LPTIMER module.
668 * This function disables the clock for LPTIMER moudle.
670 * @param baseAddr Base address for current SIM instance.
671 * @param instance module device instance
673 void SIM_HAL_DisableLptimerClock(uint32_t baseAddr
, uint32_t instance
);
676 * @brief Get the the clock gate state for LPTIMER module.
678 * This function will get the clock gate state for LPTIMER moudle.
680 * @param baseAddr Base address for current SIM instance.
681 * @param instance module device instance
682 * @return state true - ungated(Enabled), false - gated (Disabled)
684 bool SIM_HAL_GetLptimerGateCmd(uint32_t baseAddr
, uint32_t instance
);
687 * @brief Enable the clock for CMT module.
689 * This function enables the clock for CMT moudle.
691 * @param baseAddr Base address for current SIM instance.
692 * @param instance module device instance
694 void SIM_HAL_EnableCmtClock(uint32_t baseAddr
, uint32_t instance
);
697 * @brief Disable the clock for CMT module.
699 * This function disables the clock for CMT moudle.
701 * @param baseAddr Base address for current SIM instance.
702 * @param instance module device instance
704 void SIM_HAL_DisableCmtClock(uint32_t baseAddr
, uint32_t instance
);
707 * @brief Get the the clock gate state for CMT module.
709 * This function will get the clock gate state for CMT moudle.
711 * @param baseAddr Base address for current SIM instance.
712 * @param instance module device instance
713 * @return state true - ungated(Enabled), false - gated (Disabled)
715 bool SIM_HAL_GetCmtGateCmd(uint32_t baseAddr
, uint32_t instance
);
718 * @brief Enable the clock for RTC module.
720 * This function enables the clock for RTC moudle.
722 * @param baseAddr Base address for current SIM instance.
723 * @param instance module device instance
725 void SIM_HAL_EnableRtcClock(uint32_t baseAddr
, uint32_t instance
);
728 * @brief Disable the clock for RTC module.
730 * This function disables the clock for RTC moudle.
732 * @param baseAddr Base address for current SIM instance.
733 * @param instance module device instance
735 void SIM_HAL_DisableRtcClock(uint32_t baseAddr
, uint32_t instance
);
738 * @brief Get the the clock gate state for RTC module.
740 * This function will get the clock gate state for RTC moudle.
742 * @param baseAddr Base address for current SIM instance.
743 * @param instance module device instance
744 * @return state true - ungated(Enabled), false - gated (Disabled)
746 bool SIM_HAL_GetRtcGateCmd(uint32_t baseAddr
, uint32_t instance
);
749 * @brief Enable the clock for ENET module.
751 * This function enables the clock for ENET moudle.
753 * @param baseAddr Base address for current SIM instance.
754 * @param instance module device instance
756 void SIM_HAL_EnableEnetClock(uint32_t baseAddr
, uint32_t instance
);
759 * @brief Disable the clock for ENET module.
761 * This function disables the clock for ENET moudle.
763 * @param baseAddr Base address for current SIM instance.
764 * @param instance module device instance
766 void SIM_HAL_DisableEnetClock(uint32_t baseAddr
, uint32_t instance
);
769 * @brief Get the the clock gate state for ENET module.
771 * This function will get the clock gate state for ENET moudle.
773 * @param baseAddr Base address for current SIM instance.
774 * @param instance module device instance
775 * @return state true - ungated(Enabled), false - gated (Disabled)
777 bool SIM_HAL_GetEnetGateCmd(uint32_t baseAddr
, uint32_t instance
);
780 * @brief Enable the clock for USBFS module.
782 * This function enables the clock for USBFS moudle.
784 * @param baseAddr Base address for current SIM instance.
785 * @param instance module device instance
787 void SIM_HAL_EnableUsbClock(uint32_t baseAddr
, uint32_t instance
);
790 * @brief Disable the clock for USBFS module.
792 * This function disables the clock for USBFS moudle.
794 * @param baseAddr Base address for current SIM instance.
795 * @param instance module device instance
797 void SIM_HAL_DisableUsbClock(uint32_t baseAddr
, uint32_t instance
);
800 * @brief Get the the clock gate state for USB module.
802 * This function will get the clock gate state for USB moudle.
804 * @param baseAddr Base address for current SIM instance.
805 * @param instance module device instance
806 * @return state true - ungated(Enabled), false - gated (Disabled)
808 bool SIM_HAL_GetUsbGateCmd(uint32_t baseAddr
, uint32_t instance
);
811 * @brief Enable the clock for USBDCD module.
813 * This function enables the clock for USBDCD moudle.
815 * @param baseAddr Base address for current SIM instance.
816 * @param instance module device instance
818 void SIM_HAL_EnableUsbdcdClock(uint32_t baseAddr
, uint32_t instance
);
821 * @brief Disable the clock for USBDCD module.
823 * This function disables the clock for USBDCD moudle.
825 * @param baseAddr Base address for current SIM instance.
826 * @param instance module device instance
828 void SIM_HAL_DisableUsbdcdClock(uint32_t baseAddr
, uint32_t instance
);
831 * @brief Get the the clock gate state for USBDCD module.
833 * This function will get the clock gate state for USBDCD moudle.
835 * @param baseAddr Base address for current SIM instance.
836 * @param instance module device instance
837 * @return state true - ungated(Enabled), false - gated (Disabled)
839 bool SIM_HAL_GetUsbdcdGateCmd(uint32_t baseAddr
, uint32_t instance
);
842 * @brief Enable the clock for FLEXCAN module.
844 * This function enables the clock for FLEXCAN moudle.
846 * @param baseAddr Base address for current SIM instance.
847 * @param instance module device instance
849 void SIM_HAL_EnableFlexcanClock(uint32_t baseAddr
, uint32_t instance
);
852 * @brief Disable the clock for FLEXCAN module.
854 * This function disables the clock for FLEXCAN moudle.
856 * @param baseAddr Base address for current SIM instance.
857 * @param instance module device instance
859 void SIM_HAL_DisableFlexcanClock(uint32_t baseAddr
, uint32_t instance
);
862 * @brief Get the the clock gate state for FLEXCAN module.
864 * This function will get the clock gate state for FLEXCAN moudle.
866 * @param baseAddr Base address for current SIM instance.
867 * @param instance module device instance
868 * @return state true - ungated(Enabled), false - gated (Disabled)
870 bool SIM_HAL_GetFlexcanGateCmd(uint32_t baseAddr
, uint32_t instance
);
873 * @brief Enable the clock for SPI module.
875 * This function enables the clock for SPI moudle.
877 * @param baseAddr Base address for current SIM instance.
878 * @param instance module device instance
880 void SIM_HAL_EnableSpiClock(uint32_t baseAddr
, uint32_t instance
);
883 * @brief Disable the clock for SPI module.
885 * This function disables the clock for SPI moudle.
887 * @param baseAddr Base address for current SIM instance.
888 * @param instance module device instance
890 void SIM_HAL_DisableSpiClock(uint32_t baseAddr
, uint32_t instance
);
893 * @brief Get the the clock gate state for SPI module.
895 * This function will get the clock gate state for SPI moudle.
897 * @param baseAddr Base address for current SIM instance.
898 * @param instance module device instance
899 * @return state true - ungated(Enabled), false - gated (Disabled)
901 bool SIM_HAL_GetSpiGateCmd(uint32_t baseAddr
, uint32_t instance
);
904 * @brief Enable the clock for I2C module.
906 * This function enables the clock for I2C moudle.
908 * @param baseAddr Base address for current SIM instance.
909 * @param instance module device instance
911 void SIM_HAL_EnableI2cClock(uint32_t baseAddr
, uint32_t instance
);
914 * @brief Disable the clock for I2C module.
916 * This function disables the clock for I2C moudle.
918 * @param baseAddr Base address for current SIM instance.
919 * @param instance module device instance
921 void SIM_HAL_DisableI2cClock(uint32_t baseAddr
, uint32_t instance
);
924 * @brief Get the the clock gate state for I2C module.
926 * This function will get the clock gate state for I2C moudle.
928 * @param baseAddr Base address for current SIM instance.
929 * @param instance module device instance
930 * @return state true - ungated(Enabled), false - gated (Disabled)
932 bool SIM_HAL_GetI2cGateCmd(uint32_t baseAddr
, uint32_t instance
);
935 * @brief Enable the clock for UART module.
937 * This function enables the clock for UART moudle.
939 * @param baseAddr Base address for current SIM instance.
940 * @param instance module device instance
942 void SIM_HAL_EnableUartClock(uint32_t baseAddr
, uint32_t instance
);
945 * @brief Disable the clock for UART module.
947 * This function disables the clock for UART moudle.
949 * @param baseAddr Base address for current SIM instance.
950 * @param instance module device instance
952 void SIM_HAL_DisableUartClock(uint32_t baseAddr
, uint32_t instance
);
955 * @brief Get the the clock gate state for UART module.
957 * This function will get the clock gate state for UART moudle.
959 * @param baseAddr Base address for current SIM instance.
960 * @param instance module device instance
961 * @return state true - ungated(Enabled), false - gated (Disabled)
963 bool SIM_HAL_GetUartGateCmd(uint32_t baseAddr
, uint32_t instance
);
966 * @brief Enable the clock for SDHC module.
968 * This function enables the clock for SDHC moudle.
970 * @param baseAddr Base address for current SIM instance.
971 * @param instance module device instance
973 void SIM_HAL_EnableSdhcClock(uint32_t baseAddr
, uint32_t instance
);
976 * @brief Disable the clock for SDHC module.
978 * This function disables the clock for SDHC moudle.
980 * @param baseAddr Base address for current SIM instance.
981 * @param instance module device instance
983 void SIM_HAL_DisableSdhcClock(uint32_t baseAddr
, uint32_t instance
);
986 * @brief Get the the clock gate state for SDHC module.
988 * This function will get the clock gate state for SDHC moudle.
990 * @param baseAddr Base address for current SIM instance.
991 * @param instance module device instance
992 * @return state true - ungated(Enabled), false - gated (Disabled)
994 bool SIM_HAL_GetSdhcGateCmd(uint32_t baseAddr
, uint32_t instance
);
998 #if defined(__cplusplus)
1000 #endif /* __cplusplus*/
1005 #endif /* __FSL_SIM_HAL_K64F12_H__*/
1006 /*******************************************************************************
1008 ******************************************************************************/