]> git.donarmstrong.com Git - qmk_firmware.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K22F/MK22F51212/fsl_sim_hal_K22F51212.h
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[qmk_firmware.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / hal / TARGET_Freescale / TARGET_KPSDK_MCUS / TARGET_K22F / MK22F51212 / fsl_sim_hal_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_SIM_HAL_K22F51212_H__)
32 #define __FSL_SIM_HAL_K22F51212_H__
33
34 /*! @addtogroup sim_hal*/
35 /*! @{*/
36
37 /*! @file*/
38
39 /*******************************************************************************
40  * Definitions
41  ******************************************************************************/
42
43 /*! @brief SIM USB clock source */
44 typedef enum _sim_usb_clock_source
45 {
46     kSimUsbSrcClkIn,       /* USB CLKIN Clock */
47     kSimUsbSrcPllFllSel    /* clock as selected by SOPT2[PLLFLLSEL] */
48 } sim_usb_clock_source_t;
49
50 /*! @brief SIM LPUART clock source */
51 typedef enum _sim_lpuart_clock_source
52 {
53     kSimLpuartSrcNone,        /* Clock disabled */
54     kSimLpuartSrcPllFllSel,   /* Clock as selected by SOPT2[PLLFLLSEL] */
55     kSimLpuartSrcOscErclk,    /* OscErClk with special divider */
56     kSimLpuartSrcMcgIrclk     /* MCGIRCLK */
57 } sim_lpuart_clock_source_t;
58
59 /*! @brief SIM PLLFLLSEL clock source select */
60 typedef enum _sim_pllfll_clock_sel
61 {
62     kSimPllFllSelFll,       /* Fll clock */
63     kSimPllFllSelPll,        /* Pll0 clock */
64     kSimPllFllSelNone,      /* reserved */
65     kSimPllFllSelIrc        /* IRC 48Mhz */
66 } sim_pllfll_clock_sel_t;
67
68 /*! @brief SIM OSC32KSEL clock source select */
69 typedef enum _sim_osc32k_clock_sel
70 {
71     kSimOsc32kSelOsc32k,      /* OSC 32k clock */
72     kSimOsc32kSelReserved,    /* Reserved */
73     kSimOsc32kSelRtc32k,      /* RTC 32k clock */
74     kSimOsc32kSelLpo          /* LPO clock */
75 } sim_osc32k_clock_sel_t;
76
77 /*! @brief SIM TRACESEL clock source select */
78 typedef enum _sim_trace_clock_sel
79 {
80     kSimTraceMcgoutClk,       /* MCG out clock */
81     kSimTraceCoreClk          /* core clock */
82 } sim_trace_clock_sel_t;
83
84 /*! @brief SIM CLKOUT_SEL clock source select */
85 typedef enum _sim_clkout_clock_sel
86 {
87     kSimClkoutFlexbusClk,       /* Flexbus clock */
88     kSimClkoutReserved,         /* Reserved */
89     kSimClkoutFlashClk,         /* Flash clock */
90     kSimClkoutLpoClk,           /* LPO clock */
91     kSimClkoutMcgIrcClk,        /* MCG out clock */
92     kSimClkoutRtc32kClk,        /* RTC 32k clock */
93     kSimClkoutOscErClk,
94     KsimClkoutIrcClk
95 } sim_clkout_clock_sel_t;
96
97 /*! @brief SIM RTCCLKOUTSEL clock source select */
98 typedef enum _sim_rtcclkout_clock_sel
99 {
100     kSimRtcClkout1hzClk,       /* 1Hz clock */
101     kSimRtcClkout32kClk        /* 32KHz clock */
102 } sim_rtcclkout_clock_sel_t;
103
104 /*******************************************************************************
105  * API
106  ******************************************************************************/
107
108 #if defined(__cplusplus)
109 extern "C" {
110 #endif /* __cplusplus*/
111
112 /*! @name IP related clock feature APIs*/
113 /*@{*/
114
115 /*!
116  * @brief Enable the clock for DMA module.
117  *
118  * This function enables the clock for DMA moudle.
119  * @param instance module device instance
120  */
121 void SIM_HAL_EnableDmaClock(uint32_t baseAddr, uint32_t instance);
122
123 /*!
124  * @brief Disable the clock for DMA module.
125  *
126  * This function disables the clock for DMA moudle.
127  *
128  * @param baseAddr Base address for current SIM instance.
129  * @param instance module device instance
130  */
131 void SIM_HAL_DisableDmaClock(uint32_t baseAddr, uint32_t instance);
132
133 /*!
134  * @brief Get the the clock gate state for DMA module.
135  *
136  * This function will get the clock gate state for DMA moudle.
137  *
138  * @param baseAddr Base address for current SIM instance.
139  * @param instance module device instance
140  * @return state true - ungated(Enabled), false - gated (Disabled)
141  */
142 bool SIM_HAL_GetDmaGateCmd(uint32_t baseAddr, uint32_t instance);
143
144 /*!
145  * @brief Enable the clock for DMAMUX module.
146  *
147  * This function enables the clock for DMAMUX moudle.
148  *
149  * @param baseAddr Base address for current SIM instance.
150  * @param instance module device instance
151  */
152 void SIM_HAL_EnableDmamuxClock(uint32_t baseAddr, uint32_t instance);
153
154 /*!
155  * @brief Disable the clock for DMAMUX module.
156  *
157  * This function disables the clock for DMAMUX moudle.
158  *
159  * @param baseAddr Base address for current SIM instance.
160  * @param instance module device instance
161  */
162 void SIM_HAL_DisableDmamuxClock(uint32_t baseAddr, uint32_t instance);
163
164 /*!
165  * @brief Get the the clock gate state for DMAMUX module.
166  *
167  * This function will get the clock gate state for DMAMUX moudle.
168  *
169  * @param baseAddr Base address for current SIM instance.
170  * @param instance module device instance
171  * @return state true - ungated(Enabled), false - gated (Disabled)
172  */
173 bool SIM_HAL_GetDmamuxGateCmd(uint32_t baseAddr, uint32_t instance);
174
175 /*!
176  * @brief Enable the clock for PORT module.
177  *
178  * This function enables the clock for PORT moudle.
179  *
180  * @param baseAddr Base address for current SIM instance.
181  * @param instance module device instance
182  */
183 void SIM_HAL_EnablePortClock(uint32_t baseAddr, uint32_t instance);
184
185 /*!
186  * @brief Disable the clock for PORT module.
187  *
188  * This function disables the clock for PORT moudle.
189  *
190  * @param baseAddr Base address for current SIM instance.
191  * @param instance module device instance
192  */
193 void SIM_HAL_DisablePortClock(uint32_t baseAddr, uint32_t instance);
194
195 /*!
196  * @brief Get the the clock gate state for PORT module.
197  *
198  * This function will get the clock gate state for PORT moudle.
199  *
200  * @param baseAddr Base address for current SIM instance.
201  * @param instance module device instance
202  * @return state true - ungated(Enabled), false - gated (Disabled)
203  */
204 bool SIM_HAL_GetPortGateCmd(uint32_t baseAddr, uint32_t instance);
205
206 /*!
207  * @brief Enable the clock for EWM module.
208  *
209  * This function enables the clock for EWM moudle.
210  *
211  * @param baseAddr Base address for current SIM instance.
212  * @param instance module device instance
213  */
214 void SIM_HAL_EnableEwmClock(uint32_t baseAddr, uint32_t instance);
215
216 /*!
217  * @brief Disable the clock for EWM module.
218  *
219  * This function disables the clock for EWM moudle.
220  *
221  * @param baseAddr Base address for current SIM instance.
222  * @param instance module device instance
223  */
224 void SIM_HAL_DisableEwmClock(uint32_t baseAddr, uint32_t instance);
225
226 /*!
227  * @brief Get the the clock gate state for EWM module.
228  *
229  * This function will get the clock gate state for EWM moudle.
230  *
231  * @param baseAddr Base address for current SIM instance.
232  * @param instance module device instance
233  * @return state true - ungated(Enabled), false - gated (Disabled)
234  */
235 bool SIM_HAL_GetEwmGateCmd(uint32_t baseAddr, uint32_t instance);
236
237 /*!
238  * @brief Enable the clock for FLEXBUS module.
239  *
240  * This function enables the clock for FLEXBUS moudle.
241  *
242  * @param baseAddr Base address for current SIM instance.
243  * @param instance module device instance
244  */
245 void SIM_HAL_EnableFlexbusClock(uint32_t baseAddr, uint32_t instance);
246
247 /*!
248  * @brief Disable the clock for FLEXBUS module.
249  *
250  * This function disables the clock for FLEXBUS moudle.
251  *
252  * @param baseAddr Base address for current SIM instance.
253  * @param instance module device instance
254  */
255 void SIM_HAL_DisableFlexbusClock(uint32_t baseAddr, uint32_t instance);
256
257 /*!
258  * @brief Get the the clock gate state for FLEXBUS module.
259  *
260  * This function will get the clock gate state for FLEXBUS moudle.
261  *
262  * @param baseAddr Base address for current SIM instance.
263  * @param instance module device instance
264  * @return state true - ungated(Enabled), false - gated (Disabled)
265  */
266 bool SIM_HAL_GetFlexbusGateCmd(uint32_t baseAddr, uint32_t instance);
267
268 /*!
269  * @brief Enable the clock for FTF module.
270  *
271  * This function enables the clock for FTF moudle.
272  *
273  * @param baseAddr Base address for current SIM instance.
274  * @param instance module device instance
275  */
276 void SIM_HAL_EnableFtfClock(uint32_t baseAddr, uint32_t instance);
277
278 /*!
279  * @brief Disable the clock for FTF module.
280  *
281  * This function disables the clock for FTF moudle.
282  *
283  * @param baseAddr Base address for current SIM instance.
284  * @param instance module device instance
285  */
286 void SIM_HAL_DisableFtfClock(uint32_t baseAddr, uint32_t instance);
287
288 /*!
289  * @brief Get the the clock gate state for FTF module.
290  *
291  * This function will get the clock gate state for FTF moudle.
292  *
293  * @param baseAddr Base address for current SIM instance.
294  * @param instance module device instance
295  * @return state true - ungated(Enabled), false - gated (Disabled)
296  */
297 bool SIM_HAL_GetFtfGateCmd(uint32_t baseAddr, uint32_t instance);
298
299 /*!
300  * @brief Enable the clock for CRC module.
301  *
302  * This function enables the clock for CRC moudle.
303  *
304  * @param baseAddr Base address for current SIM instance.
305  * @param instance module device instance
306  */
307 void SIM_HAL_EnableCrcClock(uint32_t baseAddr, uint32_t instance);
308
309 /*!
310  * @brief Disable the clock for CRC module.
311  *
312  * This function disables the clock for CRC moudle.
313  *
314  * @param baseAddr Base address for current SIM instance.
315  * @param instance module device instance
316  */
317 void SIM_HAL_DisableCrcClock(uint32_t baseAddr, uint32_t instance);
318
319 /*!
320  * @brief Get the the clock gate state for CRC module.
321  *
322  * This function will get the clock gate state for CRC moudle.
323  *
324  * @param baseAddr Base address for current SIM instance.
325  * @param instance module device instance
326  * @return state true - ungated(Enabled), false - gated (Disabled)
327  */
328 bool SIM_HAL_GetCrcGateCmd(uint32_t baseAddr, uint32_t instance);
329
330 /*!
331  * @brief Enable the clock for RNGA module.
332  *
333  * This function enables the clock for RNGA moudle.
334  *
335  * @param baseAddr Base address for current SIM instance.
336  * @param instance module device instance
337  */
338 void SIM_HAL_EnableRngaClock(uint32_t baseAddr, uint32_t instance);
339
340 /*!
341  * @brief Disable the clock for RNGA module.
342  *
343  * This function disables the clock for RNGA moudle.
344  *
345  * @param baseAddr Base address for current SIM instance.
346  * @param instance module device instance
347  */
348 void SIM_HAL_DisableRngaClock(uint32_t baseAddr, uint32_t instance);
349
350 /*!
351  * @brief Get the the clock gate state for RNGA module.
352  *
353  * This function will get the clock gate state for RNGA moudle.
354  *
355  * @param baseAddr Base address for current SIM instance.
356  * @param instance module device instance
357  * @return state true - ungated(Enabled), false - gated (Disabled)
358  */
359 bool SIM_HAL_GetRngaGateCmd(uint32_t baseAddr, uint32_t instance);
360
361 /*!
362  * @brief Enable the clock for ADC module.
363  *
364  * This function enables the clock for ADC moudle.
365  *
366  * @param baseAddr Base address for current SIM instance.
367  * @param instance module device instance
368  */
369 void SIM_HAL_EnableAdcClock(uint32_t baseAddr, uint32_t instance);
370
371 /*!
372  * @brief Disable the clock for ADC module.
373  *
374  * This function disables the clock for ADC moudle.
375  *
376  * @param baseAddr Base address for current SIM instance.
377  * @param instance module device instance
378  */
379 void SIM_HAL_DisableAdcClock(uint32_t baseAddr, uint32_t instance);
380
381 /*!
382  * @brief Get the the clock gate state for ADC module.
383  *
384  * This function will get the clock gate state for ADC moudle.
385  *
386  * @param baseAddr Base address for current SIM instance.
387  * @param instance module device instance
388  * @return state true - ungated(Enabled), false - gated (Disabled)
389  */
390 bool SIM_HAL_GetAdcGateCmd(uint32_t baseAddr, uint32_t instance);
391
392 /*!
393  * @brief Enable the clock for CMP module.
394  *
395  * This function enables the clock for CMP moudle.
396  *
397  * @param baseAddr Base address for current SIM instance.
398  * @param instance module device instance
399  */
400 void SIM_HAL_EnableCmpClock(uint32_t baseAddr, uint32_t instance);
401
402 /*!
403  * @brief Disable the clock for CMP module.
404  *
405  * This function disables the clock for CMP moudle.
406  *
407  * @param baseAddr Base address for current SIM instance.
408  * @param instance module device instance
409  */
410 void SIM_HAL_DisableCmpClock(uint32_t baseAddr, uint32_t instance);
411
412 /*!
413  * @brief Get the the clock gate state for CMP module.
414  *
415  * This function will get the clock gate state for CMP moudle.
416  *
417  * @param baseAddr Base address for current SIM instance.
418  * @param instance module device instance
419  * @return state true - ungated(Enabled), false - gated (Disabled)
420  */
421 bool SIM_HAL_GetCmpGateCmd(uint32_t baseAddr, uint32_t instance);
422
423 /*!
424  * @brief Enable the clock for DAC module.
425  *
426  * This function enables the clock for DAC moudle.
427  *
428  * @param baseAddr Base address for current SIM instance.
429  * @param instance module device instance
430  */
431 void SIM_HAL_EnableDacClock(uint32_t baseAddr, uint32_t instance);
432
433 /*!
434  * @brief Disable the clock for DAC module.
435  *
436  * This function disables the clock for DAC moudle.
437  *
438  * @param baseAddr Base address for current SIM instance.
439  * @param instance module device instance
440  */
441 void SIM_HAL_DisableDacClock(uint32_t baseAddr, uint32_t instance);
442
443 /*!
444  * @brief Get the the clock gate state for DAC module.
445  *
446  * This function will get the clock gate state for DAC moudle.
447  *
448  * @param baseAddr Base address for current SIM instance.
449  * @param instance module device instance
450  * @return state true - ungated(Enabled), false - gated (Disabled)
451  */
452 bool SIM_HAL_GetDacGateCmd(uint32_t baseAddr, uint32_t instance);
453
454 /*!
455  * @brief Enable the clock for VREF module.
456  *
457  * This function enables the clock for VREF moudle.
458  *
459  * @param baseAddr Base address for current SIM instance.
460  * @param instance module device instance
461  */
462 void SIM_HAL_EnableVrefClock(uint32_t baseAddr, uint32_t instance);
463
464 /*!
465  * @brief Disable the clock for VREF module.
466  *
467  * This function disables the clock for VREF moudle.
468  *
469  * @param baseAddr Base address for current SIM instance.
470  * @param instance module device instance
471  */
472 void SIM_HAL_DisableVrefClock(uint32_t baseAddr, uint32_t instance);
473
474 /*!
475  * @brief Get the the clock gate state for VREF module.
476  *
477  * This function will get the clock gate state for VREF moudle.
478  *
479  * @param baseAddr Base address for current SIM instance.
480  * @param instance module device instance
481  * @return state true - ungated(Enabled), false - gated (Disabled)
482  */
483 bool SIM_HAL_GetVrefGateCmd(uint32_t baseAddr, uint32_t instance);
484
485 /*!
486  * @brief Enable the clock for SAI module.
487  *
488  * This function enables the clock for SAI moudle.
489  *
490  * @param baseAddr Base address for current SIM instance.
491  * @param instance module device instance
492  */
493 void SIM_HAL_EnableSaiClock(uint32_t baseAddr, uint32_t instance);
494
495 /*!
496  * @brief Disable the clock for SAI module.
497  *
498  * This function disables the clock for SAI moudle.
499  *
500  * @param baseAddr Base address for current SIM instance.
501  * @param instance module device instance
502  */
503 void SIM_HAL_DisableSaiClock(uint32_t baseAddr, uint32_t instance);
504
505 /*!
506  * @brief Get the the clock gate state for SAI module.
507  *
508  * This function will get the clock gate state for SAI moudle.
509  *
510  * @param baseAddr Base address for current SIM instance.
511  * @param instance module device instance
512  * @return state true - ungated(Enabled), false - gated (Disabled)
513  */
514 bool SIM_HAL_GetSaiGateCmd(uint32_t baseAddr, uint32_t instance);
515
516 /*!
517  * @brief Enable the clock for PDB module.
518  *
519  * This function enables the clock for PDB moudle.
520  *
521  * @param baseAddr Base address for current SIM instance.
522  * @param instance module device instance
523  */
524 void SIM_HAL_EnablePdbClock(uint32_t baseAddr, uint32_t instance);
525
526 /*!
527  * @brief Disable the clock for PDB module.
528  *
529  * This function disables the clock for PDB moudle.
530  *
531  * @param baseAddr Base address for current SIM instance.
532  * @param instance module device instance
533  */
534 void SIM_HAL_DisablePdbClock(uint32_t baseAddr, uint32_t instance);
535
536 /*!
537  * @brief Get the the clock gate state for PDB module.
538  *
539  * This function will get the clock gate state for PDB moudle.
540  *
541  * @param baseAddr Base address for current SIM instance.
542  * @param instance module device instance
543  * @return state true - ungated(Enabled), false - gated (Disabled)
544  */
545 bool SIM_HAL_GetPdbGateCmd(uint32_t baseAddr, uint32_t instance);
546
547 /*!
548  * @brief Enable the clock for FTM module.
549  *
550  * This function enables the clock for FTM moudle.
551  *
552  * @param baseAddr Base address for current SIM instance.
553  * @param instance module device instance
554  */
555 void SIM_HAL_EnableFtmClock(uint32_t baseAddr, uint32_t instance);
556
557 /*!
558  * @brief Disable the clock for FTM module.
559  *
560  * This function disables the clock for FTM moudle.
561  *
562  * @param baseAddr Base address for current SIM instance.
563  * @param instance module device instance
564  */
565 void SIM_HAL_DisableFtmClock(uint32_t baseAddr, uint32_t instance);
566
567 /*!
568  * @brief Get the the clock gate state for FTM module.
569  *
570  * This function will get the clock gate state for FTM moudle.
571  *
572  * @param baseAddr Base address for current SIM instance.
573  * @param instance module device instance
574  * @return state true - ungated(Enabled), false - gated (Disabled)
575  */
576 bool SIM_HAL_GetFtmGateCmd(uint32_t baseAddr, uint32_t instance);
577
578 /*!
579  * @brief Enable the clock for PIT module.
580  *
581  * This function enables the clock for PIT moudle.
582  *
583  * @param baseAddr Base address for current SIM instance.
584  * @param instance module device instance
585  */
586 void SIM_HAL_EnablePitClock(uint32_t baseAddr, uint32_t instance);
587
588 /*!
589  * @brief Disable the clock for PIT module.
590  *
591  * This function disables the clock for PIT moudle.
592  *
593  * @param baseAddr Base address for current SIM instance.
594  * @param instance module device instance
595  */
596 void SIM_HAL_DisablePitClock(uint32_t baseAddr, uint32_t instance);
597
598 /*!
599  * @brief Get the the clock gate state for PIT module.
600  *
601  * This function will get the clock gate state for PIT moudle.
602  *
603  * @param baseAddr Base address for current SIM instance.
604  * @param instance module device instance
605  * @return state true - ungated(Enabled), false - gated (Disabled)
606  */
607 bool SIM_HAL_GetPitGateCmd(uint32_t baseAddr, uint32_t instance);
608
609 /*!
610  * @brief Enable the clock for LPTIMER module.
611  *
612  * This function enables the clock for LPTIMER moudle.
613  *
614  * @param baseAddr Base address for current SIM instance.
615  * @param instance module device instance
616  */
617 void SIM_HAL_EnableLptimerClock(uint32_t baseAddr, uint32_t instance);
618
619 /*!
620  * @brief Disable the clock for LPTIMER module.
621  *
622  * This function disables the clock for LPTIMER moudle.
623  *
624  * @param baseAddr Base address for current SIM instance.
625  * @param instance module device instance
626  */
627 void SIM_HAL_DisableLptimerClock(uint32_t baseAddr, uint32_t instance);
628
629 /*!
630  * @brief Get the the clock gate state for LPTIMER module.
631  *
632  * This function will get the clock gate state for LPTIMER moudle.
633  *
634  * @param baseAddr Base address for current SIM instance.
635  * @param instance module device instance
636  * @return state true - ungated(Enabled), false - gated (Disabled)
637  */
638 bool SIM_HAL_GetLptimerGateCmd(uint32_t baseAddr, uint32_t instance);
639
640 /*!
641  * @brief Enable the clock for RTC module.
642  *
643  * This function enables the clock for RTC moudle.
644  *
645  * @param baseAddr Base address for current SIM instance.
646  * @param instance module device instance
647  */
648 void SIM_HAL_EnableRtcClock(uint32_t baseAddr, uint32_t instance);
649
650 /*!
651  * @brief Disable the clock for RTC module.
652  *
653  * This function disables the clock for RTC moudle.
654  *
655  * @param baseAddr Base address for current SIM instance.
656  * @param instance module device instance
657  */
658 void SIM_HAL_DisableRtcClock(uint32_t baseAddr, uint32_t instance);
659
660 /*!
661  * @brief Get the the clock gate state for RTC module.
662  *
663  * This function will get the clock gate state for RTC moudle.
664  *
665  * @param baseAddr Base address for current SIM instance.
666  * @param instance module device instance
667  * @return state true - ungated(Enabled), false - gated (Disabled)
668  */
669 bool SIM_HAL_GetRtcGateCmd(uint32_t baseAddr, uint32_t instance);
670
671 /*!
672  * @brief Enable the clock for USBFS module.
673  *
674  * This function enables the clock for USBFS moudle.
675  *
676  * @param baseAddr Base address for current SIM instance.
677  * @param instance module device instance
678  */
679 void SIM_HAL_EnableUsbClock(uint32_t baseAddr, uint32_t instance);
680
681 /*!
682  * @brief Disable the clock for USBFS module.
683  *
684  * This function disables the clock for USBFS moudle.
685  *
686  * @param baseAddr Base address for current SIM instance.
687  * @param instance module device instance
688  */
689 void SIM_HAL_DisableUsbClock(uint32_t baseAddr, uint32_t instance);
690
691 /*!
692  * @brief Get the the clock gate state for USB module.
693  *
694  * This function will get the clock gate state for USB moudle.
695  *
696  * @param baseAddr Base address for current SIM instance.
697  * @param instance module device instance
698  * @return state true - ungated(Enabled), false - gated (Disabled)
699  */
700 bool SIM_HAL_GetUsbGateCmd(uint32_t baseAddr, uint32_t instance);
701
702 /*!
703  * @brief Enable the clock for SPI module.
704  *
705  * This function enables the clock for SPI moudle.
706  *
707  * @param baseAddr Base address for current SIM instance.
708  * @param instance module device instance
709  */
710 void SIM_HAL_EnableSpiClock(uint32_t baseAddr, uint32_t instance);
711
712 /*!
713  * @brief Disable the clock for SPI module.
714  *
715  * This function disables the clock for SPI moudle.
716  *
717  * @param baseAddr Base address for current SIM instance.
718  * @param instance module device instance
719  */
720 void SIM_HAL_DisableSpiClock(uint32_t baseAddr, uint32_t instance);
721
722 /*!
723  * @brief Get the the clock gate state for SPI module.
724  *
725  * This function will get the clock gate state for SPI moudle.
726  *
727  * @param baseAddr Base address for current SIM instance.
728  * @param instance module device instance
729  * @return state true - ungated(Enabled), false - gated (Disabled)
730  */
731 bool SIM_HAL_GetSpiGateCmd(uint32_t baseAddr, uint32_t instance);
732
733 /*!
734  * @brief Enable the clock for I2C module.
735  *
736  * This function enables the clock for I2C moudle.
737  *
738  * @param baseAddr Base address for current SIM instance.
739  * @param instance module device instance
740  */
741 void SIM_HAL_EnableI2cClock(uint32_t baseAddr, uint32_t instance);
742
743 /*!
744  * @brief Disable the clock for I2C module.
745  *
746  * This function disables the clock for I2C moudle.
747  *
748  * @param baseAddr Base address for current SIM instance.
749  * @param instance module device instance
750  */
751 void SIM_HAL_DisableI2cClock(uint32_t baseAddr, uint32_t instance);
752
753 /*!
754  * @brief Get the the clock gate state for I2C module.
755  *
756  * This function will get the clock gate state for I2C moudle.
757  *
758  * @param baseAddr Base address for current SIM instance.
759  * @param instance module device instance
760  * @return state true - ungated(Enabled), false - gated (Disabled)
761  */
762 bool SIM_HAL_GetI2cGateCmd(uint32_t baseAddr, uint32_t instance);
763
764 /*!
765  * @brief Enable the clock for UART module.
766  *
767  * This function enables the clock for UART moudle.
768  *
769  * @param baseAddr Base address for current SIM instance.
770  * @param instance module device instance
771  */
772 void SIM_HAL_EnableUartClock(uint32_t baseAddr, uint32_t instance);
773
774 /*!
775  * @brief Disable the clock for UART module.
776  *
777  * This function disables the clock for UART moudle.
778  *
779  * @param baseAddr Base address for current SIM instance.
780  * @param instance module device instance
781  */
782 void SIM_HAL_DisableUartClock(uint32_t baseAddr, uint32_t instance);
783
784 /*!
785  * @brief Get the the clock gate state for UART module.
786  *
787  * This function will get the clock gate state for UART moudle.
788  *
789  * @param baseAddr Base address for current SIM instance.
790  * @param instance module device instance
791  * @return state true - ungated(Enabled), false - gated (Disabled)
792  */
793 bool SIM_HAL_GetUartGateCmd(uint32_t baseAddr, uint32_t instance);
794
795 /*!
796  * @brief Enable the clock for LPUART module.
797  *
798  * This function enables the clock for LPUART moudle.
799  *
800  * @param baseAddr Base address for current SIM instance.
801  * @param instance module device instance
802  */
803 void SIM_HAL_EnableLpuartClock(uint32_t baseAddr, uint32_t instance);
804
805 /*!
806  * @brief Disable the clock for LPUART module.
807  *
808  * This function disables the clock for LPUART moudle.
809  *
810  * @param baseAddr Base address for current SIM instance.
811  * @param instance module device instance
812  */
813 void SIM_HAL_DisableLpuartClock(uint32_t baseAddr, uint32_t instance);
814
815 /*!
816  * @brief Get the the clock gate state for LPUART module.
817  *
818  * This function will get the clock gate state for LPUART moudle.
819  *
820  * @param baseAddr Base address for current SIM instance.
821  * @param instance module device instance
822  * @return state true - ungated(Enabled), false - gated (Disabled)
823  */
824 bool SIM_HAL_GetLpuartGateCmd(uint32_t baseAddr, uint32_t instance);
825
826 /*@}*/
827
828 #if defined(__cplusplus)
829 }
830 #endif /* __cplusplus*/
831
832
833 /*! @}*/
834
835 #endif /* __FSL_SIM_HAL_K22F51212_H__ */
836 /*******************************************************************************
837  * EOF
838  ******************************************************************************/
839