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_CLOCK_K64F12_H__)
32 #define __FSL_CLOCK_K64F12__H__
34 /*! @addtogroup clock_manager*/
39 /*******************************************************************************
41 ******************************************************************************/
44 /*******************************************************************************
46 ******************************************************************************/
48 #if defined(__cplusplus)
50 #endif /* __cplusplus*/
53 * @brief Gets the clock frequency for DMA module.
55 * This function gets the clock frequence for DMA moudle.
56 * @param instance module device instance
57 * @return freq clock frequence for this module
59 uint32_t CLOCK_SYS_GetDmaFreq(uint32_t instance);
62 * @brief Gets the clock frequency for DMAMUX module.
64 * This function gets the clock frequence for DMAMUX moudle.
65 * @param instance module device instance
66 * @return freq clock frequence for this module
68 uint32_t CLOCK_SYS_GetDmamuxFreq(uint32_t instance);
71 * @brief Gets the clock frequency for PORT module.
73 * This function gets the clock frequence for PORT moudle.
74 * @param instance module device instance
75 * @return freq clock frequence for this module
77 uint32_t CLOCK_SYS_GetPortFreq(uint32_t instance);
80 * @brief Gets the clock frequency for MPU module.
82 * This function gets the clock frequence for MPU moudle.
83 * @param instance module device instance
84 * @return freq clock frequence for this module
86 uint32_t CLOCK_SYS_GetMpuFreq(uint32_t instance);
89 * @brief Gets the clock frequency for EWM module.
91 * This function gets the clock frequence for EWM moudle.
92 * @param instance module device instance
93 * @return freq clock frequence for this module
95 uint32_t CLOCK_SYS_GetEwmFreq(uint32_t instance);
98 * @brief Gets the clock frequency for FLEXBUS module.
100 * This function gets the clock frequence for FLEXBUS moudle.
101 * @param instance module device instance
102 * @return freq clock frequence for this module
104 uint32_t CLOCK_SYS_GetFlexbusFreq(uint32_t instance);
107 * @brief Gets the clock frequency for FTF module. (Flash Memory)
109 * This function gets the clock frequence for FTF module. (Flash Memory)
110 * @param instance module device instance
111 * @return freq clock frequence for this module
113 uint32_t CLOCK_SYS_GetFtfFreq(uint32_t instance);
116 * @brief Gets the clock frequency for CRC module.
118 * This function gets the clock frequence for CRC module.
119 * @param instance module device instance
120 * @return freq clock frequence for this module
122 uint32_t CLOCK_SYS_GetCrcFreq(uint32_t instance);
125 * @brief Gets the clock frequency for RNGA module.
127 * This function gets the clock frequence for RNGA module.
128 * @param instance module device instance
129 * @return freq clock frequence for this module
131 uint32_t CLOCK_SYS_GetRngaFreq(uint32_t instance);
134 * @brief Gets the clock frequency for ADC module.
136 * This function gets the clock frequence for ADC module.
137 * @param instance module device instance
138 * @return freq clock frequence for this module
140 uint32_t CLOCK_SYS_GetAdcFreq(uint32_t instance);
143 * @brief Gets the clock frequency for CMP module.
145 * This function gets the clock frequence for CMP module.
146 * @param instance module device instance
147 * @return freq clock frequence for this module
149 uint32_t CLOCK_SYS_GetCmpFreq(uint32_t instance);
152 * @brief Gets the clock frequency for VREF module.
154 * This function gets the clock frequence for VREF module.
155 * @param instance module device instance
156 * @return freq clock frequence for this module
158 uint32_t CLOCK_SYS_GetVrefFreq(uint32_t instance);
161 * @brief Gets the clock frequency for PDB module.
163 * This function gets the clock frequence for PDB module.
164 * @param instance module device instance
165 * @return freq clock frequence for this module
167 uint32_t CLOCK_SYS_GetPdbFreq(uint32_t instance);
170 * @brief Gets the clock frequency for FTM module. (FlexTimer)
172 * This function gets the clock frequence for FTM module.
173 * @param instance module device instance
174 * @return freq clock frequence for this module
176 uint32_t CLOCK_SYS_GetFtmFreq(uint32_t instance);
179 * @brief Gets the clock frequency for PIT module.
181 * This function gets the clock frequence for PIT module.
182 * @param instance module device instance
183 * @return freq clock frequence for this module
185 uint32_t CLOCK_SYS_GetPitFreq(uint32_t instance);
188 * @brief Gets the clock frequency for CMT module.
190 * This function gets the clock frequence for CMT module.
191 * @param instance module device instance
192 * @return freq clock frequence for this module
194 uint32_t CLOCK_SYS_GetCmtFreq(uint32_t instance);
197 * @brief Gets the clock frequency for ENET module RMII clock.
199 * This function gets the clock frequence for ENET module RMII clock..
200 * @param instance module device instance
201 * @return freq clock frequence for this module
203 uint32_t CLOCK_SYS_GetEnetRmiiFreq(uint32_t instance);
206 * @brief Gets the clock frequency for ENET module TIME clock.
208 * This function gets the clock frequence for ENET module TIME clock..
209 * @param instance module device instance
210 * @return freq clock frequence for this module
212 uint32_t CLOCK_SYS_GetEnetTimeStampFreq(uint32_t instance);
215 * @brief Gets the clock frequency for USB FS OTG module
217 * This function gets the clock frequence for USB FS OTG module.
218 * @param instance module device instance
219 * @return freq clock frequence for this module
221 uint32_t CLOCK_SYS_GetUsbFreq(uint32_t instance);
224 * @brief Gets the clock frequency for USB DCD module
226 * This function gets the clock frequence for USB DCD module.
227 * @param instance module device instance
228 * @return freq clock frequence for this module
230 uint32_t CLOCK_SYS_GetUsbdcdFreq(uint32_t instance);
233 * @brief Gets the clock frequency for SPI module
235 * This function gets the clock frequence for SPI module.
236 * @param instance module device instance
237 * @return freq clock frequence for this module
239 uint32_t CLOCK_SYS_GetSpiFreq(uint32_t instance);
242 * @brief Gets the clock frequency for I2C module
244 * This function gets the clock frequence for I2C module.
245 * @param instance module device instance
246 * @return freq clock frequence for this module
248 uint32_t CLOCK_SYS_GetI2cFreq(uint32_t instance);
251 * @brief Gets the clock frequency for UART module
253 * This function gets the clock frequence for UART module.
254 * @param instance module device instance
255 * @return freq clock frequence for this module
257 uint32_t CLOCK_SYS_GetUartFreq(uint32_t instance);
260 * @brief Gets the clock frequency for SDHC module.
262 * This function gets the clock frequence for SDHC moudle.
263 * @param instance module device instance
264 * @return freq clock frequence for this module
266 uint32_t CLOCK_SYS_GetSdhcFreq(uint32_t instance);
269 * @brief Gets the clock frequency for I2S module.
271 * This function gets the clock frequence for I2S module.
272 * @param instance module device instance
273 * @return freq clock frequence for this module
275 uint32_t CLOCK_SYS_GetSaiFreq(uint32_t instance);
278 * @brief Gets the clock frequency for GPIO module
280 * This function gets the clock frequence for GPIO module.
281 * @param instance module device instance
282 * @return freq clock frequence for this module
284 uint32_t CLOCK_SYS_GetGpioFreq(uint32_t instance);
287 * @brief Enable the clock for DMA module.
289 * This function enables the clock for DMA moudle.
290 * @param instance module device instance
292 static inline void CLOCK_SYS_EnableDmaClock(uint32_t instance)
294 SIM_HAL_EnableDmaClock(g_simBaseAddr[0], instance);
298 * @brief Disable the clock for DMA module.
300 * This function disables the clock for DMA moudle.
301 * @param instance module device instance
303 static inline void CLOCK_SYS_DisableDmaClock(uint32_t instance)
305 SIM_HAL_DisableDmaClock(g_simBaseAddr[0], instance);
309 * @brief Get the the clock gate state for DMA module.
311 * This function will get the clock gate state for DMA moudle.
312 * @param instance module device instance
313 * @return state true - ungated(Enabled), false - gated (Disabled)
315 static inline bool CLOCK_SYS_GetDmaGateCmd(uint32_t instance)
317 return SIM_HAL_GetDmaGateCmd(g_simBaseAddr[0], instance);
321 * @brief Enable the clock for DMAMUX module.
323 * This function enables the clock for DMAMUX moudle.
324 * @param instance module device instance
326 static inline void CLOCK_SYS_EnableDmamuxClock(uint32_t instance)
328 SIM_HAL_EnableDmamuxClock(g_simBaseAddr[0], instance);
332 * @brief Disable the clock for DMAMUX module.
334 * This function disables the clock for DMAMUX moudle.
335 * @param instance module device instance
337 static inline void CLOCK_SYS_DisableDmamuxClock(uint32_t instance)
339 SIM_HAL_DisableDmamuxClock(g_simBaseAddr[0], instance);
343 * @brief Get the the clock gate state for DMAMUX module.
345 * This function will get the clock gate state for DMAMUX moudle.
346 * @param instance module device instance
347 * @return state true - ungated(Enabled), false - gated (Disabled)
349 static inline bool CLOCK_SYS_GetDmamuxGateCmd(uint32_t instance)
351 return SIM_HAL_GetDmamuxGateCmd(g_simBaseAddr[0], instance);
355 * @brief Enable the clock for PORT module.
357 * This function enables the clock for PORT moudle.
358 * @param instance module device instance
360 static inline void CLOCK_SYS_EnablePortClock(uint32_t instance)
362 SIM_HAL_EnablePortClock(g_simBaseAddr[0], instance);
366 * @brief Disable the clock for PORT module.
368 * This function disables the clock for PORT moudle.
369 * @param instance module device instance
371 static inline void CLOCK_SYS_DisablePortClock(uint32_t instance)
373 SIM_HAL_DisablePortClock(g_simBaseAddr[0], instance);
377 * @brief Get the the clock gate state for PORT module.
379 * This function will get the clock gate state for PORT moudle.
380 * @param instance module device instance
381 * @return state true - ungated(Enabled), false - gated (Disabled)
383 static inline bool CLOCK_SYS_GetPortGateCmd(uint32_t instance)
385 return SIM_HAL_GetPortGateCmd(g_simBaseAddr[0], instance);
389 * @brief Enable the clock for MPU module.
391 * This function enables the clock for MPU moudle.
392 * @param instance module device instance
394 static inline void CLOCK_SYS_EnableMpuClock(uint32_t instance)
396 SIM_HAL_EnableMpuClock(g_simBaseAddr[0], instance);
400 * @brief Disable the clock for MPU module.
402 * This function disables the clock for MPU moudle.
403 * @param instance module device instance
405 static inline void CLOCK_SYS_DisableMpuClock(uint32_t instance)
407 SIM_HAL_DisableMpuClock(g_simBaseAddr[0], instance);
411 * @brief Get the the clock gate state for MPU module.
413 * This function will get the clock gate state for MPU moudle.
414 * @param instance module device instance
415 * @return state true - ungated(Enabled), false - gated (Disabled)
417 static inline bool CLOCK_SYS_GetMpuGateCmd(uint32_t instance)
419 return SIM_HAL_GetMpuGateCmd(g_simBaseAddr[0], instance);
423 * @brief Enable the clock for EWM module.
425 * This function enables the clock for EWM moudle.
426 * @param instance module device instance
428 static inline void CLOCK_SYS_EnableEwmClock(uint32_t instance)
430 SIM_HAL_EnableEwmClock(g_simBaseAddr[0], instance);
434 * @brief Disable the clock for EWM module.
436 * This function disables the clock for EWM moudle.
437 * @param instance module device instance
439 static inline void CLOCK_SYS_DisableEwmClock(uint32_t instance)
441 SIM_HAL_DisableEwmClock(g_simBaseAddr[0], instance);
445 * @brief Get the the clock gate state for EWM module.
447 * This function will get the clock gate state for EWM moudle.
448 * @param instance module device instance
449 * @return state true - ungated(Enabled), false - gated (Disabled)
451 static inline bool CLOCK_SYS_GetEwmGateCmd(uint32_t instance)
453 return SIM_HAL_GetEwmGateCmd(g_simBaseAddr[0], instance);
457 * @brief Enable the clock for FLEXBUS module.
459 * This function enables the clock for FLEXBUS moudle.
460 * @param instance module device instance
462 static inline void CLOCK_SYS_EnableFlexbusClock(uint32_t instance)
464 SIM_HAL_EnableFlexbusClock(g_simBaseAddr[0], instance);
468 * @brief Disable the clock for FLEXBUS module.
470 * This function disables the clock for FLEXBUS moudle.
471 * @param instance module device instance
473 static inline void CLOCK_SYS_DisableFlexbusClock(uint32_t instance)
475 SIM_HAL_DisableFlexbusClock(g_simBaseAddr[0], instance);
479 * @brief Get the the clock gate state for FLEXBUS module.
481 * This function will get the clock gate state for FLEXBUS moudle.
482 * @param instance module device instance
483 * @return state true - ungated(Enabled), false - gated (Disabled)
485 static inline bool CLOCK_SYS_GetFlexbusGateCmd(uint32_t instance)
487 return SIM_HAL_GetFlexbusGateCmd(g_simBaseAddr[0], instance);
491 * @brief Enable the clock for FTF module.
493 * This function enables the clock for FTF moudle.
494 * @param instance module device instance
496 static inline void CLOCK_SYS_EnableFtfClock(uint32_t instance)
498 SIM_HAL_EnableFtfClock(g_simBaseAddr[0], instance);
502 * @brief Disable the clock for FTF module.
504 * This function disables the clock for FTF moudle.
505 * @param instance module device instance
507 static inline void CLOCK_SYS_DisableFtfClock(uint32_t instance)
509 SIM_HAL_DisableFtfClock(g_simBaseAddr[0], instance);
513 * @brief Get the the clock gate state for FTF module.
515 * This function will get the clock gate state for FTF moudle.
516 * @param instance module device instance
517 * @return state true - ungated(Enabled), false - gated (Disabled)
519 static inline bool CLOCK_SYS_GetFtfGateCmd(uint32_t instance)
521 return SIM_HAL_GetFtfGateCmd(g_simBaseAddr[0], instance);
525 * @brief Enable the clock for CRC module.
527 * This function enables the clock for CRC moudle.
528 * @param instance module device instance
530 static inline void CLOCK_SYS_EnableCrcClock(uint32_t instance)
532 SIM_HAL_EnableCrcClock(g_simBaseAddr[0], instance);
536 * @brief Disable the clock for CRC module.
538 * This function disables the clock for CRC moudle.
539 * @param instance module device instance
541 static inline void CLOCK_SYS_DisableCrcClock(uint32_t instance)
543 SIM_HAL_DisableCrcClock(g_simBaseAddr[0], instance);
547 * @brief Get the the clock gate state for CRC module.
549 * This function will get the clock gate state for CRC moudle.
550 * @param instance module device instance
551 * @return state true - ungated(Enabled), false - gated (Disabled)
553 static inline bool CLOCK_SYS_GetCrcGateCmd(uint32_t instance)
555 return SIM_HAL_GetCrcGateCmd(g_simBaseAddr[0], instance);
559 * @brief Enable the clock for RNGA module.
561 * This function enables the clock for RNGA moudle.
562 * @param instance module device instance
564 static inline void CLOCK_SYS_EnableRngaClock(uint32_t instance)
566 SIM_HAL_EnableRngaClock(g_simBaseAddr[0], instance);
570 * @brief Disable the clock for RNGA module.
572 * This function disables the clock for RNGA moudle.
573 * @param instance module device instance
575 static inline void CLOCK_SYS_DisableRngaClock(uint32_t instance)
577 SIM_HAL_DisableRngaClock(g_simBaseAddr[0], instance);
581 * @brief Get the the clock gate state for RNGA module.
583 * This function will get the clock gate state for RNGA moudle.
584 * @param instance module device instance
585 * @return state true - ungated(Enabled), false - gated (Disabled)
587 static inline bool CLOCK_SYS_GetRngaGateCmd(uint32_t instance)
589 return SIM_HAL_GetRngaGateCmd(g_simBaseAddr[0], instance);
593 * @brief Enable the clock for ADC module.
595 * This function enables the clock for ADC moudle.
596 * @param instance module device instance
598 static inline void CLOCK_SYS_EnableAdcClock(uint32_t instance)
600 SIM_HAL_EnableAdcClock(g_simBaseAddr[0], instance);
604 * @brief Disable the clock for ADC module.
606 * This function disables the clock for ADC moudle.
607 * @param instance module device instance
609 static inline void CLOCK_SYS_DisableAdcClock(uint32_t instance)
611 SIM_HAL_DisableAdcClock(g_simBaseAddr[0], instance);
615 * @brief Get the the clock gate state for ADC module.
617 * This function will get the clock gate state for ADC moudle.
618 * @param instance module device instance
619 * @return state true - ungated(Enabled), false - gated (Disabled)
621 static inline bool CLOCK_SYS_GetAdcGateCmd(uint32_t instance)
623 return SIM_HAL_GetAdcGateCmd(g_simBaseAddr[0], instance);
627 * @brief Enable the clock for CMP module.
629 * This function enables the clock for CMP moudle.
630 * @param instance module device instance
632 static inline void CLOCK_SYS_EnableCmpClock(uint32_t instance)
634 SIM_HAL_EnableCmpClock(g_simBaseAddr[0], instance);
638 * @brief Disable the clock for CMP module.
640 * This function disables the clock for CMP moudle.
641 * @param instance module device instance
643 static inline void CLOCK_SYS_DisableCmpClock(uint32_t instance)
645 SIM_HAL_DisableCmpClock(g_simBaseAddr[0], instance);
649 * @brief Get the the clock gate state for CMP module.
651 * This function will get the clock gate state for CMP moudle.
652 * @param instance module device instance
653 * @return state true - ungated(Enabled), false - gated (Disabled)
655 static inline bool CLOCK_SYS_GetCmpGateCmd(uint32_t instance)
657 return SIM_HAL_GetCmpGateCmd(g_simBaseAddr[0], instance);
661 * @brief Enable the clock for DAC module.
663 * This function enables the clock for DAC moudle.
664 * @param instance module device instance
666 static inline void CLOCK_SYS_EnableDacClock(uint32_t instance)
668 SIM_HAL_EnableDacClock(g_simBaseAddr[0], instance);
672 * @brief Disable the clock for DAC module.
674 * This function disables the clock for DAC moudle.
675 * @param instance module device instance
677 static inline void CLOCK_SYS_DisableDacClock(uint32_t instance)
679 SIM_HAL_DisableDacClock(g_simBaseAddr[0], instance);
683 * @brief Get the the clock gate state for DAC module.
685 * This function will get the clock gate state for DAC moudle.
686 * @param instance module device instance
687 * @return state true - ungated(Enabled), false - gated (Disabled)
689 static inline bool CLOCK_SYS_GetDacGateCmd(uint32_t instance)
691 return SIM_HAL_GetDacGateCmd(g_simBaseAddr[0], instance);
695 * @brief Enable the clock for VREF module.
697 * This function enables the clock for VREF moudle.
698 * @param instance module device instance
700 static inline void CLOCK_SYS_EnableVrefClock(uint32_t instance)
702 SIM_HAL_EnableVrefClock(g_simBaseAddr[0], instance);
706 * @brief Disable the clock for VREF module.
708 * This function disables the clock for VREF moudle.
709 * @param instance module device instance
711 static inline void CLOCK_SYS_DisableVrefClock(uint32_t instance)
713 SIM_HAL_DisableVrefClock(g_simBaseAddr[0], instance);
717 * @brief Get the the clock gate state for VREF module.
719 * This function will get the clock gate state for VREF moudle.
720 * @param instance module device instance
721 * @return state true - ungated(Enabled), false - gated (Disabled)
723 static inline bool CLOCK_SYS_GetVrefGateCmd(uint32_t instance)
725 return SIM_HAL_GetVrefGateCmd(g_simBaseAddr[0], instance);
729 * @brief Enable the clock for SAI module.
731 * This function enables the clock for SAI moudle.
732 * @param instance module device instance
734 static inline void CLOCK_SYS_EnableSaiClock(uint32_t instance)
736 SIM_HAL_EnableSaiClock(g_simBaseAddr[0], instance);
740 * @brief Disable the clock for SAI module.
742 * This function disables the clock for SAI moudle.
743 * @param instance module device instance
745 static inline void CLOCK_SYS_DisableSaiClock(uint32_t instance)
747 SIM_HAL_DisableSaiClock(g_simBaseAddr[0], instance);
751 * @brief Get the the clock gate state for SAI module.
753 * This function will get the clock gate state for SAI moudle.
754 * @param instance module device instance
755 * @return state true - ungated(Enabled), false - gated (Disabled)
757 static inline bool CLOCK_SYS_GetSaiGateCmd(uint32_t instance)
759 return SIM_HAL_GetSaiGateCmd(g_simBaseAddr[0], instance);
763 * @brief Enable the clock for PDB module.
765 * This function enables the clock for PDB moudle.
766 * @param instance module device instance
768 static inline void CLOCK_SYS_EnablePdbClock(uint32_t instance)
770 SIM_HAL_EnablePdbClock(g_simBaseAddr[0], instance);
774 * @brief Disable the clock for PDB module.
776 * This function disables the clock for PDB moudle.
777 * @param instance module device instance
779 static inline void CLOCK_SYS_DisablePdbClock(uint32_t instance)
781 SIM_HAL_DisablePdbClock(g_simBaseAddr[0], instance);
785 * @brief Get the the clock gate state for PDB module.
787 * This function will get the clock gate state for PDB moudle.
788 * @param instance module device instance
789 * @return state true - ungated(Enabled), false - gated (Disabled)
791 static inline bool CLOCK_SYS_GetPdbGateCmd(uint32_t instance)
793 return SIM_HAL_GetPdbGateCmd(g_simBaseAddr[0], instance);
797 * @brief Enable the clock for FTM module.
799 * This function enables the clock for FTM moudle.
800 * @param instance module device instance
802 static inline void CLOCK_SYS_EnableFtmClock(uint32_t instance)
804 SIM_HAL_EnableFtmClock(g_simBaseAddr[0], instance);
808 * @brief Disable the clock for FTM module.
810 * This function disables the clock for FTM moudle.
811 * @param instance module device instance
813 static inline void CLOCK_SYS_DisableFtmClock(uint32_t instance)
815 SIM_HAL_DisableFtmClock(g_simBaseAddr[0], instance);
819 * @brief Get the the clock gate state for FTM module.
821 * This function will get the clock gate state for FTM moudle.
822 * @param instance module device instance
823 * @return state true - ungated(Enabled), false - gated (Disabled)
825 static inline bool CLOCK_SYS_GetFtmGateCmd(uint32_t instance)
827 return SIM_HAL_GetFtmGateCmd(g_simBaseAddr[0], instance);
831 * @brief Enable the clock for PIT module.
833 * This function enables the clock for PIT moudle.
834 * @param instance module device instance
836 static inline void CLOCK_SYS_EnablePitClock(uint32_t instance)
838 SIM_HAL_EnablePitClock(g_simBaseAddr[0], instance);
842 * @brief Disable the clock for PIT module.
844 * This function disables the clock for PIT moudle.
845 * @param instance module device instance
847 static inline void CLOCK_SYS_DisablePitClock(uint32_t instance)
849 SIM_HAL_DisablePitClock(g_simBaseAddr[0], instance);
853 * @brief Get the the clock gate state for PIT module.
855 * This function will get the clock gate state for PIT moudle.
856 * @param instance module device instance
857 * @return state true - ungated(Enabled), false - gated (Disabled)
859 static inline bool CLOCK_SYS_GetPitGateCmd(uint32_t instance)
861 return SIM_HAL_GetPitGateCmd(g_simBaseAddr[0], instance);
865 * @brief Enable the clock for LPTIMER module.
867 * This function enables the clock for LPTIMER moudle.
868 * @param instance module device instance
870 static inline void CLOCK_SYS_EnableLptimerClock(uint32_t instance)
872 SIM_HAL_EnableLptimerClock(g_simBaseAddr[0], instance);
876 * @brief Disable the clock for LPTIMER module.
878 * This function disables the clock for LPTIMER moudle.
879 * @param instance module device instance
881 static inline void CLOCK_SYS_DisableLptimerClock(uint32_t instance)
883 SIM_HAL_DisableLptimerClock(g_simBaseAddr[0], instance);
887 * @brief Get the the clock gate state for LPTIMER module.
889 * This function will get the clock gate state for LPTIMER moudle.
890 * @param instance module device instance
891 * @return state true - ungated(Enabled), false - gated (Disabled)
893 static inline bool CLOCK_SYS_GetLptimerGateCmd(uint32_t instance)
895 return SIM_HAL_GetLptimerGateCmd(g_simBaseAddr[0], instance);
899 * @brief Enable the clock for CMT module.
901 * This function enables the clock for CMT moudle.
902 * @param instance module device instance
904 static inline void CLOCK_SYS_EnableCmtClock(uint32_t instance)
906 SIM_HAL_EnableCmtClock(g_simBaseAddr[0], instance);
910 * @brief Disable the clock for CMT module.
912 * This function disables the clock for CMT moudle.
913 * @param instance module device instance
915 static inline void CLOCK_SYS_DisableCmtClock(uint32_t instance)
917 SIM_HAL_DisableCmtClock(g_simBaseAddr[0], instance);
921 * @brief Get the the clock gate state for CMT module.
923 * This function will get the clock gate state for CMT moudle.
924 * @param instance module device instance
925 * @return state true - ungated(Enabled), false - gated (Disabled)
927 static inline bool CLOCK_SYS_GetCmtGateCmd(uint32_t instance)
929 return SIM_HAL_GetCmtGateCmd(g_simBaseAddr[0], instance);
933 * @brief Enable the clock for RTC module.
935 * This function enables the clock for RTC moudle.
936 * @param instance module device instance
938 static inline void CLOCK_SYS_EnableRtcClock(uint32_t instance)
940 SIM_HAL_EnableRtcClock(g_simBaseAddr[0], instance);
944 * @brief Disable the clock for RTC module.
946 * This function disables the clock for RTC moudle.
947 * @param instance module device instance
949 static inline void CLOCK_SYS_DisableRtcClock(uint32_t instance)
951 SIM_HAL_DisableRtcClock(g_simBaseAddr[0], instance);
955 * @brief Get the the clock gate state for RTC module.
957 * This function will get the clock gate state for RTC moudle.
958 * @param instance module device instance
959 * @return state true - ungated(Enabled), false - gated (Disabled)
961 static inline bool CLOCK_SYS_GetRtcGateCmd(uint32_t instance)
963 return SIM_HAL_GetRtcGateCmd(g_simBaseAddr[0], instance);
967 * @brief Enable the clock for ENET module.
969 * This function enables the clock for ENET moudle.
970 * @param instance module device instance
972 static inline void CLOCK_SYS_EnableEnetClock(uint32_t instance)
974 SIM_HAL_EnableEnetClock(g_simBaseAddr[0], instance);
978 * @brief Disable the clock for ENET module.
980 * This function disables the clock for ENET moudle.
981 * @param instance module device instance
983 static inline void CLOCK_SYS_DisableEnetClock(uint32_t instance)
985 SIM_HAL_DisableEnetClock(g_simBaseAddr[0], instance);
989 * @brief Get the the clock gate state for ENET module.
991 * This function will get the clock gate state for ENET moudle.
992 * @param instance module device instance
993 * @return state true - ungated(Enabled), false - gated (Disabled)
995 static inline bool CLOCK_SYS_GetEnetGateCmd(uint32_t instance)
997 return SIM_HAL_GetEnetGateCmd(g_simBaseAddr[0], instance);
1001 * @brief Enable the clock for USBFS module.
1003 * This function enables the clock for USBFS moudle.
1004 * @param instance module device instance
1006 static inline void CLOCK_SYS_EnableUsbClock(uint32_t instance)
1008 SIM_HAL_EnableUsbClock(g_simBaseAddr[0], instance);
1012 * @brief Disable the clock for USBFS module.
1014 * This function disables the clock for USBFS moudle.
1015 * @param instance module device instance
1017 static inline void CLOCK_SYS_DisableUsbClock(uint32_t instance)
1019 SIM_HAL_DisableUsbClock(g_simBaseAddr[0], instance);
1023 * @brief Get the the clock gate state for USB module.
1025 * This function will get the clock gate state for USB moudle.
1026 * @param instance module device instance
1027 * @return state true - ungated(Enabled), false - gated (Disabled)
1029 static inline bool CLOCK_SYS_GetUsbGateCmd(uint32_t instance)
1031 return SIM_HAL_GetUsbGateCmd(g_simBaseAddr[0], instance);
1035 * @brief Enable the clock for USBDCD module.
1037 * This function enables the clock for USBDCD moudle.
1038 * @param instance module device instance
1040 static inline void CLOCK_SYS_EnableUsbdcdClock(uint32_t instance)
1042 SIM_HAL_EnableUsbdcdClock(g_simBaseAddr[0], instance);
1046 * @brief Disable the clock for USBDCD module.
1048 * This function disables the clock for USBDCD moudle.
1049 * @param instance module device instance
1051 static inline void CLOCK_SYS_DisableUsbdcdClock(uint32_t instance)
1053 SIM_HAL_DisableUsbdcdClock(g_simBaseAddr[0], instance);
1057 * @brief Get the the clock gate state for USBDCD module.
1059 * This function will get the clock gate state for USBDCD moudle.
1060 * @param instance module device instance
1061 * @return state true - ungated(Enabled), false - gated (Disabled)
1063 static inline bool CLOCK_SYS_GetUsbdcdGateCmd(uint32_t instance)
1065 return SIM_HAL_GetUsbdcdGateCmd(g_simBaseAddr[0], instance);
1069 * @brief Enable the clock for FLEXCAN module.
1071 * This function enables the clock for FLEXCAN moudle.
1072 * @param instance module device instance
1074 static inline void CLOCK_SYS_EnableFlexcanClock(uint32_t instance)
1076 SIM_HAL_EnableFlexcanClock(g_simBaseAddr[0], instance);
1080 * @brief Disable the clock for FLEXCAN module.
1082 * This function disables the clock for FLEXCAN moudle.
1083 * @param instance module device instance
1085 static inline void CLOCK_SYS_DisableFlexcanClock(uint32_t instance)
1087 SIM_HAL_DisableFlexcanClock(g_simBaseAddr[0], instance);
1091 * @brief Get the the clock gate state for FLEXCAN module.
1093 * This function will get the clock gate state for FLEXCAN moudle.
1094 * @param instance module device instance
1095 * @return state true - ungated(Enabled), false - gated (Disabled)
1097 static inline bool CLOCK_SYS_GetFlexcanGateCmd(uint32_t instance)
1099 return SIM_HAL_GetFlexcanGateCmd(g_simBaseAddr[0], instance);
1103 * @brief Enable the clock for SPI module.
1105 * This function enables the clock for SPI moudle.
1106 * @param instance module device instance
1108 static inline void CLOCK_SYS_EnableSpiClock(uint32_t instance)
1110 SIM_HAL_EnableSpiClock(g_simBaseAddr[0], instance);
1114 * @brief Disable the clock for SPI module.
1116 * This function disables the clock for SPI moudle.
1117 * @param instance module device instance
1119 static inline void CLOCK_SYS_DisableSpiClock(uint32_t instance)
1121 SIM_HAL_DisableSpiClock(g_simBaseAddr[0], instance);
1125 * @brief Get the the clock gate state for SPI module.
1127 * This function will get the clock gate state for SPI moudle.
1128 * @param instance module device instance
1129 * @return state true - ungated(Enabled), false - gated (Disabled)
1131 static inline bool CLOCK_SYS_GetSpiGateCmd(uint32_t instance)
1133 return SIM_HAL_GetSpiGateCmd(g_simBaseAddr[0], instance);
1137 * @brief Enable the clock for I2C module.
1139 * This function enables the clock for I2C moudle.
1140 * @param instance module device instance
1142 static inline void CLOCK_SYS_EnableI2cClock(uint32_t instance)
1144 SIM_HAL_EnableI2cClock(g_simBaseAddr[0], instance);
1148 * @brief Disable the clock for I2C module.
1150 * This function disables the clock for I2C moudle.
1151 * @param instance module device instance
1153 static inline void CLOCK_SYS_DisableI2cClock(uint32_t instance)
1155 SIM_HAL_DisableI2cClock(g_simBaseAddr[0], instance);
1159 * @brief Get the the clock gate state for I2C module.
1161 * This function will get the clock gate state for I2C moudle.
1162 * @param instance module device instance
1163 * @return state true - ungated(Enabled), false - gated (Disabled)
1165 static inline bool CLOCK_SYS_GetI2cGateCmd(uint32_t instance)
1167 return SIM_HAL_GetI2cGateCmd(g_simBaseAddr[0], instance);
1171 * @brief Enable the clock for UART module.
1173 * This function enables the clock for UART moudle.
1174 * @param instance module device instance
1176 static inline void CLOCK_SYS_EnableUartClock(uint32_t instance)
1178 SIM_HAL_EnableUartClock(g_simBaseAddr[0], instance);
1182 * @brief Disable the clock for UART module.
1184 * This function disables the clock for UART moudle.
1185 * @param instance module device instance
1187 static inline void CLOCK_SYS_DisableUartClock(uint32_t instance)
1189 SIM_HAL_DisableUartClock(g_simBaseAddr[0], instance);
1193 * @brief Get the the clock gate state for UART module.
1195 * This function will get the clock gate state for UART moudle.
1196 * @param instance module device instance
1197 * @return state true - ungated(Enabled), false - gated (Disabled)
1199 static inline bool CLOCK_SYS_GetUartGateCmd(uint32_t instance)
1201 return SIM_HAL_GetUartGateCmd(g_simBaseAddr[0], instance);
1205 * @brief Enable the clock for SDHC module.
1207 * This function enables the clock for SDHC moudle.
1208 * @param instance module device instance
1210 static inline void CLOCK_SYS_EnableSdhcClock(uint32_t instance)
1212 SIM_HAL_EnableSdhcClock(g_simBaseAddr[0], instance);
1216 * @brief Disable the clock for SDHC module.
1218 * This function disables the clock for SDHC moudle.
1219 * @param instance module device instance
1221 static inline void CLOCK_SYS_DisableSdhcClock(uint32_t instance)
1223 SIM_HAL_DisableSdhcClock(g_simBaseAddr[0], instance);
1227 * @brief Get the the clock gate state for SDHC module.
1229 * This function will get the clock gate state for SDHC moudle.
1230 * @param instance module device instance
1231 * @return state true - ungated(Enabled), false - gated (Disabled)
1233 static inline bool CLOCK_SYS_GetSdhcGateCmd(uint32_t instance)
1235 return SIM_HAL_GetSdhcGateCmd(g_simBaseAddr[0], instance);
1238 #if defined(__cplusplus)
1240 #endif /* __cplusplus*/
1244 #endif /* __FSL_CLOCK_K64F12_H__ */
1245 /*******************************************************************************
1247 ******************************************************************************/