]> 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
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[tmk_keyboard.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / hal / TARGET_Freescale / TARGET_KPSDK_MCUS / TARGET_K22F / MK22F51212 / fsl_clock_K22F51212.h
1 /*
2 * Copyright (c) 2013 - 2014, Freescale Semiconductor, Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without modification,
6 * are permitted provided that the following conditions are met:
7 *
8 * o Redistributions of source code must retain the above copyright notice, this list
9 * of conditions and the following disclaimer.
10 *
11 * o Redistributions in binary form must reproduce the above copyright notice, this
12 * list of conditions and the following disclaimer in the documentation and/or
13 * other materials provided with the distribution.
14 *
15 * o Neither the name of Freescale Semiconductor, Inc. nor the names of its
16 * contributors may be used to endorse or promote products derived from this
17 * software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
23 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 #if !defined(__FSL_CLOCK_K22F51212_H__)
32 #define __FSL_CLOCK_K22F51212__H__
33
34 /*! @addtogroup clock_manager*/
35 /*! @{*/
36
37 /*! @file*/
38
39 /*******************************************************************************
40 * Definitions
41 ******************************************************************************/
42
43
44 /*******************************************************************************
45 * API
46 ******************************************************************************/
47
48 #if defined(__cplusplus)
49 extern "C" {
50 #endif /* __cplusplus*/
51
52 /*!
53 * @brief Gets the clock frequency for DMA module.
54 *
55 * This function gets the clock frequence for DMA moudle.
56 * @param instance module device instance
57 * @return freq clock frequence for this module
58 */
59 uint32_t CLOCK_SYS_GetDmaFreq(uint32_t instance);
60
61 /*!
62 * @brief Gets the clock frequency for DMAMUX module.
63 *
64 * This function gets the clock frequence for DMAMUX moudle.
65 * @param instance module device instance
66 * @return freq clock frequence for this module
67 */
68 uint32_t CLOCK_SYS_GetDmamuxFreq(uint32_t instance);
69
70 /*!
71 * @brief Gets the clock frequency for PORT module.
72 *
73 * This function gets the clock frequence for PORT moudle.
74 * @param instance module device instance
75 * @return freq clock frequence for this module
76 */
77 uint32_t CLOCK_SYS_GetPortFreq(uint32_t instance);
78
79 /*!
80 * @brief Gets the clock frequency for EWM module.
81 *
82 * This function gets the clock frequence for EWM moudle.
83 * @param instance module device instance
84 * @return freq clock frequence for this module
85 */
86 uint32_t CLOCK_SYS_GetEwmFreq(uint32_t instance);
87
88 /*!
89 * @brief Gets the clock frequency for FLEXBUS module.
90 *
91 * This function gets the clock frequence for FLEXBUS moudle.
92 * @param instance module device instance
93 * @return freq clock frequence for this module
94 */
95 uint32_t CLOCK_SYS_GetFlexbusFreq(uint32_t instance);
96
97 /*!
98 * @brief Gets the clock frequency for FTF module. (Flash Memory)
99 *
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
103 */
104 uint32_t CLOCK_SYS_GetFtfFreq(uint32_t instance);
105
106 /*!
107 * @brief Gets the clock frequency for CRC module.
108 *
109 * This function gets the clock frequence for CRC module.
110 * @param instance module device instance
111 * @return freq clock frequence for this module
112 */
113 uint32_t CLOCK_SYS_GetCrcFreq(uint32_t instance);
114
115 /*!
116 * @brief Gets the clock frequency for RNGA module.
117 *
118 * This function gets the clock frequence for RNGA module.
119 * @param instance module device instance
120 * @return freq clock frequence for this module
121 */
122 uint32_t CLOCK_SYS_GetRngaFreq(uint32_t instance);
123
124 /*!
125 * @brief Gets the clock frequency for ADC module.
126 *
127 * This function gets the clock frequence for ADC module.
128 * @param instance module device instance
129 * @return freq clock frequence for this module
130 */
131 uint32_t CLOCK_SYS_GetAdcFreq(uint32_t instance);
132
133 /*!
134 * @brief Gets the clock frequency for CMP module.
135 *
136 * This function gets the clock frequence for CMP module.
137 * @param instance module device instance
138 * @return freq clock frequence for this module
139 */
140 uint32_t CLOCK_SYS_GetCmpFreq(uint32_t instance);
141
142 /*!
143 * @brief Gets the clock frequency for VREF module.
144 *
145 * This function gets the clock frequence for VREF module.
146 * @param instance module device instance
147 * @return freq clock frequence for this module
148 */
149 uint32_t CLOCK_SYS_GetVrefFreq(uint32_t instance);
150
151 /*!
152 * @brief Gets the clock frequency for PDB module.
153 *
154 * This function gets the clock frequence for PDB module.
155 * @param instance module device instance
156 * @return freq clock frequence for this module
157 */
158 uint32_t CLOCK_SYS_GetPdbFreq(uint32_t instance);
159
160 /*!
161 * @brief Gets the clock frequency for FTM module. (FlexTimer)
162 *
163 * This function gets the clock frequence for FTM module.
164 * @param instance module device instance
165 * @return freq clock frequence for this module
166 */
167 uint32_t CLOCK_SYS_GetFtmFreq(uint32_t instance);
168
169 /*!
170 * @brief Gets the clock frequency for PIT module.
171 *
172 * This function gets the clock frequence for PIT module.
173 * @param instance module device instance
174 * @return freq clock frequence for this module
175 */
176 uint32_t CLOCK_SYS_GetPitFreq(uint32_t instance);
177
178 /*!
179 * @brief Gets the clock frequency for USB FS OTG module
180 *
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
184 */
185 uint32_t CLOCK_SYS_GetUsbFreq(uint32_t instance);
186
187 /*!
188 * @brief Gets the clock frequency for SPI module
189 *
190 * This function gets the clock frequence for SPI module.
191 * @param instance module device instance
192 * @return freq clock frequence for this module
193 */
194 uint32_t CLOCK_SYS_GetSpiFreq(uint32_t instance);
195
196 /*!
197 * @brief Gets the clock frequency for I2C module
198 *
199 * This function gets the clock frequence for I2C module.
200 * @param instance module device instance
201 * @return freq clock frequence for this module
202 */
203 uint32_t CLOCK_SYS_GetI2cFreq(uint32_t instance);
204
205 /*!
206 * @brief Gets the clock frequency for UART module
207 *
208 * This function gets the clock frequence for UART module.
209 * @param instance module device instance
210 * @return freq clock frequence for this module
211 */
212 uint32_t CLOCK_SYS_GetUartFreq(uint32_t instance);
213
214 /*!
215 * @brief Gets the clock frequency for LPUART module
216 *
217 * This function gets the clock frequence for LPUART module.
218 * @param instance module device instance
219 * @return freq clock frequence for this module
220 */
221 uint32_t CLOCK_SYS_GetLpuartFreq(uint32_t instance);
222
223 /*!
224 * @brief Gets the clock frequency for I2S module.
225 *
226 * This function gets the clock frequence for I2S module.
227 * @param instance module device instance
228 * @return freq clock frequence for this module
229 */
230 uint32_t CLOCK_SYS_GetSaiFreq(uint32_t instance);
231
232 /*!
233 * @brief Gets the clock frequency for GPIO module
234 *
235 * This function gets the clock frequence for GPIO module.
236 * @param instance module device instance
237 * @return freq clock frequence for this module
238 */
239 uint32_t CLOCK_SYS_GetGpioFreq(uint32_t instance);
240
241 /*!
242 * @brief Enable the clock for DMA module.
243 *
244 * This function enables the clock for DMA moudle.
245 * @param instance module device instance
246 */
247 static inline void CLOCK_SYS_EnableDmaClock(uint32_t instance)
248 {
249 SIM_HAL_EnableDmaClock(g_simBaseAddr[0], instance);
250 }
251
252 /*!
253 * @brief Disable the clock for DMA module.
254 *
255 * This function disables the clock for DMA moudle.
256 * @param instance module device instance
257 */
258 static inline void CLOCK_SYS_DisableDmaClock(uint32_t instance)
259 {
260 SIM_HAL_DisableDmaClock(g_simBaseAddr[0], instance);
261 }
262
263 /*!
264 * @brief Get the the clock gate state for DMA module.
265 *
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)
269 */
270 static inline bool CLOCK_SYS_GetDmaGateCmd(uint32_t instance)
271 {
272 return SIM_HAL_GetDmaGateCmd(g_simBaseAddr[0], instance);
273 }
274
275 /*!
276 * @brief Enable the clock for DMAMUX module.
277 *
278 * This function enables the clock for DMAMUX moudle.
279 * @param instance module device instance
280 */
281 static inline void CLOCK_SYS_EnableDmamuxClock(uint32_t instance)
282 {
283 SIM_HAL_EnableDmamuxClock(g_simBaseAddr[0], instance);
284 }
285
286 /*!
287 * @brief Disable the clock for DMAMUX module.
288 *
289 * This function disables the clock for DMAMUX moudle.
290 * @param instance module device instance
291 */
292 static inline void CLOCK_SYS_DisableDmamuxClock(uint32_t instance)
293 {
294 SIM_HAL_DisableDmamuxClock(g_simBaseAddr[0], instance);
295 }
296
297 /*!
298 * @brief Get the the clock gate state for DMAMUX module.
299 *
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)
303 */
304 static inline bool CLOCK_SYS_GetDmamuxGateCmd(uint32_t instance)
305 {
306 return SIM_HAL_GetDmamuxGateCmd(g_simBaseAddr[0], instance);
307 }
308
309 /*!
310 * @brief Enable the clock for PORT module.
311 *
312 * This function enables the clock for PORT moudle.
313 * @param instance module device instance
314 */
315 static inline void CLOCK_SYS_EnablePortClock(uint32_t instance)
316 {
317 SIM_HAL_EnablePortClock(g_simBaseAddr[0], instance);
318 }
319
320 /*!
321 * @brief Disable the clock for PORT module.
322 *
323 * This function disables the clock for PORT moudle.
324 * @param instance module device instance
325 */
326 static inline void CLOCK_SYS_DisablePortClock(uint32_t instance)
327 {
328 SIM_HAL_DisablePortClock(g_simBaseAddr[0], instance);
329 }
330
331 /*!
332 * @brief Get the the clock gate state for PORT module.
333 *
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)
337 */
338 static inline bool CLOCK_SYS_GetPortGateCmd(uint32_t instance)
339 {
340 return SIM_HAL_GetPortGateCmd(g_simBaseAddr[0], instance);
341 }
342
343 /*!
344 * @brief Enable the clock for EWM module.
345 *
346 * This function enables the clock for EWM moudle.
347 * @param instance module device instance
348 */
349 static inline void CLOCK_SYS_EnableEwmClock(uint32_t instance)
350 {
351 SIM_HAL_EnableEwmClock(g_simBaseAddr[0], instance);
352 }
353
354 /*!
355 * @brief Disable the clock for EWM module.
356 *
357 * This function disables the clock for EWM moudle.
358 * @param instance module device instance
359 */
360 static inline void CLOCK_SYS_DisableEwmClock(uint32_t instance)
361 {
362 SIM_HAL_DisableEwmClock(g_simBaseAddr[0], instance);
363 }
364
365 /*!
366 * @brief Get the the clock gate state for EWM module.
367 *
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)
371 */
372 static inline bool CLOCK_SYS_GetEwmGateCmd(uint32_t instance)
373 {
374 return SIM_HAL_GetEwmGateCmd(g_simBaseAddr[0], instance);
375 }
376
377 /*!
378 * @brief Enable the clock for FLEXBUS module.
379 *
380 * This function enables the clock for FLEXBUS moudle.
381 * @param instance module device instance
382 */
383 static inline void CLOCK_SYS_EnableFlexbusClock(uint32_t instance)
384 {
385 SIM_HAL_EnableFlexbusClock(g_simBaseAddr[0], instance);
386 }
387
388 /*!
389 * @brief Disable the clock for FLEXBUS module.
390 *
391 * This function disables the clock for FLEXBUS moudle.
392 * @param instance module device instance
393 */
394 static inline void CLOCK_SYS_DisableFlexbusClock(uint32_t instance)
395 {
396 SIM_HAL_DisableFlexbusClock(g_simBaseAddr[0], instance);
397 }
398
399 /*!
400 * @brief Get the the clock gate state for FLEXBUS module.
401 *
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)
405 */
406 static inline bool CLOCK_SYS_GetFlexbusGateCmd(uint32_t instance)
407 {
408 return SIM_HAL_GetFlexbusGateCmd(g_simBaseAddr[0], instance);
409 }
410
411 /*!
412 * @brief Enable the clock for FTF module.
413 *
414 * This function enables the clock for FTF moudle.
415 * @param instance module device instance
416 */
417 static inline void CLOCK_SYS_EnableFtfClock(uint32_t instance)
418 {
419 SIM_HAL_EnableFtfClock(g_simBaseAddr[0], instance);
420 }
421
422 /*!
423 * @brief Disable the clock for FTF module.
424 *
425 * This function disables the clock for FTF moudle.
426 * @param instance module device instance
427 */
428 static inline void CLOCK_SYS_DisableFtfClock(uint32_t instance)
429 {
430 SIM_HAL_DisableFtfClock(g_simBaseAddr[0], instance);
431 }
432
433 /*!
434 * @brief Get the the clock gate state for FTF module.
435 *
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)
439 */
440 static inline bool CLOCK_SYS_GetFtfGateCmd(uint32_t instance)
441 {
442 return SIM_HAL_GetFtfGateCmd(g_simBaseAddr[0], instance);
443 }
444
445 /*!
446 * @brief Enable the clock for CRC module.
447 *
448 * This function enables the clock for CRC moudle.
449 * @param instance module device instance
450 */
451 static inline void CLOCK_SYS_EnableCrcClock(uint32_t instance)
452 {
453 SIM_HAL_EnableCrcClock(g_simBaseAddr[0], instance);
454 }
455
456 /*!
457 * @brief Disable the clock for CRC module.
458 *
459 * This function disables the clock for CRC moudle.
460 * @param instance module device instance
461 */
462 static inline void CLOCK_SYS_DisableCrcClock(uint32_t instance)
463 {
464 SIM_HAL_DisableCrcClock(g_simBaseAddr[0], instance);
465 }
466
467 /*!
468 * @brief Get the the clock gate state for CRC module.
469 *
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)
473 */
474 static inline bool CLOCK_SYS_GetCrcGateCmd(uint32_t instance)
475 {
476 return SIM_HAL_GetCrcGateCmd(g_simBaseAddr[0], instance);
477 }
478
479 /*!
480 * @brief Enable the clock for RNGA module.
481 *
482 * This function enables the clock for RNGA moudle.
483 * @param instance module device instance
484 */
485 static inline void CLOCK_SYS_EnableRngaClock(uint32_t instance)
486 {
487 SIM_HAL_EnableRngaClock(g_simBaseAddr[0], instance);
488 }
489
490 /*!
491 * @brief Disable the clock for RNGA module.
492 *
493 * This function disables the clock for RNGA moudle.
494 * @param instance module device instance
495 */
496 static inline void CLOCK_SYS_DisableRngaClock(uint32_t instance)
497 {
498 SIM_HAL_DisableRngaClock(g_simBaseAddr[0], instance);
499 }
500
501 /*!
502 * @brief Get the the clock gate state for RNGA module.
503 *
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)
507 */
508 static inline bool CLOCK_SYS_GetRngaGateCmd(uint32_t instance)
509 {
510 return SIM_HAL_GetRngaGateCmd(g_simBaseAddr[0], instance);
511 }
512
513 /*!
514 * @brief Enable the clock for ADC module.
515 *
516 * This function enables the clock for ADC moudle.
517 * @param instance module device instance
518 */
519 static inline void CLOCK_SYS_EnableAdcClock(uint32_t instance)
520 {
521 SIM_HAL_EnableAdcClock(g_simBaseAddr[0], instance);
522 }
523
524 /*!
525 * @brief Disable the clock for ADC module.
526 *
527 * This function disables the clock for ADC moudle.
528 * @param instance module device instance
529 */
530 static inline void CLOCK_SYS_DisableAdcClock(uint32_t instance)
531 {
532 SIM_HAL_DisableAdcClock(g_simBaseAddr[0], instance);
533 }
534
535 /*!
536 * @brief Get the the clock gate state for ADC module.
537 *
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)
541 */
542 static inline bool CLOCK_SYS_GetAdcGateCmd(uint32_t instance)
543 {
544 return SIM_HAL_GetAdcGateCmd(g_simBaseAddr[0], instance);
545 }
546
547 /*!
548 * @brief Enable the clock for CMP module.
549 *
550 * This function enables the clock for CMP moudle.
551 * @param instance module device instance
552 */
553 static inline void CLOCK_SYS_EnableCmpClock(uint32_t instance)
554 {
555 SIM_HAL_EnableCmpClock(g_simBaseAddr[0], instance);
556 }
557
558 /*!
559 * @brief Disable the clock for CMP module.
560 *
561 * This function disables the clock for CMP moudle.
562 * @param instance module device instance
563 */
564 static inline void CLOCK_SYS_DisableCmpClock(uint32_t instance)
565 {
566 SIM_HAL_DisableCmpClock(g_simBaseAddr[0], instance);
567 }
568
569 /*!
570 * @brief Get the the clock gate state for CMP module.
571 *
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)
575 */
576 static inline bool CLOCK_SYS_GetCmpGateCmd(uint32_t instance)
577 {
578 return SIM_HAL_GetCmpGateCmd(g_simBaseAddr[0], instance);
579 }
580
581 /*!
582 * @brief Enable the clock for DAC module.
583 *
584 * This function enables the clock for DAC moudle.
585 * @param instance module device instance
586 */
587 static inline void CLOCK_SYS_EnableDacClock(uint32_t instance)
588 {
589 SIM_HAL_EnableDacClock(g_simBaseAddr[0], instance);
590 }
591
592 /*!
593 * @brief Disable the clock for DAC module.
594 *
595 * This function disables the clock for DAC moudle.
596 * @param instance module device instance
597 */
598 static inline void CLOCK_SYS_DisableDacClock(uint32_t instance)
599 {
600 SIM_HAL_DisableDacClock(g_simBaseAddr[0], instance);
601 }
602
603 /*!
604 * @brief Get the the clock gate state for DAC module.
605 *
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)
609 */
610 static inline bool CLOCK_SYS_GetDacGateCmd(uint32_t instance)
611 {
612 return SIM_HAL_GetDacGateCmd(g_simBaseAddr[0], instance);
613 }
614
615 /*!
616 * @brief Enable the clock for VREF module.
617 *
618 * This function enables the clock for VREF moudle.
619 * @param instance module device instance
620 */
621 static inline void CLOCK_SYS_EnableVrefClock(uint32_t instance)
622 {
623 SIM_HAL_EnableVrefClock(g_simBaseAddr[0], instance);
624 }
625
626 /*!
627 * @brief Disable the clock for VREF module.
628 *
629 * This function disables the clock for VREF moudle.
630 * @param instance module device instance
631 */
632 static inline void CLOCK_SYS_DisableVrefClock(uint32_t instance)
633 {
634 SIM_HAL_DisableVrefClock(g_simBaseAddr[0], instance);
635 }
636
637 /*!
638 * @brief Get the the clock gate state for VREF module.
639 *
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)
643 */
644 static inline bool CLOCK_SYS_GetVrefGateCmd(uint32_t instance)
645 {
646 return SIM_HAL_GetVrefGateCmd(g_simBaseAddr[0], instance);
647 }
648
649 /*!
650 * @brief Enable the clock for SAI module.
651 *
652 * This function enables the clock for SAI moudle.
653 * @param instance module device instance
654 */
655 static inline void CLOCK_SYS_EnableSaiClock(uint32_t instance)
656 {
657 SIM_HAL_EnableSaiClock(g_simBaseAddr[0], instance);
658 }
659
660 /*!
661 * @brief Disable the clock for SAI module.
662 *
663 * This function disables the clock for SAI moudle.
664 * @param instance module device instance
665 */
666 static inline void CLOCK_SYS_DisableSaiClock(uint32_t instance)
667 {
668 SIM_HAL_DisableSaiClock(g_simBaseAddr[0], instance);
669 }
670
671 /*!
672 * @brief Get the the clock gate state for SAI module.
673 *
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)
677 */
678 static inline bool CLOCK_SYS_GetSaiGateCmd(uint32_t instance)
679 {
680 return SIM_HAL_GetSaiGateCmd(g_simBaseAddr[0], instance);
681 }
682
683 /*!
684 * @brief Enable the clock for PDB module.
685 *
686 * This function enables the clock for PDB moudle.
687 * @param instance module device instance
688 */
689 static inline void CLOCK_SYS_EnablePdbClock(uint32_t instance)
690 {
691 SIM_HAL_EnablePdbClock(g_simBaseAddr[0], instance);
692 }
693
694 /*!
695 * @brief Disable the clock for PDB module.
696 *
697 * This function disables the clock for PDB moudle.
698 * @param instance module device instance
699 */
700 static inline void CLOCK_SYS_DisablePdbClock(uint32_t instance)
701 {
702 SIM_HAL_DisablePdbClock(g_simBaseAddr[0], instance);
703 }
704
705 /*!
706 * @brief Get the the clock gate state for PDB module.
707 *
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)
711 */
712 static inline bool CLOCK_SYS_GetPdbGateCmd(uint32_t instance)
713 {
714 return SIM_HAL_GetPdbGateCmd(g_simBaseAddr[0], instance);
715 }
716
717 /*!
718 * @brief Enable the clock for FTM module.
719 *
720 * This function enables the clock for FTM moudle.
721 * @param instance module device instance
722 */
723 static inline void CLOCK_SYS_EnableFtmClock(uint32_t instance)
724 {
725 SIM_HAL_EnableFtmClock(g_simBaseAddr[0], instance);
726 }
727
728 /*!
729 * @brief Disable the clock for FTM module.
730 *
731 * This function disables the clock for FTM moudle.
732 * @param instance module device instance
733 */
734 static inline void CLOCK_SYS_DisableFtmClock(uint32_t instance)
735 {
736 SIM_HAL_DisableFtmClock(g_simBaseAddr[0], instance);
737 }
738
739 /*!
740 * @brief Get the the clock gate state for FTM module.
741 *
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)
745 */
746 static inline bool CLOCK_SYS_GetFtmGateCmd(uint32_t instance)
747 {
748 return SIM_HAL_GetFtmGateCmd(g_simBaseAddr[0], instance);
749 }
750
751 /*!
752 * @brief Enable the clock for PIT module.
753 *
754 * This function enables the clock for PIT moudle.
755 * @param instance module device instance
756 */
757 static inline void CLOCK_SYS_EnablePitClock(uint32_t instance)
758 {
759 SIM_HAL_EnablePitClock(g_simBaseAddr[0], instance);
760 }
761
762 /*!
763 * @brief Disable the clock for PIT module.
764 *
765 * This function disables the clock for PIT moudle.
766 * @param instance module device instance
767 */
768 static inline void CLOCK_SYS_DisablePitClock(uint32_t instance)
769 {
770 SIM_HAL_DisablePitClock(g_simBaseAddr[0], instance);
771 }
772
773 /*!
774 * @brief Get the the clock gate state for PIT module.
775 *
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)
779 */
780 static inline bool CLOCK_SYS_GetPitGateCmd(uint32_t instance)
781 {
782 return SIM_HAL_GetPitGateCmd(g_simBaseAddr[0], instance);
783 }
784
785 /*!
786 * @brief Enable the clock for LPTIMER module.
787 *
788 * This function enables the clock for LPTIMER moudle.
789 * @param instance module device instance
790 */
791 static inline void CLOCK_SYS_EnableLptimerClock(uint32_t instance)
792 {
793 SIM_HAL_EnableLptimerClock(g_simBaseAddr[0], instance);
794 }
795
796 /*!
797 * @brief Disable the clock for LPTIMER module.
798 *
799 * This function disables the clock for LPTIMER moudle.
800 * @param instance module device instance
801 */
802 static inline void CLOCK_SYS_DisableLptimerClock(uint32_t instance)
803 {
804 SIM_HAL_DisableLptimerClock(g_simBaseAddr[0], instance);
805 }
806
807 /*!
808 * @brief Get the the clock gate state for LPTIMER module.
809 *
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)
813 */
814 static inline bool CLOCK_SYS_GetLptimerGateCmd(uint32_t instance)
815 {
816 return SIM_HAL_GetLptimerGateCmd(g_simBaseAddr[0], instance);
817 }
818
819 /*!
820 * @brief Enable the clock for RTC module.
821 *
822 * This function enables the clock for RTC moudle.
823 * @param instance module device instance
824 */
825 static inline void CLOCK_SYS_EnableRtcClock(uint32_t instance)
826 {
827 SIM_HAL_EnableRtcClock(g_simBaseAddr[0], instance);
828 }
829
830 /*!
831 * @brief Disable the clock for RTC module.
832 *
833 * This function disables the clock for RTC moudle.
834 * @param instance module device instance
835 */
836 static inline void CLOCK_SYS_DisableRtcClock(uint32_t instance)
837 {
838 SIM_HAL_DisableRtcClock(g_simBaseAddr[0], instance);
839 }
840
841 /*!
842 * @brief Get the the clock gate state for RTC module.
843 *
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)
847 */
848 static inline bool CLOCK_SYS_GetRtcGateCmd(uint32_t instance)
849 {
850 return SIM_HAL_GetRtcGateCmd(g_simBaseAddr[0], instance);
851 }
852
853 /*!
854 * @brief Enable the clock for USBFS module.
855 *
856 * This function enables the clock for USBFS moudle.
857 * @param instance module device instance
858 */
859 static inline void CLOCK_SYS_EnableUsbClock(uint32_t instance)
860 {
861 SIM_HAL_EnableUsbClock(g_simBaseAddr[0], instance);
862 }
863
864 /*!
865 * @brief Disable the clock for USBFS module.
866 *
867 * This function disables the clock for USBFS moudle.
868 * @param instance module device instance
869 */
870 static inline void CLOCK_SYS_DisableUsbClock(uint32_t instance)
871 {
872 SIM_HAL_DisableUsbClock(g_simBaseAddr[0], instance);
873 }
874
875 /*!
876 * @brief Get the the clock gate state for USB module.
877 *
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)
881 */
882 static inline bool CLOCK_SYS_GetUsbGateCmd(uint32_t instance)
883 {
884 return SIM_HAL_GetUsbGateCmd(g_simBaseAddr[0], instance);
885 }
886
887 /*!
888 * @brief Enable the clock for SPI module.
889 *
890 * This function enables the clock for SPI moudle.
891 * @param instance module device instance
892 */
893 static inline void CLOCK_SYS_EnableSpiClock(uint32_t instance)
894 {
895 SIM_HAL_EnableSpiClock(g_simBaseAddr[0], instance);
896 }
897
898 /*!
899 * @brief Disable the clock for SPI module.
900 *
901 * This function disables the clock for SPI moudle.
902 * @param instance module device instance
903 */
904 static inline void CLOCK_SYS_DisableSpiClock(uint32_t instance)
905 {
906 SIM_HAL_DisableSpiClock(g_simBaseAddr[0], instance);
907 }
908
909 /*!
910 * @brief Get the the clock gate state for SPI module.
911 *
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)
915 */
916 static inline bool CLOCK_SYS_GetSpiGateCmd(uint32_t instance)
917 {
918 return SIM_HAL_GetSpiGateCmd(g_simBaseAddr[0], instance);
919 }
920
921 /*!
922 * @brief Enable the clock for I2C module.
923 *
924 * This function enables the clock for I2C moudle.
925 * @param instance module device instance
926 */
927 static inline void CLOCK_SYS_EnableI2cClock(uint32_t instance)
928 {
929 SIM_HAL_EnableI2cClock(g_simBaseAddr[0], instance);
930 }
931
932 /*!
933 * @brief Disable the clock for I2C module.
934 *
935 * This function disables the clock for I2C moudle.
936 * @param instance module device instance
937 */
938 static inline void CLOCK_SYS_DisableI2cClock(uint32_t instance)
939 {
940 SIM_HAL_DisableI2cClock(g_simBaseAddr[0], instance);
941 }
942
943 /*!
944 * @brief Get the the clock gate state for I2C module.
945 *
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)
949 */
950 static inline bool CLOCK_SYS_GetI2cGateCmd(uint32_t instance)
951 {
952 return SIM_HAL_GetI2cGateCmd(g_simBaseAddr[0], instance);
953 }
954
955 /*!
956 * @brief Enable the clock for UART module.
957 *
958 * This function enables the clock for UART moudle.
959 * @param instance module device instance
960 */
961 static inline void CLOCK_SYS_EnableUartClock(uint32_t instance)
962 {
963 SIM_HAL_EnableUartClock(g_simBaseAddr[0], instance);
964 }
965
966 /*!
967 * @brief Disable the clock for UART module.
968 *
969 * This function disables the clock for UART moudle.
970 * @param instance module device instance
971 */
972 static inline void CLOCK_SYS_DisableUartClock(uint32_t instance)
973 {
974 SIM_HAL_DisableUartClock(g_simBaseAddr[0], instance);
975 }
976
977 /*!
978 * @brief Get the the clock gate state for UART module.
979 *
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)
983 */
984 static inline bool CLOCK_SYS_GetUartGateCmd(uint32_t instance)
985 {
986 return SIM_HAL_GetUartGateCmd(g_simBaseAddr[0], instance);
987 }
988
989 /*!
990 * @brief Enable the clock for LPUART module.
991 *
992 * This function enables the clock for LPUART moudle.
993 * @param instance module device instance
994 */
995 static inline void CLOCK_SYS_EnableLpuartClock(uint32_t instance)
996 {
997 SIM_HAL_EnableLpuartClock(g_simBaseAddr[0], instance);
998 }
999
1000 /*!
1001 * @brief Disable the clock for LPUART module.
1002 *
1003 * This function disables the clock for LPUART moudle.
1004 * @param instance module device instance
1005 */
1006 static inline void CLOCK_SYS_DisableLpuartClock(uint32_t instance)
1007 {
1008 SIM_HAL_DisableLpuartClock(g_simBaseAddr[0], instance);
1009 }
1010
1011 /*!
1012 * @brief Get the the clock gate state for LPUART module.
1013 *
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)
1017 */
1018 static inline bool CLOCK_SYS_GetLpuartGateCmd(uint32_t instance)
1019 {
1020 return SIM_HAL_GetLpuartGateCmd(g_simBaseAddr[0], instance);
1021 }
1022
1023 #if defined(__cplusplus)
1024 }
1025 #endif /* __cplusplus*/
1026
1027 /*! @}*/
1028
1029 #endif /* __FSL_CLOCK_K22F51212_H__ */
1030 /*******************************************************************************
1031 * EOF
1032 ******************************************************************************/
1033
Imprint / Impressum