]>
git.gir.st - tmk_keyboard.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K22F/MK22F51212/fsl_clock_K22F51212.h
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_K22F51212_H__)
32 #define __FSL_CLOCK_K22F51212__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 EWM module.
82 * This function gets the clock frequence for EWM moudle.
83 * @param instance module device instance
84 * @return freq clock frequence for this module
86 uint32_t CLOCK_SYS_GetEwmFreq(uint32_t instance
);
89 * @brief Gets the clock frequency for FLEXBUS module.
91 * This function gets the clock frequence for FLEXBUS moudle.
92 * @param instance module device instance
93 * @return freq clock frequence for this module
95 uint32_t CLOCK_SYS_GetFlexbusFreq(uint32_t instance
);
98 * @brief Gets the clock frequency for FTF module. (Flash Memory)
100 * This function gets the clock frequence for FTF module. (Flash Memory)
101 * @param instance module device instance
102 * @return freq clock frequence for this module
104 uint32_t CLOCK_SYS_GetFtfFreq(uint32_t instance
);
107 * @brief Gets the clock frequency for CRC module.
109 * This function gets the clock frequence for CRC module.
110 * @param instance module device instance
111 * @return freq clock frequence for this module
113 uint32_t CLOCK_SYS_GetCrcFreq(uint32_t instance
);
116 * @brief Gets the clock frequency for RNGA module.
118 * This function gets the clock frequence for RNGA module.
119 * @param instance module device instance
120 * @return freq clock frequence for this module
122 uint32_t CLOCK_SYS_GetRngaFreq(uint32_t instance
);
125 * @brief Gets the clock frequency for ADC module.
127 * This function gets the clock frequence for ADC module.
128 * @param instance module device instance
129 * @return freq clock frequence for this module
131 uint32_t CLOCK_SYS_GetAdcFreq(uint32_t instance
);
134 * @brief Gets the clock frequency for CMP module.
136 * This function gets the clock frequence for CMP module.
137 * @param instance module device instance
138 * @return freq clock frequence for this module
140 uint32_t CLOCK_SYS_GetCmpFreq(uint32_t instance
);
143 * @brief Gets the clock frequency for VREF module.
145 * This function gets the clock frequence for VREF module.
146 * @param instance module device instance
147 * @return freq clock frequence for this module
149 uint32_t CLOCK_SYS_GetVrefFreq(uint32_t instance
);
152 * @brief Gets the clock frequency for PDB module.
154 * This function gets the clock frequence for PDB module.
155 * @param instance module device instance
156 * @return freq clock frequence for this module
158 uint32_t CLOCK_SYS_GetPdbFreq(uint32_t instance
);
161 * @brief Gets the clock frequency for FTM module. (FlexTimer)
163 * This function gets the clock frequence for FTM module.
164 * @param instance module device instance
165 * @return freq clock frequence for this module
167 uint32_t CLOCK_SYS_GetFtmFreq(uint32_t instance
);
170 * @brief Gets the clock frequency for PIT module.
172 * This function gets the clock frequence for PIT module.
173 * @param instance module device instance
174 * @return freq clock frequence for this module
176 uint32_t CLOCK_SYS_GetPitFreq(uint32_t instance
);
179 * @brief Gets the clock frequency for USB FS OTG module
181 * This function gets the clock frequence for USB FS OTG module.
182 * @param instance module device instance
183 * @return freq clock frequence for this module
185 uint32_t CLOCK_SYS_GetUsbFreq(uint32_t instance
);
188 * @brief Gets the clock frequency for SPI module
190 * This function gets the clock frequence for SPI module.
191 * @param instance module device instance
192 * @return freq clock frequence for this module
194 uint32_t CLOCK_SYS_GetSpiFreq(uint32_t instance
);
197 * @brief Gets the clock frequency for I2C module
199 * This function gets the clock frequence for I2C module.
200 * @param instance module device instance
201 * @return freq clock frequence for this module
203 uint32_t CLOCK_SYS_GetI2cFreq(uint32_t instance
);
206 * @brief Gets the clock frequency for UART module
208 * This function gets the clock frequence for UART module.
209 * @param instance module device instance
210 * @return freq clock frequence for this module
212 uint32_t CLOCK_SYS_GetUartFreq(uint32_t instance
);
215 * @brief Gets the clock frequency for LPUART module
217 * This function gets the clock frequence for LPUART module.
218 * @param instance module device instance
219 * @return freq clock frequence for this module
221 uint32_t CLOCK_SYS_GetLpuartFreq(uint32_t instance
);
224 * @brief Gets the clock frequency for I2S module.
226 * This function gets the clock frequence for I2S module.
227 * @param instance module device instance
228 * @return freq clock frequence for this module
230 uint32_t CLOCK_SYS_GetSaiFreq(uint32_t instance
);
233 * @brief Gets the clock frequency for GPIO module
235 * This function gets the clock frequence for GPIO module.
236 * @param instance module device instance
237 * @return freq clock frequence for this module
239 uint32_t CLOCK_SYS_GetGpioFreq(uint32_t instance
);
242 * @brief Enable the clock for DMA module.
244 * This function enables the clock for DMA moudle.
245 * @param instance module device instance
247 static inline void CLOCK_SYS_EnableDmaClock(uint32_t instance
)
249 SIM_HAL_EnableDmaClock(g_simBaseAddr
[0], instance
);
253 * @brief Disable the clock for DMA module.
255 * This function disables the clock for DMA moudle.
256 * @param instance module device instance
258 static inline void CLOCK_SYS_DisableDmaClock(uint32_t instance
)
260 SIM_HAL_DisableDmaClock(g_simBaseAddr
[0], instance
);
264 * @brief Get the the clock gate state for DMA module.
266 * This function will get the clock gate state for DMA moudle.
267 * @param instance module device instance
268 * @return state true - ungated(Enabled), false - gated (Disabled)
270 static inline bool CLOCK_SYS_GetDmaGateCmd(uint32_t instance
)
272 return SIM_HAL_GetDmaGateCmd(g_simBaseAddr
[0], instance
);
276 * @brief Enable the clock for DMAMUX module.
278 * This function enables the clock for DMAMUX moudle.
279 * @param instance module device instance
281 static inline void CLOCK_SYS_EnableDmamuxClock(uint32_t instance
)
283 SIM_HAL_EnableDmamuxClock(g_simBaseAddr
[0], instance
);
287 * @brief Disable the clock for DMAMUX module.
289 * This function disables the clock for DMAMUX moudle.
290 * @param instance module device instance
292 static inline void CLOCK_SYS_DisableDmamuxClock(uint32_t instance
)
294 SIM_HAL_DisableDmamuxClock(g_simBaseAddr
[0], instance
);
298 * @brief Get the the clock gate state for DMAMUX module.
300 * This function will get the clock gate state for DMAMUX moudle.
301 * @param instance module device instance
302 * @return state true - ungated(Enabled), false - gated (Disabled)
304 static inline bool CLOCK_SYS_GetDmamuxGateCmd(uint32_t instance
)
306 return SIM_HAL_GetDmamuxGateCmd(g_simBaseAddr
[0], instance
);
310 * @brief Enable the clock for PORT module.
312 * This function enables the clock for PORT moudle.
313 * @param instance module device instance
315 static inline void CLOCK_SYS_EnablePortClock(uint32_t instance
)
317 SIM_HAL_EnablePortClock(g_simBaseAddr
[0], instance
);
321 * @brief Disable the clock for PORT module.
323 * This function disables the clock for PORT moudle.
324 * @param instance module device instance
326 static inline void CLOCK_SYS_DisablePortClock(uint32_t instance
)
328 SIM_HAL_DisablePortClock(g_simBaseAddr
[0], instance
);
332 * @brief Get the the clock gate state for PORT module.
334 * This function will get the clock gate state for PORT moudle.
335 * @param instance module device instance
336 * @return state true - ungated(Enabled), false - gated (Disabled)
338 static inline bool CLOCK_SYS_GetPortGateCmd(uint32_t instance
)
340 return SIM_HAL_GetPortGateCmd(g_simBaseAddr
[0], instance
);
344 * @brief Enable the clock for EWM module.
346 * This function enables the clock for EWM moudle.
347 * @param instance module device instance
349 static inline void CLOCK_SYS_EnableEwmClock(uint32_t instance
)
351 SIM_HAL_EnableEwmClock(g_simBaseAddr
[0], instance
);
355 * @brief Disable the clock for EWM module.
357 * This function disables the clock for EWM moudle.
358 * @param instance module device instance
360 static inline void CLOCK_SYS_DisableEwmClock(uint32_t instance
)
362 SIM_HAL_DisableEwmClock(g_simBaseAddr
[0], instance
);
366 * @brief Get the the clock gate state for EWM module.
368 * This function will get the clock gate state for EWM moudle.
369 * @param instance module device instance
370 * @return state true - ungated(Enabled), false - gated (Disabled)
372 static inline bool CLOCK_SYS_GetEwmGateCmd(uint32_t instance
)
374 return SIM_HAL_GetEwmGateCmd(g_simBaseAddr
[0], instance
);
378 * @brief Enable the clock for FLEXBUS module.
380 * This function enables the clock for FLEXBUS moudle.
381 * @param instance module device instance
383 static inline void CLOCK_SYS_EnableFlexbusClock(uint32_t instance
)
385 SIM_HAL_EnableFlexbusClock(g_simBaseAddr
[0], instance
);
389 * @brief Disable the clock for FLEXBUS module.
391 * This function disables the clock for FLEXBUS moudle.
392 * @param instance module device instance
394 static inline void CLOCK_SYS_DisableFlexbusClock(uint32_t instance
)
396 SIM_HAL_DisableFlexbusClock(g_simBaseAddr
[0], instance
);
400 * @brief Get the the clock gate state for FLEXBUS module.
402 * This function will get the clock gate state for FLEXBUS moudle.
403 * @param instance module device instance
404 * @return state true - ungated(Enabled), false - gated (Disabled)
406 static inline bool CLOCK_SYS_GetFlexbusGateCmd(uint32_t instance
)
408 return SIM_HAL_GetFlexbusGateCmd(g_simBaseAddr
[0], instance
);
412 * @brief Enable the clock for FTF module.
414 * This function enables the clock for FTF moudle.
415 * @param instance module device instance
417 static inline void CLOCK_SYS_EnableFtfClock(uint32_t instance
)
419 SIM_HAL_EnableFtfClock(g_simBaseAddr
[0], instance
);
423 * @brief Disable the clock for FTF module.
425 * This function disables the clock for FTF moudle.
426 * @param instance module device instance
428 static inline void CLOCK_SYS_DisableFtfClock(uint32_t instance
)
430 SIM_HAL_DisableFtfClock(g_simBaseAddr
[0], instance
);
434 * @brief Get the the clock gate state for FTF module.
436 * This function will get the clock gate state for FTF moudle.
437 * @param instance module device instance
438 * @return state true - ungated(Enabled), false - gated (Disabled)
440 static inline bool CLOCK_SYS_GetFtfGateCmd(uint32_t instance
)
442 return SIM_HAL_GetFtfGateCmd(g_simBaseAddr
[0], instance
);
446 * @brief Enable the clock for CRC module.
448 * This function enables the clock for CRC moudle.
449 * @param instance module device instance
451 static inline void CLOCK_SYS_EnableCrcClock(uint32_t instance
)
453 SIM_HAL_EnableCrcClock(g_simBaseAddr
[0], instance
);
457 * @brief Disable the clock for CRC module.
459 * This function disables the clock for CRC moudle.
460 * @param instance module device instance
462 static inline void CLOCK_SYS_DisableCrcClock(uint32_t instance
)
464 SIM_HAL_DisableCrcClock(g_simBaseAddr
[0], instance
);
468 * @brief Get the the clock gate state for CRC module.
470 * This function will get the clock gate state for CRC moudle.
471 * @param instance module device instance
472 * @return state true - ungated(Enabled), false - gated (Disabled)
474 static inline bool CLOCK_SYS_GetCrcGateCmd(uint32_t instance
)
476 return SIM_HAL_GetCrcGateCmd(g_simBaseAddr
[0], instance
);
480 * @brief Enable the clock for RNGA module.
482 * This function enables the clock for RNGA moudle.
483 * @param instance module device instance
485 static inline void CLOCK_SYS_EnableRngaClock(uint32_t instance
)
487 SIM_HAL_EnableRngaClock(g_simBaseAddr
[0], instance
);
491 * @brief Disable the clock for RNGA module.
493 * This function disables the clock for RNGA moudle.
494 * @param instance module device instance
496 static inline void CLOCK_SYS_DisableRngaClock(uint32_t instance
)
498 SIM_HAL_DisableRngaClock(g_simBaseAddr
[0], instance
);
502 * @brief Get the the clock gate state for RNGA module.
504 * This function will get the clock gate state for RNGA moudle.
505 * @param instance module device instance
506 * @return state true - ungated(Enabled), false - gated (Disabled)
508 static inline bool CLOCK_SYS_GetRngaGateCmd(uint32_t instance
)
510 return SIM_HAL_GetRngaGateCmd(g_simBaseAddr
[0], instance
);
514 * @brief Enable the clock for ADC module.
516 * This function enables the clock for ADC moudle.
517 * @param instance module device instance
519 static inline void CLOCK_SYS_EnableAdcClock(uint32_t instance
)
521 SIM_HAL_EnableAdcClock(g_simBaseAddr
[0], instance
);
525 * @brief Disable the clock for ADC module.
527 * This function disables the clock for ADC moudle.
528 * @param instance module device instance
530 static inline void CLOCK_SYS_DisableAdcClock(uint32_t instance
)
532 SIM_HAL_DisableAdcClock(g_simBaseAddr
[0], instance
);
536 * @brief Get the the clock gate state for ADC module.
538 * This function will get the clock gate state for ADC moudle.
539 * @param instance module device instance
540 * @return state true - ungated(Enabled), false - gated (Disabled)
542 static inline bool CLOCK_SYS_GetAdcGateCmd(uint32_t instance
)
544 return SIM_HAL_GetAdcGateCmd(g_simBaseAddr
[0], instance
);
548 * @brief Enable the clock for CMP module.
550 * This function enables the clock for CMP moudle.
551 * @param instance module device instance
553 static inline void CLOCK_SYS_EnableCmpClock(uint32_t instance
)
555 SIM_HAL_EnableCmpClock(g_simBaseAddr
[0], instance
);
559 * @brief Disable the clock for CMP module.
561 * This function disables the clock for CMP moudle.
562 * @param instance module device instance
564 static inline void CLOCK_SYS_DisableCmpClock(uint32_t instance
)
566 SIM_HAL_DisableCmpClock(g_simBaseAddr
[0], instance
);
570 * @brief Get the the clock gate state for CMP module.
572 * This function will get the clock gate state for CMP moudle.
573 * @param instance module device instance
574 * @return state true - ungated(Enabled), false - gated (Disabled)
576 static inline bool CLOCK_SYS_GetCmpGateCmd(uint32_t instance
)
578 return SIM_HAL_GetCmpGateCmd(g_simBaseAddr
[0], instance
);
582 * @brief Enable the clock for DAC module.
584 * This function enables the clock for DAC moudle.
585 * @param instance module device instance
587 static inline void CLOCK_SYS_EnableDacClock(uint32_t instance
)
589 SIM_HAL_EnableDacClock(g_simBaseAddr
[0], instance
);
593 * @brief Disable the clock for DAC module.
595 * This function disables the clock for DAC moudle.
596 * @param instance module device instance
598 static inline void CLOCK_SYS_DisableDacClock(uint32_t instance
)
600 SIM_HAL_DisableDacClock(g_simBaseAddr
[0], instance
);
604 * @brief Get the the clock gate state for DAC module.
606 * This function will get the clock gate state for DAC moudle.
607 * @param instance module device instance
608 * @return state true - ungated(Enabled), false - gated (Disabled)
610 static inline bool CLOCK_SYS_GetDacGateCmd(uint32_t instance
)
612 return SIM_HAL_GetDacGateCmd(g_simBaseAddr
[0], instance
);
616 * @brief Enable the clock for VREF module.
618 * This function enables the clock for VREF moudle.
619 * @param instance module device instance
621 static inline void CLOCK_SYS_EnableVrefClock(uint32_t instance
)
623 SIM_HAL_EnableVrefClock(g_simBaseAddr
[0], instance
);
627 * @brief Disable the clock for VREF module.
629 * This function disables the clock for VREF moudle.
630 * @param instance module device instance
632 static inline void CLOCK_SYS_DisableVrefClock(uint32_t instance
)
634 SIM_HAL_DisableVrefClock(g_simBaseAddr
[0], instance
);
638 * @brief Get the the clock gate state for VREF module.
640 * This function will get the clock gate state for VREF moudle.
641 * @param instance module device instance
642 * @return state true - ungated(Enabled), false - gated (Disabled)
644 static inline bool CLOCK_SYS_GetVrefGateCmd(uint32_t instance
)
646 return SIM_HAL_GetVrefGateCmd(g_simBaseAddr
[0], instance
);
650 * @brief Enable the clock for SAI module.
652 * This function enables the clock for SAI moudle.
653 * @param instance module device instance
655 static inline void CLOCK_SYS_EnableSaiClock(uint32_t instance
)
657 SIM_HAL_EnableSaiClock(g_simBaseAddr
[0], instance
);
661 * @brief Disable the clock for SAI module.
663 * This function disables the clock for SAI moudle.
664 * @param instance module device instance
666 static inline void CLOCK_SYS_DisableSaiClock(uint32_t instance
)
668 SIM_HAL_DisableSaiClock(g_simBaseAddr
[0], instance
);
672 * @brief Get the the clock gate state for SAI module.
674 * This function will get the clock gate state for SAI moudle.
675 * @param instance module device instance
676 * @return state true - ungated(Enabled), false - gated (Disabled)
678 static inline bool CLOCK_SYS_GetSaiGateCmd(uint32_t instance
)
680 return SIM_HAL_GetSaiGateCmd(g_simBaseAddr
[0], instance
);
684 * @brief Enable the clock for PDB module.
686 * This function enables the clock for PDB moudle.
687 * @param instance module device instance
689 static inline void CLOCK_SYS_EnablePdbClock(uint32_t instance
)
691 SIM_HAL_EnablePdbClock(g_simBaseAddr
[0], instance
);
695 * @brief Disable the clock for PDB module.
697 * This function disables the clock for PDB moudle.
698 * @param instance module device instance
700 static inline void CLOCK_SYS_DisablePdbClock(uint32_t instance
)
702 SIM_HAL_DisablePdbClock(g_simBaseAddr
[0], instance
);
706 * @brief Get the the clock gate state for PDB module.
708 * This function will get the clock gate state for PDB moudle.
709 * @param instance module device instance
710 * @return state true - ungated(Enabled), false - gated (Disabled)
712 static inline bool CLOCK_SYS_GetPdbGateCmd(uint32_t instance
)
714 return SIM_HAL_GetPdbGateCmd(g_simBaseAddr
[0], instance
);
718 * @brief Enable the clock for FTM module.
720 * This function enables the clock for FTM moudle.
721 * @param instance module device instance
723 static inline void CLOCK_SYS_EnableFtmClock(uint32_t instance
)
725 SIM_HAL_EnableFtmClock(g_simBaseAddr
[0], instance
);
729 * @brief Disable the clock for FTM module.
731 * This function disables the clock for FTM moudle.
732 * @param instance module device instance
734 static inline void CLOCK_SYS_DisableFtmClock(uint32_t instance
)
736 SIM_HAL_DisableFtmClock(g_simBaseAddr
[0], instance
);
740 * @brief Get the the clock gate state for FTM module.
742 * This function will get the clock gate state for FTM moudle.
743 * @param instance module device instance
744 * @return state true - ungated(Enabled), false - gated (Disabled)
746 static inline bool CLOCK_SYS_GetFtmGateCmd(uint32_t instance
)
748 return SIM_HAL_GetFtmGateCmd(g_simBaseAddr
[0], instance
);
752 * @brief Enable the clock for PIT module.
754 * This function enables the clock for PIT moudle.
755 * @param instance module device instance
757 static inline void CLOCK_SYS_EnablePitClock(uint32_t instance
)
759 SIM_HAL_EnablePitClock(g_simBaseAddr
[0], instance
);
763 * @brief Disable the clock for PIT module.
765 * This function disables the clock for PIT moudle.
766 * @param instance module device instance
768 static inline void CLOCK_SYS_DisablePitClock(uint32_t instance
)
770 SIM_HAL_DisablePitClock(g_simBaseAddr
[0], instance
);
774 * @brief Get the the clock gate state for PIT module.
776 * This function will get the clock gate state for PIT moudle.
777 * @param instance module device instance
778 * @return state true - ungated(Enabled), false - gated (Disabled)
780 static inline bool CLOCK_SYS_GetPitGateCmd(uint32_t instance
)
782 return SIM_HAL_GetPitGateCmd(g_simBaseAddr
[0], instance
);
786 * @brief Enable the clock for LPTIMER module.
788 * This function enables the clock for LPTIMER moudle.
789 * @param instance module device instance
791 static inline void CLOCK_SYS_EnableLptimerClock(uint32_t instance
)
793 SIM_HAL_EnableLptimerClock(g_simBaseAddr
[0], instance
);
797 * @brief Disable the clock for LPTIMER module.
799 * This function disables the clock for LPTIMER moudle.
800 * @param instance module device instance
802 static inline void CLOCK_SYS_DisableLptimerClock(uint32_t instance
)
804 SIM_HAL_DisableLptimerClock(g_simBaseAddr
[0], instance
);
808 * @brief Get the the clock gate state for LPTIMER module.
810 * This function will get the clock gate state for LPTIMER moudle.
811 * @param instance module device instance
812 * @return state true - ungated(Enabled), false - gated (Disabled)
814 static inline bool CLOCK_SYS_GetLptimerGateCmd(uint32_t instance
)
816 return SIM_HAL_GetLptimerGateCmd(g_simBaseAddr
[0], instance
);
820 * @brief Enable the clock for RTC module.
822 * This function enables the clock for RTC moudle.
823 * @param instance module device instance
825 static inline void CLOCK_SYS_EnableRtcClock(uint32_t instance
)
827 SIM_HAL_EnableRtcClock(g_simBaseAddr
[0], instance
);
831 * @brief Disable the clock for RTC module.
833 * This function disables the clock for RTC moudle.
834 * @param instance module device instance
836 static inline void CLOCK_SYS_DisableRtcClock(uint32_t instance
)
838 SIM_HAL_DisableRtcClock(g_simBaseAddr
[0], instance
);
842 * @brief Get the the clock gate state for RTC module.
844 * This function will get the clock gate state for RTC moudle.
845 * @param instance module device instance
846 * @return state true - ungated(Enabled), false - gated (Disabled)
848 static inline bool CLOCK_SYS_GetRtcGateCmd(uint32_t instance
)
850 return SIM_HAL_GetRtcGateCmd(g_simBaseAddr
[0], instance
);
854 * @brief Enable the clock for USBFS module.
856 * This function enables the clock for USBFS moudle.
857 * @param instance module device instance
859 static inline void CLOCK_SYS_EnableUsbClock(uint32_t instance
)
861 SIM_HAL_EnableUsbClock(g_simBaseAddr
[0], instance
);
865 * @brief Disable the clock for USBFS module.
867 * This function disables the clock for USBFS moudle.
868 * @param instance module device instance
870 static inline void CLOCK_SYS_DisableUsbClock(uint32_t instance
)
872 SIM_HAL_DisableUsbClock(g_simBaseAddr
[0], instance
);
876 * @brief Get the the clock gate state for USB module.
878 * This function will get the clock gate state for USB moudle.
879 * @param instance module device instance
880 * @return state true - ungated(Enabled), false - gated (Disabled)
882 static inline bool CLOCK_SYS_GetUsbGateCmd(uint32_t instance
)
884 return SIM_HAL_GetUsbGateCmd(g_simBaseAddr
[0], instance
);
888 * @brief Enable the clock for SPI module.
890 * This function enables the clock for SPI moudle.
891 * @param instance module device instance
893 static inline void CLOCK_SYS_EnableSpiClock(uint32_t instance
)
895 SIM_HAL_EnableSpiClock(g_simBaseAddr
[0], instance
);
899 * @brief Disable the clock for SPI module.
901 * This function disables the clock for SPI moudle.
902 * @param instance module device instance
904 static inline void CLOCK_SYS_DisableSpiClock(uint32_t instance
)
906 SIM_HAL_DisableSpiClock(g_simBaseAddr
[0], instance
);
910 * @brief Get the the clock gate state for SPI module.
912 * This function will get the clock gate state for SPI moudle.
913 * @param instance module device instance
914 * @return state true - ungated(Enabled), false - gated (Disabled)
916 static inline bool CLOCK_SYS_GetSpiGateCmd(uint32_t instance
)
918 return SIM_HAL_GetSpiGateCmd(g_simBaseAddr
[0], instance
);
922 * @brief Enable the clock for I2C module.
924 * This function enables the clock for I2C moudle.
925 * @param instance module device instance
927 static inline void CLOCK_SYS_EnableI2cClock(uint32_t instance
)
929 SIM_HAL_EnableI2cClock(g_simBaseAddr
[0], instance
);
933 * @brief Disable the clock for I2C module.
935 * This function disables the clock for I2C moudle.
936 * @param instance module device instance
938 static inline void CLOCK_SYS_DisableI2cClock(uint32_t instance
)
940 SIM_HAL_DisableI2cClock(g_simBaseAddr
[0], instance
);
944 * @brief Get the the clock gate state for I2C module.
946 * This function will get the clock gate state for I2C moudle.
947 * @param instance module device instance
948 * @return state true - ungated(Enabled), false - gated (Disabled)
950 static inline bool CLOCK_SYS_GetI2cGateCmd(uint32_t instance
)
952 return SIM_HAL_GetI2cGateCmd(g_simBaseAddr
[0], instance
);
956 * @brief Enable the clock for UART module.
958 * This function enables the clock for UART moudle.
959 * @param instance module device instance
961 static inline void CLOCK_SYS_EnableUartClock(uint32_t instance
)
963 SIM_HAL_EnableUartClock(g_simBaseAddr
[0], instance
);
967 * @brief Disable the clock for UART module.
969 * This function disables the clock for UART moudle.
970 * @param instance module device instance
972 static inline void CLOCK_SYS_DisableUartClock(uint32_t instance
)
974 SIM_HAL_DisableUartClock(g_simBaseAddr
[0], instance
);
978 * @brief Get the the clock gate state for UART module.
980 * This function will get the clock gate state for UART moudle.
981 * @param instance module device instance
982 * @return state true - ungated(Enabled), false - gated (Disabled)
984 static inline bool CLOCK_SYS_GetUartGateCmd(uint32_t instance
)
986 return SIM_HAL_GetUartGateCmd(g_simBaseAddr
[0], instance
);
990 * @brief Enable the clock for LPUART module.
992 * This function enables the clock for LPUART moudle.
993 * @param instance module device instance
995 static inline void CLOCK_SYS_EnableLpuartClock(uint32_t instance
)
997 SIM_HAL_EnableLpuartClock(g_simBaseAddr
[0], instance
);
1001 * @brief Disable the clock for LPUART module.
1003 * This function disables the clock for LPUART moudle.
1004 * @param instance module device instance
1006 static inline void CLOCK_SYS_DisableLpuartClock(uint32_t instance
)
1008 SIM_HAL_DisableLpuartClock(g_simBaseAddr
[0], instance
);
1012 * @brief Get the the clock gate state for LPUART module.
1014 * This function will get the clock gate state for LPUART moudle.
1015 * @param instance module device instance
1016 * @return state true - ungated(Enabled), false - gated (Disabled)
1018 static inline bool CLOCK_SYS_GetLpuartGateCmd(uint32_t instance
)
1020 return SIM_HAL_GetLpuartGateCmd(g_simBaseAddr
[0], instance
);
1023 #if defined(__cplusplus)
1025 #endif /* __cplusplus*/
1029 #endif /* __FSL_CLOCK_K22F51212_H__ */
1030 /*******************************************************************************
1032 ******************************************************************************/