MSPM0C1105_C1106 Driver Library  2.05.01.00
dl_gpio.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 /*!****************************************************************************
33  * @file dl_gpio.h
34  * @brief General Purpose Input/Output Driver Library
35  * @defgroup GPIO General Purpose Input/Output (GPIO)
36  *
37  * @anchor ti_dl_dl_gpio_Overview
38  * # Overview
39  *
40  * The GPIO Driver Library allows full configuration of
41  * the MSPM0 GPIO module. The GPIO peripheral provides the user with a means
42  * to write data out and read data in to and from the device pins.
43  * It also provides a way to detect wakeup events while the device is in a
44  * low power state.
45  *
46  * <hr>
47  ******************************************************************************
48  */
52 #ifndef ti_dl_dl_gpio__include
53 #define ti_dl_dl_gpio__include
54 
55 #include <ti/devices/msp/msp.h>
56 #include <ti/driverlib/dl_common.h>
57 
58 #ifdef __MSPM0_HAS_GPIO__
59 
60 #ifdef __cplusplus
61 extern "C" {
62 #endif
63 
64 /* clang-format off */
65 
72 #define DL_GPIO_PIN_0 (0x00000001)
73 
77 #define DL_GPIO_PIN_1 (0x00000002)
78 
82 #define DL_GPIO_PIN_2 (0x00000004)
83 
87 #define DL_GPIO_PIN_3 (0x00000008)
88 
92 #define DL_GPIO_PIN_4 (0x00000010)
93 
97 #define DL_GPIO_PIN_5 (0x00000020)
98 
102 #define DL_GPIO_PIN_6 (0x00000040)
103 
107 #define DL_GPIO_PIN_7 (0x00000080)
108 
112 #define DL_GPIO_PIN_8 (0x00000100)
113 
117 #define DL_GPIO_PIN_9 (0x00000200)
118 
122 #define DL_GPIO_PIN_10 (0x00000400)
123 
127 #define DL_GPIO_PIN_11 (0x00000800)
128 
132 #define DL_GPIO_PIN_12 (0x00001000)
133 
137 #define DL_GPIO_PIN_13 (0x00002000)
138 
142 #define DL_GPIO_PIN_14 (0x00004000)
143 
147 #define DL_GPIO_PIN_15 (0x00008000)
148 
152 #define DL_GPIO_PIN_16 (0x00010000)
153 
157 #define DL_GPIO_PIN_17 (0x00020000)
158 
162 #define DL_GPIO_PIN_18 (0x00040000)
163 
167 #define DL_GPIO_PIN_19 (0x00080000)
168 
172 #define DL_GPIO_PIN_20 (0x00100000)
173 
177 #define DL_GPIO_PIN_21 (0x00200000)
178 
182 #define DL_GPIO_PIN_22 (0x00400000)
183 
187 #define DL_GPIO_PIN_23 (0x00800000)
188 
192 #define DL_GPIO_PIN_24 (0x01000000)
193 
197 #define DL_GPIO_PIN_25 (0x02000000)
198 
202 #define DL_GPIO_PIN_26 (0x04000000)
203 
207 #define DL_GPIO_PIN_27 (0x08000000)
208 
212 #define DL_GPIO_PIN_28 (0x10000000)
213 
217 #define DL_GPIO_PIN_29 (0x20000000)
218 
222 #define DL_GPIO_PIN_30 (0x40000000)
223 
227 #define DL_GPIO_PIN_31 (0x80000000)
228 
237 #define DL_GPIO_PIN_0_EDGE_DISABLE (GPIO_POLARITY15_0_DIO0_DISABLE)
238 
242 #define DL_GPIO_PIN_0_EDGE_RISE (GPIO_POLARITY15_0_DIO0_RISE)
243 
247 #define DL_GPIO_PIN_0_EDGE_FALL (GPIO_POLARITY15_0_DIO0_FALL)
248 
252 #define DL_GPIO_PIN_0_EDGE_RISE_FALL (GPIO_POLARITY15_0_DIO0_RISE_FALL)
253 
257 #define DL_GPIO_PIN_1_EDGE_DISABLE (GPIO_POLARITY15_0_DIO1_DISABLE)
258 
262 #define DL_GPIO_PIN_1_EDGE_RISE (GPIO_POLARITY15_0_DIO1_RISE)
263 
267 #define DL_GPIO_PIN_1_EDGE_FALL (GPIO_POLARITY15_0_DIO1_FALL)
268 
272 #define DL_GPIO_PIN_1_EDGE_RISE_FALL (GPIO_POLARITY15_0_DIO1_RISE_FALL)
273 
277 #define DL_GPIO_PIN_2_EDGE_DISABLE (GPIO_POLARITY15_0_DIO2_DISABLE)
278 
282 #define DL_GPIO_PIN_2_EDGE_RISE (GPIO_POLARITY15_0_DIO2_RISE)
283 
287 #define DL_GPIO_PIN_2_EDGE_FALL (GPIO_POLARITY15_0_DIO2_FALL)
288 
292 #define DL_GPIO_PIN_2_EDGE_RISE_FALL (GPIO_POLARITY15_0_DIO2_RISE_FALL)
293 
297 #define DL_GPIO_PIN_3_EDGE_DISABLE (GPIO_POLARITY15_0_DIO3_DISABLE)
298 
302 #define DL_GPIO_PIN_3_EDGE_RISE (GPIO_POLARITY15_0_DIO3_RISE)
303 
307 #define DL_GPIO_PIN_3_EDGE_FALL (GPIO_POLARITY15_0_DIO3_FALL)
308 
312 #define DL_GPIO_PIN_3_EDGE_RISE_FALL (GPIO_POLARITY15_0_DIO3_RISE_FALL)
313 
317 #define DL_GPIO_PIN_4_EDGE_DISABLE (GPIO_POLARITY15_0_DIO4_DISABLE)
318 
322 #define DL_GPIO_PIN_4_EDGE_RISE (GPIO_POLARITY15_0_DIO4_RISE)
323 
327 #define DL_GPIO_PIN_4_EDGE_FALL (GPIO_POLARITY15_0_DIO4_FALL)
328 
332 #define DL_GPIO_PIN_4_EDGE_RISE_FALL (GPIO_POLARITY15_0_DIO4_RISE_FALL)
333 
337 #define DL_GPIO_PIN_5_EDGE_DISABLE (GPIO_POLARITY15_0_DIO5_DISABLE)
338 
342 #define DL_GPIO_PIN_5_EDGE_RISE (GPIO_POLARITY15_0_DIO5_RISE)
343 
347 #define DL_GPIO_PIN_5_EDGE_FALL (GPIO_POLARITY15_0_DIO5_FALL)
348 
352 #define DL_GPIO_PIN_5_EDGE_RISE_FALL (GPIO_POLARITY15_0_DIO5_RISE_FALL)
353 
357 #define DL_GPIO_PIN_6_EDGE_DISABLE (GPIO_POLARITY15_0_DIO6_DISABLE)
358 
362 #define DL_GPIO_PIN_6_EDGE_RISE (GPIO_POLARITY15_0_DIO6_RISE)
363 
367 #define DL_GPIO_PIN_6_EDGE_FALL (GPIO_POLARITY15_0_DIO6_FALL)
368 
372 #define DL_GPIO_PIN_6_EDGE_RISE_FALL (GPIO_POLARITY15_0_DIO6_RISE_FALL)
373 
377 #define DL_GPIO_PIN_7_EDGE_DISABLE (GPIO_POLARITY15_0_DIO7_DISABLE)
378 
382 #define DL_GPIO_PIN_7_EDGE_RISE (GPIO_POLARITY15_0_DIO7_RISE)
383 
387 #define DL_GPIO_PIN_7_EDGE_FALL (GPIO_POLARITY15_0_DIO7_FALL)
388 
392 #define DL_GPIO_PIN_7_EDGE_RISE_FALL (GPIO_POLARITY15_0_DIO7_RISE_FALL)
393 
397 #define DL_GPIO_PIN_8_EDGE_DISABLE (GPIO_POLARITY15_0_DIO8_DISABLE)
398 
402 #define DL_GPIO_PIN_8_EDGE_RISE (GPIO_POLARITY15_0_DIO8_RISE)
403 
407 #define DL_GPIO_PIN_8_EDGE_FALL (GPIO_POLARITY15_0_DIO8_FALL)
408 
412 #define DL_GPIO_PIN_8_EDGE_RISE_FALL (GPIO_POLARITY15_0_DIO8_RISE_FALL)
413 
417 #define DL_GPIO_PIN_9_EDGE_DISABLE (GPIO_POLARITY15_0_DIO9_DISABLE)
418 
422 #define DL_GPIO_PIN_9_EDGE_RISE (GPIO_POLARITY15_0_DIO9_RISE)
423 
427 #define DL_GPIO_PIN_9_EDGE_FALL (GPIO_POLARITY15_0_DIO9_FALL)
428 
432 #define DL_GPIO_PIN_9_EDGE_RISE_FALL (GPIO_POLARITY15_0_DIO9_RISE_FALL)
433 
437 #define DL_GPIO_PIN_10_EDGE_DISABLE (GPIO_POLARITY15_0_DIO10_DISABLE)
438 
442 #define DL_GPIO_PIN_10_EDGE_RISE (GPIO_POLARITY15_0_DIO10_RISE)
443 
447 #define DL_GPIO_PIN_10_EDGE_FALL (GPIO_POLARITY15_0_DIO10_FALL)
448 
452 #define DL_GPIO_PIN_10_EDGE_RISE_FALL (GPIO_POLARITY15_0_DIO10_RISE_FALL)
453 
457 #define DL_GPIO_PIN_11_EDGE_DISABLE (GPIO_POLARITY15_0_DIO11_DISABLE)
458 
462 #define DL_GPIO_PIN_11_EDGE_RISE (GPIO_POLARITY15_0_DIO11_RISE)
463 
467 #define DL_GPIO_PIN_11_EDGE_FALL (GPIO_POLARITY15_0_DIO11_FALL)
468 
472 #define DL_GPIO_PIN_11_EDGE_RISE_FALL (GPIO_POLARITY15_0_DIO11_RISE_FALL)
473 
477 #define DL_GPIO_PIN_12_EDGE_DISABLE (GPIO_POLARITY15_0_DIO12_DISABLE)
478 
482 #define DL_GPIO_PIN_12_EDGE_RISE (GPIO_POLARITY15_0_DIO12_RISE)
483 
487 #define DL_GPIO_PIN_12_EDGE_FALL (GPIO_POLARITY15_0_DIO12_FALL)
488 
492 #define DL_GPIO_PIN_12_EDGE_RISE_FALL (GPIO_POLARITY15_0_DIO12_RISE_FALL)
493 
497 #define DL_GPIO_PIN_13_EDGE_DISABLE (GPIO_POLARITY15_0_DIO13_DISABLE)
498 
502 #define DL_GPIO_PIN_13_EDGE_RISE (GPIO_POLARITY15_0_DIO13_RISE)
503 
507 #define DL_GPIO_PIN_13_EDGE_FALL (GPIO_POLARITY15_0_DIO13_FALL)
508 
512 #define DL_GPIO_PIN_13_EDGE_RISE_FALL (GPIO_POLARITY15_0_DIO13_RISE_FALL)
513 
517 #define DL_GPIO_PIN_14_EDGE_DISABLE (GPIO_POLARITY15_0_DIO14_DISABLE)
518 
522 #define DL_GPIO_PIN_14_EDGE_RISE (GPIO_POLARITY15_0_DIO14_RISE)
523 
527 #define DL_GPIO_PIN_14_EDGE_FALL (GPIO_POLARITY15_0_DIO14_FALL)
528 
532 #define DL_GPIO_PIN_14_EDGE_RISE_FALL (GPIO_POLARITY15_0_DIO14_RISE_FALL)
533 
537 #define DL_GPIO_PIN_15_EDGE_DISABLE (GPIO_POLARITY15_0_DIO15_DISABLE)
538 
542 #define DL_GPIO_PIN_15_EDGE_RISE (GPIO_POLARITY15_0_DIO15_RISE)
543 
547 #define DL_GPIO_PIN_15_EDGE_FALL (GPIO_POLARITY15_0_DIO15_FALL)
548 
552 #define DL_GPIO_PIN_15_EDGE_RISE_FALL (GPIO_POLARITY15_0_DIO15_RISE_FALL)
553 
557 #define DL_GPIO_PIN_16_EDGE_DISABLE (GPIO_POLARITY31_16_DIO16_DISABLE)
558 
562 #define DL_GPIO_PIN_16_EDGE_RISE (GPIO_POLARITY31_16_DIO16_RISE)
563 
567 #define DL_GPIO_PIN_16_EDGE_FALL (GPIO_POLARITY31_16_DIO16_FALL)
568 
572 #define DL_GPIO_PIN_16_EDGE_RISE_FALL (GPIO_POLARITY31_16_DIO16_RISE_FALL)
573 
577 #define DL_GPIO_PIN_17_EDGE_DISABLE (GPIO_POLARITY31_16_DIO17_DISABLE)
578 
582 #define DL_GPIO_PIN_17_EDGE_RISE (GPIO_POLARITY31_16_DIO17_RISE)
583 
587 #define DL_GPIO_PIN_17_EDGE_FALL (GPIO_POLARITY31_16_DIO17_FALL)
588 
592 #define DL_GPIO_PIN_17_EDGE_RISE_FALL (GPIO_POLARITY31_16_DIO17_RISE_FALL)
593 
597 #define DL_GPIO_PIN_18_EDGE_DISABLE (GPIO_POLARITY31_16_DIO18_DISABLE)
598 
602 #define DL_GPIO_PIN_18_EDGE_RISE (GPIO_POLARITY31_16_DIO18_RISE)
603 
607 #define DL_GPIO_PIN_18_EDGE_FALL (GPIO_POLARITY31_16_DIO18_FALL)
608 
612 #define DL_GPIO_PIN_18_EDGE_RISE_FALL (GPIO_POLARITY31_16_DIO18_RISE_FALL)
613 
617 #define DL_GPIO_PIN_19_EDGE_DISABLE (GPIO_POLARITY31_16_DIO19_DISABLE)
618 
622 #define DL_GPIO_PIN_19_EDGE_RISE (GPIO_POLARITY31_16_DIO19_RISE)
623 
627 #define DL_GPIO_PIN_19_EDGE_FALL (GPIO_POLARITY31_16_DIO19_FALL)
628 
632 #define DL_GPIO_PIN_19_EDGE_RISE_FALL (GPIO_POLARITY31_16_DIO19_RISE_FALL)
633 
637 #define DL_GPIO_PIN_20_EDGE_DISABLE (GPIO_POLARITY31_16_DIO20_DISABLE)
638 
642 #define DL_GPIO_PIN_20_EDGE_RISE (GPIO_POLARITY31_16_DIO20_RISE)
643 
647 #define DL_GPIO_PIN_20_EDGE_FALL (GPIO_POLARITY31_16_DIO20_FALL)
648 
652 #define DL_GPIO_PIN_20_EDGE_RISE_FALL (GPIO_POLARITY31_16_DIO20_RISE_FALL)
653 
657 #define DL_GPIO_PIN_21_EDGE_DISABLE (GPIO_POLARITY31_16_DIO21_DISABLE)
658 
662 #define DL_GPIO_PIN_21_EDGE_RISE (GPIO_POLARITY31_16_DIO21_RISE)
663 
667 #define DL_GPIO_PIN_21_EDGE_FALL (GPIO_POLARITY31_16_DIO21_FALL)
668 
672 #define DL_GPIO_PIN_21_EDGE_RISE_FALL (GPIO_POLARITY31_16_DIO21_RISE_FALL)
673 
677 #define DL_GPIO_PIN_22_EDGE_DISABLE (GPIO_POLARITY31_16_DIO22_DISABLE)
678 
682 #define DL_GPIO_PIN_22_EDGE_RISE (GPIO_POLARITY31_16_DIO22_RISE)
683 
687 #define DL_GPIO_PIN_22_EDGE_FALL (GPIO_POLARITY31_16_DIO22_FALL)
688 
692 #define DL_GPIO_PIN_22_EDGE_RISE_FALL (GPIO_POLARITY31_16_DIO22_RISE_FALL)
693 
697 #define DL_GPIO_PIN_23_EDGE_DISABLE (GPIO_POLARITY31_16_DIO23_DISABLE)
698 
702 #define DL_GPIO_PIN_23_EDGE_RISE (GPIO_POLARITY31_16_DIO23_RISE)
703 
707 #define DL_GPIO_PIN_23_EDGE_FALL (GPIO_POLARITY31_16_DIO23_FALL)
708 
712 #define DL_GPIO_PIN_23_EDGE_RISE_FALL (GPIO_POLARITY31_16_DIO23_RISE_FALL)
713 
717 #define DL_GPIO_PIN_24_EDGE_DISABLE (GPIO_POLARITY31_16_DIO24_DISABLE)
718 
722 #define DL_GPIO_PIN_24_EDGE_RISE (GPIO_POLARITY31_16_DIO24_RISE)
723 
727 #define DL_GPIO_PIN_24_EDGE_FALL (GPIO_POLARITY31_16_DIO24_FALL)
728 
732 #define DL_GPIO_PIN_24_EDGE_RISE_FALL (GPIO_POLARITY31_16_DIO24_RISE_FALL)
733 
737 #define DL_GPIO_PIN_25_EDGE_DISABLE (GPIO_POLARITY31_16_DIO25_DISABLE)
738 
742 #define DL_GPIO_PIN_25_EDGE_RISE (GPIO_POLARITY31_16_DIO25_RISE)
743 
747 #define DL_GPIO_PIN_25_EDGE_FALL (GPIO_POLARITY31_16_DIO25_FALL)
748 
752 #define DL_GPIO_PIN_25_EDGE_RISE_FALL (GPIO_POLARITY31_16_DIO25_RISE_FALL)
753 
757 #define DL_GPIO_PIN_26_EDGE_DISABLE (GPIO_POLARITY31_16_DIO26_DISABLE)
758 
762 #define DL_GPIO_PIN_26_EDGE_RISE (GPIO_POLARITY31_16_DIO26_RISE)
763 
767 #define DL_GPIO_PIN_26_EDGE_FALL (GPIO_POLARITY31_16_DIO26_FALL)
768 
772 #define DL_GPIO_PIN_26_EDGE_RISE_FALL (GPIO_POLARITY31_16_DIO26_RISE_FALL)
773 
777 #define DL_GPIO_PIN_27_EDGE_DISABLE (GPIO_POLARITY31_16_DIO27_DISABLE)
778 
782 #define DL_GPIO_PIN_27_EDGE_RISE (GPIO_POLARITY31_16_DIO27_RISE)
783 
787 #define DL_GPIO_PIN_27_EDGE_FALL (GPIO_POLARITY31_16_DIO27_FALL)
788 
792 #define DL_GPIO_PIN_27_EDGE_RISE_FALL (GPIO_POLARITY31_16_DIO27_RISE_FALL)
793 
797 #define DL_GPIO_PIN_28_EDGE_DISABLE (GPIO_POLARITY31_16_DIO28_DISABLE)
798 
802 #define DL_GPIO_PIN_28_EDGE_RISE (GPIO_POLARITY31_16_DIO28_RISE)
803 
807 #define DL_GPIO_PIN_28_EDGE_FALL (GPIO_POLARITY31_16_DIO28_FALL)
808 
812 #define DL_GPIO_PIN_28_EDGE_RISE_FALL (GPIO_POLARITY31_16_DIO28_RISE_FALL)
813 
817 #define DL_GPIO_PIN_29_EDGE_DISABLE (GPIO_POLARITY31_16_DIO29_DISABLE)
818 
822 #define DL_GPIO_PIN_29_EDGE_RISE (GPIO_POLARITY31_16_DIO29_RISE)
823 
827 #define DL_GPIO_PIN_29_EDGE_FALL (GPIO_POLARITY31_16_DIO29_FALL)
828 
832 #define DL_GPIO_PIN_29_EDGE_RISE_FALL (GPIO_POLARITY31_16_DIO29_RISE_FALL)
833 
837 #define DL_GPIO_PIN_30_EDGE_DISABLE (GPIO_POLARITY31_16_DIO30_DISABLE)
838 
842 #define DL_GPIO_PIN_30_EDGE_RISE (GPIO_POLARITY31_16_DIO30_RISE)
843 
847 #define DL_GPIO_PIN_30_EDGE_FALL (GPIO_POLARITY31_16_DIO30_FALL)
848 
852 #define DL_GPIO_PIN_30_EDGE_RISE_FALL (GPIO_POLARITY31_16_DIO30_RISE_FALL)
853 
857 #define DL_GPIO_PIN_31_EDGE_DISABLE (GPIO_POLARITY31_16_DIO31_DISABLE)
858 
862 #define DL_GPIO_PIN_31_EDGE_RISE (GPIO_POLARITY31_16_DIO31_RISE)
863 
867 #define DL_GPIO_PIN_31_EDGE_FALL (GPIO_POLARITY31_16_DIO31_FALL)
868 
872 #define DL_GPIO_PIN_31_EDGE_RISE_FALL (GPIO_POLARITY31_16_DIO31_RISE_FALL)
873 
882 #define DL_GPIO_PIN_0_INPUT_FILTER_DISABLE (GPIO_FILTEREN15_0_DIN0_DISABLE)
883 
887 #define DL_GPIO_PIN_0_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN15_0_DIN0_ONE_CYCLE)
888 
892 #define DL_GPIO_PIN_0_INPUT_FILTER_3_CYCLES \
893  (GPIO_FILTEREN15_0_DIN0_THREE_CYCLE)
894 
898 #define DL_GPIO_PIN_0_INPUT_FILTER_8_CYCLES \
899  (GPIO_FILTEREN15_0_DIN0_EIGHT_CYCLE)
900 
904 #define DL_GPIO_PIN_1_INPUT_FILTER_DISABLE (GPIO_FILTEREN15_0_DIN1_DISABLE)
905 
909 #define DL_GPIO_PIN_1_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN15_0_DIN1_ONE_CYCLE)
910 
914 #define DL_GPIO_PIN_1_INPUT_FILTER_3_CYCLES \
915  (GPIO_FILTEREN15_0_DIN1_THREE_CYCLE)
916 
920 #define DL_GPIO_PIN_1_INPUT_FILTER_8_CYCLES \
921  (GPIO_FILTEREN15_0_DIN1_EIGHT_CYCLE)
922 
926 #define DL_GPIO_PIN_2_INPUT_FILTER_DISABLE (GPIO_FILTEREN15_0_DIN2_DISABLE)
927 
931 #define DL_GPIO_PIN_2_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN15_0_DIN2_ONE_CYCLE)
932 
936 #define DL_GPIO_PIN_2_INPUT_FILTER_3_CYCLES \
937  (GPIO_FILTEREN15_0_DIN2_THREE_CYCLE)
938 
942 #define DL_GPIO_PIN_2_INPUT_FILTER_8_CYCLES \
943  (GPIO_FILTEREN15_0_DIN2_EIGHT_CYCLE)
944 
948 #define DL_GPIO_PIN_3_INPUT_FILTER_DISABLE (GPIO_FILTEREN15_0_DIN3_DISABLE)
949 
953 #define DL_GPIO_PIN_3_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN15_0_DIN3_ONE_CYCLE)
954 
958 #define DL_GPIO_PIN_3_INPUT_FILTER_3_CYCLES \
959  (GPIO_FILTEREN15_0_DIN3_THREE_CYCLE)
960 
964 #define DL_GPIO_PIN_3_INPUT_FILTER_8_CYCLES \
965  (GPIO_FILTEREN15_0_DIN3_EIGHT_CYCLE)
966 
970 #define DL_GPIO_PIN_4_INPUT_FILTER_DISABLE (GPIO_FILTEREN15_0_DIN4_DISABLE)
971 
975 #define DL_GPIO_PIN_4_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN15_0_DIN4_ONE_CYCLE)
976 
980 #define DL_GPIO_PIN_4_INPUT_FILTER_3_CYCLES \
981  (GPIO_FILTEREN15_0_DIN4_THREE_CYCLE)
982 
986 #define DL_GPIO_PIN_4_INPUT_FILTER_8_CYCLES \
987  (GPIO_FILTEREN15_0_DIN4_EIGHT_CYCLE)
988 
992 #define DL_GPIO_PIN_5_INPUT_FILTER_DISABLE (GPIO_FILTEREN15_0_DIN5_DISABLE)
993 
997 #define DL_GPIO_PIN_5_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN15_0_DIN5_ONE_CYCLE)
998 
1002 #define DL_GPIO_PIN_5_INPUT_FILTER_3_CYCLES \
1003  (GPIO_FILTEREN15_0_DIN5_THREE_CYCLE)
1004 
1008 #define DL_GPIO_PIN_5_INPUT_FILTER_8_CYCLES \
1009  (GPIO_FILTEREN15_0_DIN5_EIGHT_CYCLE)
1010 
1014 #define DL_GPIO_PIN_6_INPUT_FILTER_DISABLE (GPIO_FILTEREN15_0_DIN6_DISABLE)
1015 
1019 #define DL_GPIO_PIN_6_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN15_0_DIN6_ONE_CYCLE)
1020 
1024 #define DL_GPIO_PIN_6_INPUT_FILTER_3_CYCLES \
1025  (GPIO_FILTEREN15_0_DIN6_THREE_CYCLE)
1026 
1030 #define DL_GPIO_PIN_6_INPUT_FILTER_8_CYCLES \
1031  (GPIO_FILTEREN15_0_DIN6_EIGHT_CYCLE)
1032 
1036 #define DL_GPIO_PIN_7_INPUT_FILTER_DISABLE (GPIO_FILTEREN15_0_DIN7_DISABLE)
1037 
1041 #define DL_GPIO_PIN_7_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN15_0_DIN7_ONE_CYCLE)
1042 
1046 #define DL_GPIO_PIN_7_INPUT_FILTER_3_CYCLES \
1047  (GPIO_FILTEREN15_0_DIN7_THREE_CYCLE)
1048 
1052 #define DL_GPIO_PIN_7_INPUT_FILTER_8_CYCLES \
1053  (GPIO_FILTEREN15_0_DIN7_EIGHT_CYCLE)
1054 
1058 #define DL_GPIO_PIN_8_INPUT_FILTER_DISABLE (GPIO_FILTEREN15_0_DIN8_DISABLE)
1059 
1063 #define DL_GPIO_PIN_8_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN15_0_DIN8_ONE_CYCLE)
1064 
1068 #define DL_GPIO_PIN_8_INPUT_FILTER_3_CYCLES \
1069  (GPIO_FILTEREN15_0_DIN8_THREE_CYCLE)
1070 
1074 #define DL_GPIO_PIN_8_INPUT_FILTER_8_CYCLES \
1075  (GPIO_FILTEREN15_0_DIN8_EIGHT_CYCLE)
1076 
1080 #define DL_GPIO_PIN_9_INPUT_FILTER_DISABLE (GPIO_FILTEREN15_0_DIN9_DISABLE)
1081 
1085 #define DL_GPIO_PIN_9_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN15_0_DIN9_ONE_CYCLE)
1086 
1090 #define DL_GPIO_PIN_9_INPUT_FILTER_3_CYCLES \
1091  (GPIO_FILTEREN15_0_DIN9_THREE_CYCLE)
1092 
1096 #define DL_GPIO_PIN_9_INPUT_FILTER_8_CYCLES \
1097  (GPIO_FILTEREN15_0_DIN9_EIGHT_CYCLE)
1098 
1102 #define DL_GPIO_PIN_10_INPUT_FILTER_DISABLE (GPIO_FILTEREN15_0_DIN10_DISABLE)
1103 
1107 #define DL_GPIO_PIN_10_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN15_0_DIN10_ONE_CYCLE)
1108 
1112 #define DL_GPIO_PIN_10_INPUT_FILTER_3_CYCLES \
1113  (GPIO_FILTEREN15_0_DIN10_THREE_CYCLE)
1114 
1118 #define DL_GPIO_PIN_10_INPUT_FILTER_8_CYCLES \
1119  (GPIO_FILTEREN15_0_DIN10_EIGHT_CYCLE)
1120 
1124 #define DL_GPIO_PIN_11_INPUT_FILTER_DISABLE (GPIO_FILTEREN15_0_DIN11_DISABLE)
1125 
1129 #define DL_GPIO_PIN_11_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN15_0_DIN11_ONE_CYCLE)
1130 
1134 #define DL_GPIO_PIN_11_INPUT_FILTER_3_CYCLES \
1135  (GPIO_FILTEREN15_0_DIN11_THREE_CYCLE)
1136 
1140 #define DL_GPIO_PIN_11_INPUT_FILTER_8_CYCLES \
1141  (GPIO_FILTEREN15_0_DIN11_EIGHT_CYCLE)
1142 
1146 #define DL_GPIO_PIN_12_INPUT_FILTER_DISABLE (GPIO_FILTEREN15_0_DIN12_DISABLE)
1147 
1151 #define DL_GPIO_PIN_12_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN15_0_DIN12_ONE_CYCLE)
1152 
1156 #define DL_GPIO_PIN_12_INPUT_FILTER_3_CYCLES \
1157  (GPIO_FILTEREN15_0_DIN12_THREE_CYCLE)
1158 
1162 #define DL_GPIO_PIN_12_INPUT_FILTER_8_CYCLES \
1163  (GPIO_FILTEREN15_0_DIN12_EIGHT_CYCLE)
1164 
1168 #define DL_GPIO_PIN_13_INPUT_FILTER_DISABLE (GPIO_FILTEREN15_0_DIN13_DISABLE)
1169 
1173 #define DL_GPIO_PIN_13_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN15_0_DIN13_ONE_CYCLE)
1174 
1178 #define DL_GPIO_PIN_13_INPUT_FILTER_3_CYCLES \
1179  (GPIO_FILTEREN15_0_DIN13_THREE_CYCLE)
1180 
1184 #define DL_GPIO_PIN_13_INPUT_FILTER_8_CYCLES \
1185  (GPIO_FILTEREN15_0_DIN13_EIGHT_CYCLE)
1186 
1190 #define DL_GPIO_PIN_14_INPUT_FILTER_DISABLE (GPIO_FILTEREN15_0_DIN14_DISABLE)
1191 
1195 #define DL_GPIO_PIN_14_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN15_0_DIN14_ONE_CYCLE)
1196 
1200 #define DL_GPIO_PIN_14_INPUT_FILTER_3_CYCLES \
1201  (GPIO_FILTEREN15_0_DIN14_THREE_CYCLE)
1202 
1206 #define DL_GPIO_PIN_14_INPUT_FILTER_8_CYCLES \
1207  (GPIO_FILTEREN15_0_DIN14_EIGHT_CYCLE)
1208 
1212 #define DL_GPIO_PIN_15_INPUT_FILTER_DISABLE (GPIO_FILTEREN15_0_DIN15_DISABLE)
1213 
1217 #define DL_GPIO_PIN_15_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN15_0_DIN15_ONE_CYCLE)
1218 
1222 #define DL_GPIO_PIN_15_INPUT_FILTER_3_CYCLES \
1223  (GPIO_FILTEREN15_0_DIN15_THREE_CYCLE)
1224 
1228 #define DL_GPIO_PIN_15_INPUT_FILTER_8_CYCLES \
1229  (GPIO_FILTEREN15_0_DIN15_EIGHT_CYCLE)
1230 
1234 #define DL_GPIO_PIN_16_INPUT_FILTER_DISABLE (GPIO_FILTEREN31_16_DIN16_DISABLE)
1235 
1239 #define DL_GPIO_PIN_16_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN31_16_DIN16_ONE_CYCLE)
1240 
1244 #define DL_GPIO_PIN_16_INPUT_FILTER_3_CYCLES \
1245  (GPIO_FILTEREN31_16_DIN16_THREE_CYCLE)
1246 
1250 #define DL_GPIO_PIN_16_INPUT_FILTER_8_CYCLES \
1251  (GPIO_FILTEREN31_16_DIN16_EIGHT_CYCLE)
1252 
1256 #define DL_GPIO_PIN_17_INPUT_FILTER_DISABLE (GPIO_FILTEREN31_16_DIN17_DISABLE)
1257 
1261 #define DL_GPIO_PIN_17_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN31_16_DIN17_ONE_CYCLE)
1262 
1266 #define DL_GPIO_PIN_17_INPUT_FILTER_3_CYCLES \
1267  (GPIO_FILTEREN31_16_DIN17_THREE_CYCLE)
1268 
1272 #define DL_GPIO_PIN_17_INPUT_FILTER_8_CYCLES \
1273  (GPIO_FILTEREN31_16_DIN17_EIGHT_CYCLE)
1274 
1278 #define DL_GPIO_PIN_18_INPUT_FILTER_DISABLE (GPIO_FILTEREN31_16_DIN18_DISABLE)
1279 
1283 #define DL_GPIO_PIN_18_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN31_16_DIN18_ONE_CYCLE)
1284 
1288 #define DL_GPIO_PIN_18_INPUT_FILTER_3_CYCLES \
1289  (GPIO_FILTEREN31_16_DIN18_THREE_CYCLE)
1290 
1294 #define DL_GPIO_PIN_18_INPUT_FILTER_8_CYCLES \
1295  (GPIO_FILTEREN31_16_DIN18_EIGHT_CYCLE)
1296 
1300 #define DL_GPIO_PIN_19_INPUT_FILTER_DISABLE (GPIO_FILTEREN31_16_DIN19_DISABLE)
1301 
1305 #define DL_GPIO_PIN_19_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN31_16_DIN19_ONE_CYCLE)
1306 
1310 #define DL_GPIO_PIN_19_INPUT_FILTER_3_CYCLES \
1311  (GPIO_FILTEREN31_16_DIN19_THREE_CYCLE)
1312 
1316 #define DL_GPIO_PIN_19_INPUT_FILTER_8_CYCLES \
1317  (GPIO_FILTEREN31_16_DIN19_EIGHT_CYCLE)
1318 
1322 #define DL_GPIO_PIN_20_INPUT_FILTER_DISABLE (GPIO_FILTEREN31_16_DIN20_DISABLE)
1323 
1327 #define DL_GPIO_PIN_20_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN31_16_DIN20_ONE_CYCLE)
1328 
1332 #define DL_GPIO_PIN_20_INPUT_FILTER_3_CYCLES \
1333  (GPIO_FILTEREN31_16_DIN20_THREE_CYCLE)
1334 
1338 #define DL_GPIO_PIN_20_INPUT_FILTER_8_CYCLES \
1339  (GPIO_FILTEREN31_16_DIN20_EIGHT_CYCLE)
1340 
1344 #define DL_GPIO_PIN_21_INPUT_FILTER_DISABLE (GPIO_FILTEREN31_16_DIN21_DISABLE)
1345 
1349 #define DL_GPIO_PIN_21_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN31_16_DIN21_ONE_CYCLE)
1350 
1354 #define DL_GPIO_PIN_21_INPUT_FILTER_3_CYCLES \
1355  (GPIO_FILTEREN31_16_DIN21_THREE_CYCLE)
1356 
1360 #define DL_GPIO_PIN_21_INPUT_FILTER_8_CYCLES \
1361  (GPIO_FILTEREN31_16_DIN21_EIGHT_CYCLE)
1362 
1366 #define DL_GPIO_PIN_22_INPUT_FILTER_DISABLE (GPIO_FILTEREN31_16_DIN22_DISABLE)
1367 
1371 #define DL_GPIO_PIN_22_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN31_16_DIN22_ONE_CYCLE)
1372 
1376 #define DL_GPIO_PIN_22_INPUT_FILTER_3_CYCLES \
1377  (GPIO_FILTEREN31_16_DIN22_THREE_CYCLE)
1378 
1382 #define DL_GPIO_PIN_22_INPUT_FILTER_8_CYCLES \
1383  (GPIO_FILTEREN31_16_DIN22_EIGHT_CYCLE)
1384 
1388 #define DL_GPIO_PIN_23_INPUT_FILTER_DISABLE (GPIO_FILTEREN31_16_DIN23_DISABLE)
1389 
1393 #define DL_GPIO_PIN_23_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN31_16_DIN23_ONE_CYCLE)
1394 
1398 #define DL_GPIO_PIN_23_INPUT_FILTER_3_CYCLES \
1399  (GPIO_FILTEREN31_16_DIN23_THREE_CYCLE)
1400 
1404 #define DL_GPIO_PIN_23_INPUT_FILTER_8_CYCLES \
1405  (GPIO_FILTEREN31_16_DIN23_EIGHT_CYCLE)
1406 
1410 #define DL_GPIO_PIN_24_INPUT_FILTER_DISABLE (GPIO_FILTEREN31_16_DIN24_DISABLE)
1411 
1415 #define DL_GPIO_PIN_24_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN31_16_DIN24_ONE_CYCLE)
1416 
1420 #define DL_GPIO_PIN_24_INPUT_FILTER_3_CYCLES \
1421  (GPIO_FILTEREN31_16_DIN24_THREE_CYCLE)
1422 
1426 #define DL_GPIO_PIN_24_INPUT_FILTER_8_CYCLES \
1427  (GPIO_FILTEREN31_16_DIN24_EIGHT_CYCLE)
1428 
1432 #define DL_GPIO_PIN_25_INPUT_FILTER_DISABLE (GPIO_FILTEREN31_16_DIN25_DISABLE)
1433 
1437 #define DL_GPIO_PIN_25_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN31_16_DIN25_ONE_CYCLE)
1438 
1442 #define DL_GPIO_PIN_25_INPUT_FILTER_3_CYCLES \
1443  (GPIO_FILTEREN31_16_DIN25_THREE_CYCLE)
1444 
1448 #define DL_GPIO_PIN_25_INPUT_FILTER_8_CYCLES \
1449  (GPIO_FILTEREN31_16_DIN25_EIGHT_CYCLE)
1450 
1454 #define DL_GPIO_PIN_26_INPUT_FILTER_DISABLE (GPIO_FILTEREN31_16_DIN26_DISABLE)
1455 
1459 #define DL_GPIO_PIN_26_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN31_16_DIN26_ONE_CYCLE)
1460 
1464 #define DL_GPIO_PIN_26_INPUT_FILTER_3_CYCLES \
1465  (GPIO_FILTEREN31_16_DIN26_THREE_CYCLE)
1466 
1470 #define DL_GPIO_PIN_26_INPUT_FILTER_8_CYCLES \
1471  (GPIO_FILTEREN31_16_DIN26_EIGHT_CYCLE)
1472 
1476 #define DL_GPIO_PIN_27_INPUT_FILTER_DISABLE (GPIO_FILTEREN31_16_DIN27_DISABLE)
1477 
1481 #define DL_GPIO_PIN_27_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN31_16_DIN27_ONE_CYCLE)
1482 
1486 #define DL_GPIO_PIN_27_INPUT_FILTER_3_CYCLES \
1487  (GPIO_FILTEREN31_16_DIN27_THREE_CYCLE)
1488 
1492 #define DL_GPIO_PIN_27_INPUT_FILTER_8_CYCLES \
1493  (GPIO_FILTEREN31_16_DIN27_EIGHT_CYCLE)
1494 
1498 #define DL_GPIO_PIN_28_INPUT_FILTER_DISABLE (GPIO_FILTEREN31_16_DIN28_DISABLE)
1499 
1503 #define DL_GPIO_PIN_28_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN31_16_DIN28_ONE_CYCLE)
1504 
1508 #define DL_GPIO_PIN_28_INPUT_FILTER_3_CYCLES \
1509  (GPIO_FILTEREN31_16_DIN28_THREE_CYCLE)
1510 
1514 #define DL_GPIO_PIN_28_INPUT_FILTER_8_CYCLES \
1515  (GPIO_FILTEREN31_16_DIN28_EIGHT_CYCLE)
1516 
1520 #define DL_GPIO_PIN_29_INPUT_FILTER_DISABLE (GPIO_FILTEREN31_16_DIN29_DISABLE)
1521 
1525 #define DL_GPIO_PIN_29_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN31_16_DIN29_ONE_CYCLE)
1526 
1530 #define DL_GPIO_PIN_29_INPUT_FILTER_3_CYCLES \
1531  (GPIO_FILTEREN31_16_DIN29_THREE_CYCLE)
1532 
1536 #define DL_GPIO_PIN_29_INPUT_FILTER_8_CYCLES \
1537  (GPIO_FILTEREN31_16_DIN29_EIGHT_CYCLE)
1538 
1542 #define DL_GPIO_PIN_30_INPUT_FILTER_DISABLE (GPIO_FILTEREN31_16_DIN30_DISABLE)
1543 
1547 #define DL_GPIO_PIN_30_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN31_16_DIN30_ONE_CYCLE)
1548 
1552 #define DL_GPIO_PIN_30_INPUT_FILTER_3_CYCLES \
1553  (GPIO_FILTEREN31_16_DIN30_THREE_CYCLE)
1554 
1558 #define DL_GPIO_PIN_30_INPUT_FILTER_8_CYCLES \
1559  (GPIO_FILTEREN31_16_DIN30_EIGHT_CYCLE)
1560 
1564 #define DL_GPIO_PIN_31_INPUT_FILTER_DISABLE (GPIO_FILTEREN31_16_DIN31_DISABLE)
1565 
1569 #define DL_GPIO_PIN_31_INPUT_FILTER_1_CYCLE (GPIO_FILTEREN31_16_DIN31_ONE_CYCLE)
1570 
1574 #define DL_GPIO_PIN_31_INPUT_FILTER_3_CYCLES \
1575  (GPIO_FILTEREN31_16_DIN31_THREE_CYCLE)
1576 
1580 #define DL_GPIO_PIN_31_INPUT_FILTER_8_CYCLES \
1581  (GPIO_FILTEREN31_16_DIN31_EIGHT_CYCLE)
1582 
1585 /* clang-format on */
1586 
1588 typedef enum {
1590  DL_GPIO_INVERSION_ENABLE = IOMUX_PINCM_INV_ENABLE,
1592  DL_GPIO_INVERSION_DISABLE = IOMUX_PINCM_INV_DISABLE,
1594 
1596 typedef enum {
1598  DL_GPIO_DRIVE_STRENGTH_LOW = IOMUX_PINCM_DRV_DRVVAL0,
1600  DL_GPIO_DRIVE_STRENGTH_HIGH = IOMUX_PINCM_DRV_DRVVAL1,
1602 
1604 typedef enum {
1607  (IOMUX_PINCM_PIPU_DISABLE | IOMUX_PINCM_PIPD_DISABLE),
1608 
1611  (IOMUX_PINCM_PIPU_ENABLE | IOMUX_PINCM_PIPD_DISABLE),
1612 
1615  (IOMUX_PINCM_PIPU_DISABLE | IOMUX_PINCM_PIPD_ENABLE)
1617 
1619 typedef enum {
1621  DL_GPIO_HYSTERESIS_ENABLE = IOMUX_PINCM_HYSTEN_ENABLE,
1623  DL_GPIO_HYSTERESIS_DISABLE = IOMUX_PINCM_HYSTEN_DISABLE,
1625 
1627 typedef enum {
1629  DL_GPIO_WAKEUP_ENABLE = IOMUX_PINCM_WUEN_ENABLE,
1631  DL_GPIO_WAKEUP_DISABLE = IOMUX_PINCM_WUEN_DISABLE,
1633  DL_GPIO_WAKEUP_ON_0 = (IOMUX_PINCM_WUEN_ENABLE | IOMUX_PINCM_WCOMP_MATCH0),
1635  DL_GPIO_WAKEUP_ON_1 = (IOMUX_PINCM_WUEN_ENABLE | IOMUX_PINCM_WCOMP_MATCH1),
1636 } DL_GPIO_WAKEUP;
1637 
1639 typedef enum {
1641  DL_GPIO_WAKEUP_COMPARE_VALUE_0 = IOMUX_PINCM_WCOMP_MATCH0,
1643  DL_GPIO_WAKEUP_COMPARE_VALUE_1 = IOMUX_PINCM_WCOMP_MATCH1,
1645 
1647 typedef enum {
1649  DL_GPIO_HIZ_ENABLE = IOMUX_PINCM_HIZ1_ENABLE,
1651  DL_GPIO_HIZ_DISABLE = IOMUX_PINCM_HIZ1_DISABLE,
1652 } DL_GPIO_HIZ;
1653 
1655 typedef enum {
1661 
1663 typedef enum {
1669 
1671 typedef enum {
1677 
1679 typedef enum {
1681  DL_GPIO_SUBSCRIBER_OUT_POLICY_SET = GPIO_SUB0CFG_OUTPOLICY_SET,
1683  DL_GPIO_SUBSCRIBER_OUT_POLICY_CLEAR = GPIO_SUB0CFG_OUTPOLICY_CLR,
1685  DL_GPIO_SUBSCRIBER_OUT_POLICY_TOGGLE = GPIO_SUB0CFG_OUTPOLICY_TOGGLE
1687 
1689 typedef enum {
1755 
1757 typedef enum {
1759  DL_GPIO_IIDX_NO_INTR = GPIO_CPU_INT_IIDX_STAT_NO_INTR,
1761  DL_GPIO_IIDX_DIO0 = GPIO_CPU_INT_IIDX_STAT_DIO0,
1763  DL_GPIO_IIDX_DIO1 = GPIO_CPU_INT_IIDX_STAT_DIO1,
1765  DL_GPIO_IIDX_DIO2 = GPIO_CPU_INT_IIDX_STAT_DIO2,
1767  DL_GPIO_IIDX_DIO3 = GPIO_CPU_INT_IIDX_STAT_DIO3,
1769  DL_GPIO_IIDX_DIO4 = GPIO_CPU_INT_IIDX_STAT_DIO4,
1771  DL_GPIO_IIDX_DIO5 = GPIO_CPU_INT_IIDX_STAT_DIO5,
1773  DL_GPIO_IIDX_DIO6 = GPIO_CPU_INT_IIDX_STAT_DIO6,
1775  DL_GPIO_IIDX_DIO7 = GPIO_CPU_INT_IIDX_STAT_DIO7,
1777  DL_GPIO_IIDX_DIO8 = GPIO_CPU_INT_IIDX_STAT_DIO8,
1779  DL_GPIO_IIDX_DIO9 = GPIO_CPU_INT_IIDX_STAT_DIO9,
1781  DL_GPIO_IIDX_DIO10 = GPIO_CPU_INT_IIDX_STAT_DIO10,
1783  DL_GPIO_IIDX_DIO11 = GPIO_CPU_INT_IIDX_STAT_DIO11,
1785  DL_GPIO_IIDX_DIO12 = GPIO_CPU_INT_IIDX_STAT_DIO12,
1787  DL_GPIO_IIDX_DIO13 = GPIO_CPU_INT_IIDX_STAT_DIO13,
1789  DL_GPIO_IIDX_DIO14 = GPIO_CPU_INT_IIDX_STAT_DIO14,
1791  DL_GPIO_IIDX_DIO15 = GPIO_CPU_INT_IIDX_STAT_DIO15,
1793  DL_GPIO_IIDX_DIO16 = GPIO_CPU_INT_IIDX_STAT_DIO16,
1795  DL_GPIO_IIDX_DIO17 = GPIO_CPU_INT_IIDX_STAT_DIO17,
1797  DL_GPIO_IIDX_DIO18 = GPIO_CPU_INT_IIDX_STAT_DIO18,
1799  DL_GPIO_IIDX_DIO19 = GPIO_CPU_INT_IIDX_STAT_DIO19,
1801  DL_GPIO_IIDX_DIO20 = GPIO_CPU_INT_IIDX_STAT_DIO20,
1803  DL_GPIO_IIDX_DIO21 = GPIO_CPU_INT_IIDX_STAT_DIO21,
1805  DL_GPIO_IIDX_DIO22 = GPIO_CPU_INT_IIDX_STAT_DIO22,
1807  DL_GPIO_IIDX_DIO23 = GPIO_CPU_INT_IIDX_STAT_DIO23,
1809  DL_GPIO_IIDX_DIO24 = GPIO_CPU_INT_IIDX_STAT_DIO24,
1811  DL_GPIO_IIDX_DIO25 = GPIO_CPU_INT_IIDX_STAT_DIO25,
1813  DL_GPIO_IIDX_DIO26 = GPIO_CPU_INT_IIDX_STAT_DIO26,
1815  DL_GPIO_IIDX_DIO27 = GPIO_CPU_INT_IIDX_STAT_DIO27,
1817  DL_GPIO_IIDX_DIO28 = GPIO_CPU_INT_IIDX_STAT_DIO28,
1819  DL_GPIO_IIDX_DIO29 = GPIO_CPU_INT_IIDX_STAT_DIO29,
1821  DL_GPIO_IIDX_DIO30 = GPIO_CPU_INT_IIDX_STAT_DIO30,
1823  DL_GPIO_IIDX_DIO31 = GPIO_CPU_INT_IIDX_STAT_DIO31
1824 } DL_GPIO_IIDX;
1825 
1835 __STATIC_INLINE void DL_GPIO_enablePower(GPIO_Regs* gpio)
1836 {
1837  gpio->GPRCM.PWREN = (GPIO_PWREN_KEY_UNLOCK_W | GPIO_PWREN_ENABLE_ENABLE);
1838 }
1839 
1850 __STATIC_INLINE void DL_GPIO_disablePower(GPIO_Regs* gpio)
1851 {
1852  gpio->GPRCM.PWREN = (GPIO_PWREN_KEY_UNLOCK_W | GPIO_PWREN_ENABLE_DISABLE);
1853 }
1854 
1871 __STATIC_INLINE bool DL_GPIO_isPowerEnabled(GPIO_Regs* gpio)
1872 {
1873  return ((gpio->GPRCM.PWREN & GPIO_PWREN_ENABLE_MASK) ==
1874  GPIO_PWREN_ENABLE_ENABLE);
1875 }
1876 
1882 __STATIC_INLINE void DL_GPIO_reset(GPIO_Regs* gpio)
1883 {
1884  gpio->GPRCM.RSTCTL =
1885  (GPIO_RSTCTL_KEY_UNLOCK_W | GPIO_RSTCTL_RESETSTKYCLR_CLR |
1886  GPIO_RSTCTL_RESETASSERT_ASSERT);
1887 }
1888 
1898 __STATIC_INLINE bool DL_GPIO_isReset(GPIO_Regs* gpio)
1899 {
1900  return ((gpio->GPRCM.STAT & GPIO_STAT_RESETSTKY_MASK) ==
1901  GPIO_STAT_RESETSTKY_RESET);
1902 }
1903 
1910 __STATIC_INLINE void DL_GPIO_initDigitalOutput(uint32_t pincmIndex)
1911 {
1912  /* GPIO functionality is always a pin function of 0x00000001 */
1913  IOMUX->SECCFG.PINCM[pincmIndex] =
1914  (IOMUX_PINCM_PC_CONNECTED | ((uint32_t) 0x00000001));
1915 }
1916 
1931 __STATIC_INLINE void DL_GPIO_initDigitalOutputFeatures(uint32_t pincmIndex,
1932  DL_GPIO_INVERSION inversion, DL_GPIO_RESISTOR internalResistor,
1933  DL_GPIO_DRIVE_STRENGTH driveStrength, DL_GPIO_HIZ hiZ)
1934 {
1935  /* GPIO functionality is always a pin function of 0x00000001 */
1936  IOMUX->SECCFG.PINCM[pincmIndex] =
1937  IOMUX_PINCM_PC_CONNECTED | ((uint32_t) 0x00000001) |
1938  (uint32_t) inversion | (uint32_t) internalResistor |
1939  (uint32_t) driveStrength | (uint32_t) hiZ;
1940 }
1941 
1951  uint32_t pincmIndex, DL_GPIO_RESISTOR internalResistor)
1952 {
1953  /* GPIO functionality is always a pin function of 0x00000001 */
1954  IOMUX->SECCFG.PINCM[pincmIndex] = IOMUX_PINCM_PC_CONNECTED |
1955  ((uint32_t) 0x00000001) |
1956  (uint32_t) internalResistor;
1957 }
1958 
1959 // TODO: verify no need to add input/output variable for the Input/Output enebale functionality
1969  uint32_t pincmIndex, DL_GPIO_RESISTOR internalResistor)
1970 {
1971  /* GPIO functionality is always a pin function of 0x00000001 */
1972  /* For analog use case, setting IOMUX input enable */
1973  IOMUX->SECCFG.PINCM[pincmIndex] =
1974  IOMUX_PINCM_INENA_ENABLE | IOMUX_PINCM_PC_UNCONNECTED |
1975  ((uint32_t) 0x00000001) | (uint32_t) internalResistor;
1976 }
1977 
1987 __STATIC_INLINE void DL_GPIO_initDigitalInput(uint32_t pincmIndex)
1988 {
1989  /* GPIO functionality is always a pin function of 0x00000001 */
1990  IOMUX->SECCFG.PINCM[pincmIndex] = IOMUX_PINCM_INENA_ENABLE |
1991  IOMUX_PINCM_PC_CONNECTED |
1992  ((uint32_t) 0x00000001);
1993 }
1994 
2009 __STATIC_INLINE void DL_GPIO_initDigitalInputFeatures(uint32_t pincmIndex,
2010  DL_GPIO_INVERSION inversion, DL_GPIO_RESISTOR internalResistor,
2011  DL_GPIO_HYSTERESIS hysteresis, DL_GPIO_WAKEUP wakeup)
2012 {
2013  /* GPIO functionality is always a pin function of 0x00000001 */
2014  IOMUX->SECCFG.PINCM[pincmIndex] =
2015  IOMUX_PINCM_INENA_ENABLE | IOMUX_PINCM_PC_CONNECTED |
2016  ((uint32_t) 0x00000001) | (uint32_t) inversion |
2017  (uint32_t) internalResistor | (uint32_t) hysteresis |
2018  (uint32_t) wakeup;
2019 }
2020 
2029 __STATIC_INLINE void DL_GPIO_initPeripheralFunction(
2030  uint32_t pincmIndex, uint32_t function)
2031 {
2032  IOMUX->SECCFG.PINCM[pincmIndex] = function | IOMUX_PINCM_PC_CONNECTED;
2033 }
2034 
2044  uint32_t pincmIndex, uint32_t function)
2045 {
2046  IOMUX->SECCFG.PINCM[pincmIndex] = function | IOMUX_PINCM_PC_CONNECTED;
2047 }
2048 
2067  uint32_t pincmIndex, uint32_t function, DL_GPIO_INVERSION inversion,
2068  DL_GPIO_RESISTOR internalResistor, DL_GPIO_DRIVE_STRENGTH driveStrength,
2069  DL_GPIO_HIZ hiZ)
2070 {
2071  IOMUX->SECCFG.PINCM[pincmIndex] =
2072  function | IOMUX_PINCM_PC_CONNECTED | (uint32_t) inversion |
2073  (uint32_t) internalResistor | (uint32_t) driveStrength |
2074  (uint32_t) hiZ;
2075 }
2076 
2086  uint32_t pincmIndex, uint32_t function)
2087 {
2088  IOMUX->SECCFG.PINCM[pincmIndex] =
2089  function | IOMUX_PINCM_PC_CONNECTED | IOMUX_PINCM_INENA_ENABLE;
2090 }
2091 
2109  uint32_t pincmIndex, uint32_t function, DL_GPIO_INVERSION inversion,
2110  DL_GPIO_RESISTOR internalResistor, DL_GPIO_HYSTERESIS hysteresis,
2111  DL_GPIO_WAKEUP wakeup)
2112 {
2113  IOMUX->SECCFG.PINCM[pincmIndex] =
2114  function | IOMUX_PINCM_PC_CONNECTED | IOMUX_PINCM_INENA_ENABLE |
2115  (uint32_t) inversion | (uint32_t) internalResistor |
2116  (uint32_t) hysteresis | (uint32_t) wakeup;
2117 }
2118 
2126 __STATIC_INLINE void DL_GPIO_initPeripheralAnalogFunction(uint32_t pincmIndex)
2127 {
2128  IOMUX->SECCFG.PINCM[pincmIndex] = IOMUX_PINCM_PC_UNCONNECTED;
2129 }
2130 
2138 __STATIC_INLINE void DL_GPIO_enableWakeUp(uint32_t pincmIndex)
2139 {
2140  IOMUX->SECCFG.PINCM[pincmIndex] |= DL_GPIO_WAKEUP_ENABLE;
2141 }
2142 
2150 __STATIC_INLINE void DL_GPIO_disableWakeUp(uint32_t pincmIndex)
2151 {
2152  IOMUX->SECCFG.PINCM[pincmIndex] &= ~(IOMUX_PINCM_WUEN_MASK);
2153 }
2154 
2163 __STATIC_INLINE bool DL_GPIO_isWakeUpEnabled(uint32_t pincmIndex)
2164 {
2165  return ((IOMUX->SECCFG.PINCM[pincmIndex] & IOMUX_PINCM_WUEN_MASK) ==
2166  IOMUX_PINCM_WUEN_ENABLE);
2167 }
2168 
2177 __STATIC_INLINE void DL_GPIO_setWakeupCompareValue(
2178  uint32_t pincmIndex, DL_GPIO_WAKEUP_COMPARE_VALUE value)
2179 {
2180  DL_Common_updateReg(&IOMUX->SECCFG.PINCM[pincmIndex], (uint32_t) value,
2181  IOMUX_PINCM_WCOMP_MASK);
2182 }
2183 
2194 __STATIC_INLINE DL_GPIO_WAKEUP_COMPARE_VALUE DL_GPIO_getWakeupCompareValue(
2195  uint32_t pincmIndex)
2196 {
2197  uint32_t value = IOMUX->SECCFG.PINCM[pincmIndex] & IOMUX_PINCM_WCOMP_MASK;
2198 
2199  return (DL_GPIO_WAKEUP_COMPARE_VALUE)(value);
2200 }
2201 
2210 __STATIC_INLINE bool DL_GPIO_isWakeStateGenerated(uint32_t pincmIndex)
2211 {
2212  return ((IOMUX->SECCFG.PINCM[pincmIndex] & IOMUX_PINCM_WAKESTAT_MASK) ==
2213  IOMUX_PINCM_WAKESTAT_ENABLE);
2214 }
2215 
2227 __STATIC_INLINE uint32_t DL_GPIO_readPins(GPIO_Regs* gpio, uint32_t pins)
2228 {
2229  return (gpio->DIN31_0 & pins);
2230 }
2231 
2239 __STATIC_INLINE void DL_GPIO_writePins(GPIO_Regs* gpio, uint32_t pins)
2240 {
2241  gpio->DOUT31_0 = pins;
2242 }
2243 
2254 __STATIC_INLINE void DL_GPIO_writePinsVal(
2255  GPIO_Regs* gpio, uint32_t pinsMask, uint32_t pinsVal)
2256 {
2257  uint32_t doutVal = gpio->DOUT31_0;
2258  doutVal &= ~pinsMask;
2259  doutVal |= (pinsVal & pinsMask);
2260  gpio->DOUT31_0 = doutVal;
2261 }
2262 
2269 __STATIC_INLINE void DL_GPIO_setPins(GPIO_Regs* gpio, uint32_t pins)
2270 {
2271  gpio->DOUTSET31_0 = pins;
2272 }
2273 
2280 __STATIC_INLINE void DL_GPIO_clearPins(GPIO_Regs* gpio, uint32_t pins)
2281 {
2282  gpio->DOUTCLR31_0 = pins;
2283 }
2284 
2291 __STATIC_INLINE void DL_GPIO_togglePins(GPIO_Regs* gpio, uint32_t pins)
2292 {
2293  gpio->DOUTTGL31_0 = pins;
2294 }
2295 
2302 __STATIC_INLINE void DL_GPIO_enableOutput(GPIO_Regs* gpio, uint32_t pins)
2303 {
2304  gpio->DOESET31_0 = pins;
2305 }
2306 
2313 __STATIC_INLINE void DL_GPIO_disableOutput(GPIO_Regs* gpio, uint32_t pins)
2314 {
2315  gpio->DOECLR31_0 = pins;
2316 }
2317 
2324 __STATIC_INLINE void DL_GPIO_enableDMAAccess(GPIO_Regs* gpio, uint32_t pins)
2325 {
2326  DL_Common_updateReg(&gpio->DMAMASK, pins, pins);
2327 }
2328 
2336 __STATIC_INLINE void DL_GPIO_disableDMAAccess(GPIO_Regs* gpio, uint32_t pins)
2337 {
2338  DL_Common_updateReg(&gpio->DMAMASK, 0x00000000, pins);
2339 }
2340 
2352 __STATIC_INLINE uint32_t DL_GPIO_isDMAccessEnabled(
2353  GPIO_Regs* gpio, uint32_t pins)
2354 {
2355  return (gpio->DMAMASK & pins);
2356 }
2357 
2365 __STATIC_INLINE void DL_GPIO_setLowerPinsPolarity(
2366  GPIO_Regs* gpio, uint32_t polarity)
2367 {
2368  gpio->POLARITY15_0 |= polarity;
2369 }
2370 
2378 __STATIC_INLINE void DL_GPIO_setUpperPinsPolarity(
2379  GPIO_Regs* gpio, uint32_t polarity)
2380 {
2381  gpio->POLARITY31_16 |= polarity;
2382 }
2383 
2393 __STATIC_INLINE uint32_t DL_GPIO_getLowerPinsPolarity(GPIO_Regs* gpio)
2394 {
2395  return gpio->POLARITY15_0;
2396 }
2397 
2407 __STATIC_INLINE uint32_t DL_GPIO_getUpperPinsPolarity(GPIO_Regs* gpio)
2408 {
2409  return gpio->POLARITY31_16;
2410 }
2411 
2419 __STATIC_INLINE void DL_GPIO_setLowerPinsInputFilter(
2420  GPIO_Regs* gpio, uint32_t filter)
2421 {
2422  gpio->FILTEREN15_0 |= filter;
2423 }
2424 
2432 __STATIC_INLINE void DL_GPIO_setUpperPinsInputFilter(
2433  GPIO_Regs* gpio, uint32_t filter)
2434 {
2435  gpio->FILTEREN31_16 |= filter;
2436 }
2437 
2447 __STATIC_INLINE uint32_t DL_GPIO_getLowerPinsInputFilter(GPIO_Regs* gpio)
2448 {
2449  return gpio->FILTEREN15_0;
2450 }
2451 
2461 __STATIC_INLINE uint32_t DL_GPIO_getUpperPinsInputFilter(GPIO_Regs* gpio)
2462 {
2463  return gpio->FILTEREN31_16;
2464 }
2465 
2471 __STATIC_INLINE void DL_GPIO_enableGlobalFastWake(GPIO_Regs* gpio)
2472 {
2473  gpio->CTL |= GPIO_CTL_FASTWAKEONLY_GLOBAL_EN;
2474 }
2475 
2481 __STATIC_INLINE void DL_GPIO_disableGlobalFastWake(GPIO_Regs* gpio)
2482 {
2483  gpio->CTL &= ~GPIO_CTL_FASTWAKEONLY_GLOBAL_EN;
2484 }
2485 
2493 __STATIC_INLINE void DL_GPIO_enableFastWakePins(GPIO_Regs* gpio, uint32_t pins)
2494 {
2495  gpio->FASTWAKE |= pins;
2496 }
2497 
2505 __STATIC_INLINE void DL_GPIO_disableFastWakePins(
2506  GPIO_Regs* gpio, uint32_t pins)
2507 {
2508  gpio->FASTWAKE &= ~(pins);
2509 }
2510 
2517 __STATIC_INLINE void DL_GPIO_enableHiZ(uint32_t pincmIndex)
2518 {
2519  IOMUX->SECCFG.PINCM[pincmIndex] |= IOMUX_PINCM_HIZ1_ENABLE;
2520 }
2521 
2528 __STATIC_INLINE void DL_GPIO_disableHiZ(uint32_t pincmIndex)
2529 {
2530  IOMUX->SECCFG.PINCM[pincmIndex] &= ~(IOMUX_PINCM_HIZ1_ENABLE);
2531 }
2532 
2543 __STATIC_INLINE uint32_t DL_GPIO_getEnabledFastWakePins(
2544  GPIO_Regs* gpio, uint32_t pins)
2545 {
2546  return (gpio->FASTWAKE & pins);
2547 }
2548 
2556 __STATIC_INLINE void DL_GPIO_enableInterrupt(GPIO_Regs* gpio, uint32_t pins)
2557 {
2558  gpio->CPU_INT.IMASK |= pins;
2559 }
2560 
2568 __STATIC_INLINE void DL_GPIO_disableInterrupt(GPIO_Regs* gpio, uint32_t pins)
2569 {
2570  gpio->CPU_INT.IMASK &= ~(pins);
2571 }
2572 
2584 __STATIC_INLINE uint32_t DL_GPIO_getEnabledInterrupts(
2585  GPIO_Regs* gpio, uint32_t pins)
2586 {
2587  return (gpio->CPU_INT.IMASK & pins);
2588 }
2589 
2606 __STATIC_INLINE uint32_t DL_GPIO_getEnabledInterruptStatus(
2607  GPIO_Regs* gpio, uint32_t pins)
2608 {
2609  return (gpio->CPU_INT.MIS & pins);
2610 }
2611 
2623 __STATIC_INLINE void DL_GPIO_setInterrupt(GPIO_Regs* gpio, uint32_t pins)
2624 {
2625  gpio->CPU_INT.ISET = pins;
2626 }
2627 
2643 __STATIC_INLINE uint32_t DL_GPIO_getRawInterruptStatus(
2644  GPIO_Regs* gpio, uint32_t pins)
2645 {
2646  return (gpio->CPU_INT.RIS & pins);
2647 }
2648 
2661 __STATIC_INLINE DL_GPIO_IIDX DL_GPIO_getPendingInterrupt(GPIO_Regs* gpio)
2662 {
2663  return (DL_GPIO_IIDX)(gpio->CPU_INT.IIDX);
2664 }
2665 
2674 __STATIC_INLINE void DL_GPIO_clearInterruptStatus(
2675  GPIO_Regs* gpio, uint32_t pins)
2676 {
2677  gpio->CPU_INT.ICLR |= pins;
2678 }
2679 
2692 __STATIC_INLINE void DL_GPIO_configSubscriber(GPIO_Regs* gpio,
2693  DL_GPIO_SUBSCRIBER_INDEX index, DL_GPIO_SUBSCRIBER_OUT_POLICY policy,
2694  DL_GPIO_SUBSCRIBERx_PIN pinIndex)
2695 
2696 {
2697  volatile uint32_t* pReg = &gpio->SUB0CFG;
2698 
2699  pReg += ((uint32_t) index << 3);
2700 
2701  DL_Common_updateReg(pReg, ((uint32_t) pinIndex | (uint32_t) policy),
2702  (GPIO_SUB0CFG_INDEX_MASK | GPIO_SUB1CFG_OUTPOLICY_MASK));
2703 }
2704 
2712 __STATIC_INLINE void DL_GPIO_enableSubscriber(
2713  GPIO_Regs* gpio, DL_GPIO_SUBSCRIBER_INDEX index)
2714 {
2715  volatile uint32_t* pReg = &gpio->SUB0CFG;
2716 
2717  pReg += ((uint32_t) index << 3);
2718  *(pReg) |= (GPIO_SUB1CFG_ENABLE_SET);
2719 }
2720 
2728 __STATIC_INLINE void DL_GPIO_disableSubscriber(
2729  GPIO_Regs* gpio, DL_GPIO_SUBSCRIBER_INDEX index)
2730 {
2731  volatile uint32_t* pReg = &gpio->SUB0CFG;
2732 
2733  pReg += ((uint32_t) index << 3);
2734  *(pReg) &= ~(GPIO_SUB1CFG_ENABLE_SET);
2735 }
2736 
2747 __STATIC_INLINE bool DL_GPIO_isSubscriberEnabled(
2748  GPIO_Regs* gpio, DL_GPIO_SUBSCRIBER_INDEX index)
2749 {
2750  volatile uint32_t* pReg = &gpio->SUB0CFG;
2751 
2752  pReg += ((uint32_t) index << 3);
2753  return (GPIO_SUB1CFG_ENABLE_SET == (*(pReg) &GPIO_SUB1CFG_ENABLE_MASK));
2754 }
2755 
2766 __STATIC_INLINE void DL_GPIO_setPublisherChanID(
2767  GPIO_Regs* gpio, DL_GPIO_PUBLISHER_INDEX index, uint8_t chanID)
2768 {
2769  volatile uint32_t* pReg = &gpio->FPUB_0;
2770 
2771  *(pReg + (uint32_t) index) =
2772  ((uint32_t) chanID & GPIO_FSUB_0_CHANID_MAXIMUM);
2773 }
2774 
2784 __STATIC_INLINE uint8_t DL_GPIO_getPublisherChanID(
2785  GPIO_Regs* gpio, DL_GPIO_PUBLISHER_INDEX index)
2786 {
2787  volatile uint32_t* pReg = &gpio->FPUB_0;
2788 
2789  return ((uint8_t)(*(pReg + (uint32_t) index) & GPIO_FPUB_0_CHANID_MASK));
2790 }
2791 
2802 __STATIC_INLINE void DL_GPIO_setSubscriberChanID(
2803  GPIO_Regs* gpio, DL_GPIO_SUBSCRIBER_INDEX index, uint8_t chanID)
2804 {
2805  volatile uint32_t* pReg = &gpio->FSUB_0;
2806 
2807  *(pReg + (uint32_t) index) =
2808  ((uint32_t) chanID & GPIO_FSUB_0_CHANID_MAXIMUM);
2809 }
2810 
2820 __STATIC_INLINE uint8_t DL_GPIO_getSubscriberChanID(
2821  GPIO_Regs* gpio, DL_GPIO_SUBSCRIBER_INDEX index)
2822 {
2823  volatile uint32_t* pReg = &gpio->FSUB_0;
2824 
2825  return ((uint8_t)(*(pReg + (uint32_t) index) & GPIO_FSUB_0_CHANID_MASK));
2826 }
2827 
2840 __STATIC_INLINE void DL_GPIO_enableEvents(
2841  GPIO_Regs* gpio, DL_GPIO_EVENT_ROUTE index, uint32_t pins)
2842 {
2843  switch (index) {
2844  case DL_GPIO_EVENT_ROUTE_1:
2845  gpio->GEN_EVENT0.IMASK |= (pins & 0x0000FFFFU);
2846  break;
2847  case DL_GPIO_EVENT_ROUTE_2:
2848  gpio->GEN_EVENT1.IMASK |= (pins & 0xFFFF0000U);
2849  break;
2850  default:
2851  break;
2852  }
2853 }
2854 
2867 __STATIC_INLINE void DL_GPIO_disableEvents(
2868  GPIO_Regs* gpio, DL_GPIO_EVENT_ROUTE index, uint32_t pins)
2869 {
2870  switch (index) {
2871  case DL_GPIO_EVENT_ROUTE_1:
2872  gpio->GEN_EVENT0.IMASK &= ~(pins & 0x0000FFFFU);
2873  break;
2874  case DL_GPIO_EVENT_ROUTE_2:
2875  gpio->GEN_EVENT1.IMASK &= ~(pins & 0xFFFF0000U);
2876  break;
2877  default:
2878  break;
2879  }
2880 }
2881 
2898 __STATIC_INLINE uint32_t DL_GPIO_getEnabledEvents(
2899  GPIO_Regs* gpio, DL_GPIO_EVENT_ROUTE index, uint32_t pins)
2900 {
2901  volatile uint32_t* pReg = &gpio->GEN_EVENT0.IMASK;
2902 
2903  return ((*(pReg + (uint32_t) index) & pins));
2904 }
2905 
2924 __STATIC_INLINE uint32_t DL_GPIO_getEnabledEventStatus(
2925  GPIO_Regs* gpio, DL_GPIO_EVENT_ROUTE index, uint32_t pins)
2926 {
2927  const volatile uint32_t* pReg = &gpio->GEN_EVENT0.MIS;
2928 
2929  return ((*(pReg + (uint32_t) index) & pins));
2930 }
2931 
2944 __STATIC_INLINE void DL_GPIO_clearEventStatus(
2945  GPIO_Regs* gpio, DL_GPIO_EVENT_ROUTE index, uint32_t pins)
2946 {
2947  switch (index) {
2948  case DL_GPIO_EVENT_ROUTE_1:
2949  gpio->GEN_EVENT0.ICLR |= (pins & 0x0000FFFFU);
2950  break;
2951  case DL_GPIO_EVENT_ROUTE_2:
2952  gpio->GEN_EVENT1.ICLR |= (pins & 0xFFFF0000U);
2953  break;
2954  default:
2955  break;
2956  }
2957 }
2958 
2959 #ifdef __cplusplus
2960 }
2961 #endif
2962 
2963 #endif /* __MSPM0_HAS_GPIO__ */
2964 
2965 #endif /* ti_dl_dl_gpio__include */
2966 
__STATIC_INLINE bool DL_GPIO_isPowerEnabled(GPIO_Regs *gpio)
Returns if the Peripheral Write Enable (PWREN) register for the GPIO is enabled.
Definition: dl_gpio.h:1871
Definition: dl_gpio.h:1765
__STATIC_INLINE void DL_GPIO_enableDMAAccess(GPIO_Regs *gpio, uint32_t pins)
Enable DMA access on a group of pins.
Definition: dl_gpio.h:2324
Definition: dl_gpio.h:1749
Definition: dl_gpio.h:1621
__STATIC_INLINE void DL_Common_updateReg(volatile uint32_t *reg, uint32_t val, uint32_t mask)
Writes value to specified register - retaining bits unaffected by mask.
Definition: dl_common.h:63
__STATIC_INLINE void DL_GPIO_setPins(GPIO_Regs *gpio, uint32_t pins)
Set a group of GPIO pins.
Definition: dl_gpio.h:2269
__STATIC_INLINE bool DL_GPIO_isWakeStateGenerated(uint32_t pincmIndex)
Checks if the GPIO pin&#39;s Wake State bit is active.
Definition: dl_gpio.h:2210
__STATIC_INLINE uint8_t DL_GPIO_getSubscriberChanID(GPIO_Regs *gpio, DL_GPIO_SUBSCRIBER_INDEX index)
Gets the event subscriber channel id.
Definition: dl_gpio.h:2820
__STATIC_INLINE bool DL_GPIO_isSubscriberEnabled(GPIO_Regs *gpio, DL_GPIO_SUBSCRIBER_INDEX index)
Returns if GPIO subscriber is enabled.
Definition: dl_gpio.h:2747
__STATIC_INLINE uint32_t DL_GPIO_getEnabledInterruptStatus(GPIO_Regs *gpio, uint32_t pins)
Check interrupt flag of enabled GPIO interrupts.
Definition: dl_gpio.h:2606
Definition: dl_gpio.h:1709
__STATIC_INLINE void DL_GPIO_initDigitalInput(uint32_t pincmIndex)
Configures a pin as a basic GPIO input.
Definition: dl_gpio.h:1987
Definition: dl_gpio.h:1815
__STATIC_INLINE void DL_GPIO_disableFastWakePins(GPIO_Regs *gpio, uint32_t pins)
Disable fast wake for pins.
Definition: dl_gpio.h:2505
Definition: dl_gpio.h:1683
Definition: dl_gpio.h:1641
__STATIC_INLINE void DL_GPIO_setAnalogInternalResistor(uint32_t pincmIndex, DL_GPIO_RESISTOR internalResistor)
Configures internal resistor for analog pin.
Definition: dl_gpio.h:1968
__STATIC_INLINE void DL_GPIO_disableWakeUp(uint32_t pincmIndex)
Clear GPIO pin&#39;s wakeup enable bit.
Definition: dl_gpio.h:2150
__STATIC_INLINE void DL_GPIO_initDigitalOutput(uint32_t pincmIndex)
Configures a pin as a basic GPIO output.
Definition: dl_gpio.h:1910
Definition: dl_gpio.h:1741
DL_GPIO_EVENT_ROUTE
Definition: dl_gpio.h:1655
__STATIC_INLINE void DL_GPIO_disableGlobalFastWake(GPIO_Regs *gpio)
Disable Global Fast Wake.
Definition: dl_gpio.h:2481
Definition: dl_gpio.h:1809
Definition: dl_gpio.h:1681
__STATIC_INLINE uint32_t DL_GPIO_getEnabledEvents(GPIO_Regs *gpio, DL_GPIO_EVENT_ROUTE index, uint32_t pins)
Check which GPIO events are enabled.
Definition: dl_gpio.h:2898
__STATIC_INLINE void DL_GPIO_initPeripheralAnalogFunction(uint32_t pincmIndex)
Configure a pin to operate with analog functionality.
Definition: dl_gpio.h:2126
__STATIC_INLINE void DL_GPIO_initPeripheralFunction(uint32_t pincmIndex, uint32_t function)
Configure a pin to operate with peripheral functionality.
Definition: dl_gpio.h:2029
__STATIC_INLINE void DL_GPIO_setDigitalInternalResistor(uint32_t pincmIndex, DL_GPIO_RESISTOR internalResistor)
Configures internal resistor for digital pin.
Definition: dl_gpio.h:1950
__STATIC_INLINE void DL_GPIO_setInterrupt(GPIO_Regs *gpio, uint32_t pins)
Set interrupt flag of any GPIO.
Definition: dl_gpio.h:2623
Definition: dl_gpio.h:1719
Definition: dl_gpio.h:1623
__STATIC_INLINE void DL_GPIO_initPeripheralOutputFunction(uint32_t pincmIndex, uint32_t function)
Configure a pin to operate with peripheral output functionality.
Definition: dl_gpio.h:2043
__STATIC_INLINE uint32_t DL_GPIO_getUpperPinsInputFilter(GPIO_Regs *gpio)
Get the input filter of bits [16, 31] in the group of pins.
Definition: dl_gpio.h:2461
DL_GPIO_IIDX
Definition: dl_gpio.h:1757
DL_GPIO_SUBSCRIBERx_PIN
Definition: dl_gpio.h:1689
__STATIC_INLINE bool DL_GPIO_isWakeUpEnabled(uint32_t pincmIndex)
Returns if GPIO pin&#39;s wake up bit is enabled.
Definition: dl_gpio.h:2163
Definition: dl_gpio.h:1795
__STATIC_INLINE void DL_GPIO_initPeripheralInputFunctionFeatures(uint32_t pincmIndex, uint32_t function, DL_GPIO_INVERSION inversion, DL_GPIO_RESISTOR internalResistor, DL_GPIO_HYSTERESIS hysteresis, DL_GPIO_WAKEUP wakeup)
Configure a pin to operate with peripheral input functionality with optional features.
Definition: dl_gpio.h:2108
DL_GPIO_WAKEUP_COMPARE_VALUE
Definition: dl_gpio.h:1639
Definition: dl_gpio.h:1707
Definition: dl_gpio.h:1803
__STATIC_INLINE void DL_GPIO_disablePower(GPIO_Regs *gpio)
Disables the Peripheral Write Enable (PWREN) register for the GPIO.
Definition: dl_gpio.h:1850
DL_GPIO_RESISTOR
Definition: dl_gpio.h:1604
Definition: dl_gpio.h:1590
Definition: dl_gpio.h:1659
DL_GPIO_SUBSCRIBER_OUT_POLICY
Definition: dl_gpio.h:1679
__STATIC_INLINE void DL_GPIO_clearPins(GPIO_Regs *gpio, uint32_t pins)
Clear a group of GPIO pins.
Definition: dl_gpio.h:2280
__STATIC_INLINE void DL_GPIO_initDigitalOutputFeatures(uint32_t pincmIndex, DL_GPIO_INVERSION inversion, DL_GPIO_RESISTOR internalResistor, DL_GPIO_DRIVE_STRENGTH driveStrength, DL_GPIO_HIZ hiZ)
Configures a pin as a GPIO output.
Definition: dl_gpio.h:1931
__STATIC_INLINE bool DL_GPIO_isReset(GPIO_Regs *gpio)
Returns if gpio peripheral was reset.
Definition: dl_gpio.h:1898
Definition: dl_gpio.h:1711
__STATIC_INLINE void DL_GPIO_enableEvents(GPIO_Regs *gpio, DL_GPIO_EVENT_ROUTE index, uint32_t pins)
Enables GPIO events.
Definition: dl_gpio.h:2840
Definition: dl_gpio.h:1600
DL_GPIO_HIZ
Definition: dl_gpio.h:1647
Definition: dl_gpio.h:1791
Definition: dl_gpio.h:1727
__STATIC_INLINE void DL_GPIO_enableFastWakePins(GPIO_Regs *gpio, uint32_t pins)
Enable fast wake for pins.
Definition: dl_gpio.h:2493
Definition: dl_gpio.h:1697
__STATIC_INLINE void DL_GPIO_clearEventStatus(GPIO_Regs *gpio, DL_GPIO_EVENT_ROUTE index, uint32_t pins)
Clear pending GPIO event.
Definition: dl_gpio.h:2944
DriverLib Common APIs.
Definition: dl_gpio.h:1817
__STATIC_INLINE uint32_t DL_GPIO_getRawInterruptStatus(GPIO_Regs *gpio, uint32_t pins)
Check interrupt flag of any GPIO interrupt.
Definition: dl_gpio.h:2643
__STATIC_INLINE DL_GPIO_IIDX DL_GPIO_getPendingInterrupt(GPIO_Regs *gpio)
Get highest priority pending GPIO interrupt.
Definition: dl_gpio.h:2661
Definition: dl_gpio.h:1695
__STATIC_INLINE void DL_GPIO_disableOutput(GPIO_Regs *gpio, uint32_t pins)
Disable output on a group of GPIO pins.
Definition: dl_gpio.h:2313
Definition: dl_gpio.h:1745
Definition: dl_gpio.h:1769
Definition: dl_gpio.h:1699
DL_GPIO_DRIVE_STRENGTH
Definition: dl_gpio.h:1596
Definition: dl_gpio.h:1685
Definition: dl_gpio.h:1761
Definition: dl_gpio.h:1731
Definition: dl_gpio.h:1614
__STATIC_INLINE void DL_GPIO_enableHiZ(uint32_t pincmIndex)
Enable Hi-Z for the pin.
Definition: dl_gpio.h:2517
Definition: dl_gpio.h:1801
__STATIC_INLINE void DL_GPIO_setUpperPinsPolarity(GPIO_Regs *gpio, uint32_t polarity)
Set the polarity of all bits [16, 31] in the group of pins.
Definition: dl_gpio.h:2378
__STATIC_INLINE void DL_GPIO_enableSubscriber(GPIO_Regs *gpio, DL_GPIO_SUBSCRIBER_INDEX index)
Enables GPIO subscriber.
Definition: dl_gpio.h:2712
Definition: dl_gpio.h:1665
Definition: dl_gpio.h:1717
Definition: dl_gpio.h:1787
__STATIC_INLINE uint8_t DL_GPIO_getPublisherChanID(GPIO_Regs *gpio, DL_GPIO_PUBLISHER_INDEX index)
Gets the event publisher channel id.
Definition: dl_gpio.h:2784
Definition: dl_gpio.h:1729
__STATIC_INLINE void DL_GPIO_enableGlobalFastWake(GPIO_Regs *gpio)
Enable Global Fast Wake.
Definition: dl_gpio.h:2471
Definition: dl_gpio.h:1701
__STATIC_INLINE uint32_t DL_GPIO_isDMAccessEnabled(GPIO_Regs *gpio, uint32_t pins)
Check if DMA access is enabled on a group of pins.
Definition: dl_gpio.h:2352
__STATIC_INLINE uint32_t DL_GPIO_getLowerPinsInputFilter(GPIO_Regs *gpio)
Get the input filter of bits [0, 15] in the group of pins.
Definition: dl_gpio.h:2447
__STATIC_INLINE void DL_GPIO_enableInterrupt(GPIO_Regs *gpio, uint32_t pins)
Enable GPIO interrupts.
Definition: dl_gpio.h:2556
Definition: dl_gpio.h:1606
Definition: dl_gpio.h:1785
__STATIC_INLINE uint32_t DL_GPIO_getEnabledInterrupts(GPIO_Regs *gpio, uint32_t pins)
Check which GPIO interrupts are enabled.
Definition: dl_gpio.h:2584
__STATIC_INLINE void DL_GPIO_enableWakeUp(uint32_t pincmIndex)
Set GPIO pin&#39;s wakeup enable bit.
Definition: dl_gpio.h:2138
DL_GPIO_WAKEUP
Definition: dl_gpio.h:1627
Definition: dl_gpio.h:1783
__STATIC_INLINE uint32_t DL_GPIO_readPins(GPIO_Regs *gpio, uint32_t pins)
Read a group of GPIO pins.
Definition: dl_gpio.h:2227
Definition: dl_gpio.h:1747
Definition: dl_gpio.h:1629
__STATIC_INLINE void DL_GPIO_initDigitalInputFeatures(uint32_t pincmIndex, DL_GPIO_INVERSION inversion, DL_GPIO_RESISTOR internalResistor, DL_GPIO_HYSTERESIS hysteresis, DL_GPIO_WAKEUP wakeup)
Configures a pin as a GPIO input.
Definition: dl_gpio.h:2009
__STATIC_INLINE void DL_GPIO_disableSubscriber(GPIO_Regs *gpio, DL_GPIO_SUBSCRIBER_INDEX index)
Disables GPIO subscriber.
Definition: dl_gpio.h:2728
DL_GPIO_HYSTERESIS
Definition: dl_gpio.h:1619
__STATIC_INLINE uint32_t DL_GPIO_getUpperPinsPolarity(GPIO_Regs *gpio)
Get the polarity of bits [16, 31] in the group of pins.
Definition: dl_gpio.h:2407
Definition: dl_gpio.h:1667
Definition: dl_gpio.h:1657
Definition: dl_gpio.h:1767
Definition: dl_gpio.h:1751
__STATIC_INLINE void DL_GPIO_setUpperPinsInputFilter(GPIO_Regs *gpio, uint32_t filter)
Set the input filter of bits [16, 31] in the group of pins.
Definition: dl_gpio.h:2432
Definition: dl_gpio.h:1811
__STATIC_INLINE void DL_GPIO_reset(GPIO_Regs *gpio)
Resets gpio peripheral.
Definition: dl_gpio.h:1882
Definition: dl_gpio.h:1643
Definition: dl_gpio.h:1691
__STATIC_INLINE void DL_GPIO_setLowerPinsPolarity(GPIO_Regs *gpio, uint32_t polarity)
Set the polarity of all bits [0, 15] in the group of pins.
Definition: dl_gpio.h:2365
__STATIC_INLINE void DL_GPIO_configSubscriber(GPIO_Regs *gpio, DL_GPIO_SUBSCRIBER_INDEX index, DL_GPIO_SUBSCRIBER_OUT_POLICY policy, DL_GPIO_SUBSCRIBERx_PIN pinIndex)
Configures GPIO subscriber. This API preserves enable/disbale status of subscriber.
Definition: dl_gpio.h:2692
Definition: dl_gpio.h:1823
__STATIC_INLINE DL_GPIO_WAKEUP_COMPARE_VALUE DL_GPIO_getWakeupCompareValue(uint32_t pincmIndex)
Get the compare value to use for wake for the specified pin.
Definition: dl_gpio.h:2194
Definition: dl_gpio.h:1805
Definition: dl_gpio.h:1713
Definition: dl_gpio.h:1799
__STATIC_INLINE uint32_t DL_GPIO_getEnabledFastWakePins(GPIO_Regs *gpio, uint32_t pins)
Check which pins have fast wake feature enabled.
Definition: dl_gpio.h:2543
Definition: dl_gpio.h:1635
__STATIC_INLINE uint32_t DL_GPIO_getLowerPinsPolarity(GPIO_Regs *gpio)
Get the polarity of bits [0, 15] in the group of pins.
Definition: dl_gpio.h:2393
Definition: dl_gpio.h:1733
Definition: dl_gpio.h:1739
Definition: dl_gpio.h:1773
Definition: dl_gpio.h:1789
__STATIC_INLINE void DL_GPIO_disableDMAAccess(GPIO_Regs *gpio, uint32_t pins)
Disable DMA access on a group of pins.
Definition: dl_gpio.h:2336
Definition: dl_gpio.h:1703
__STATIC_INLINE void DL_GPIO_setSubscriberChanID(GPIO_Regs *gpio, DL_GPIO_SUBSCRIBER_INDEX index, uint8_t chanID)
Sets the event subscriber channel id.
Definition: dl_gpio.h:2802
Definition: dl_gpio.h:1649
Definition: dl_gpio.h:1777
Definition: dl_gpio.h:1598
__STATIC_INLINE void DL_GPIO_initPeripheralInputFunction(uint32_t pincmIndex, uint32_t function)
Configure a pin to operate with peripheral input functionality.
Definition: dl_gpio.h:2085
__STATIC_INLINE void DL_GPIO_writePinsVal(GPIO_Regs *gpio, uint32_t pinsMask, uint32_t pinsVal)
Update the value of one or more GPIO pins.
Definition: dl_gpio.h:2254
Definition: dl_gpio.h:1693
DL_GPIO_SUBSCRIBER_INDEX
Definition: dl_gpio.h:1671
Definition: dl_gpio.h:1673
__STATIC_INLINE void DL_GPIO_disableEvents(GPIO_Regs *gpio, DL_GPIO_EVENT_ROUTE index, uint32_t pins)
Disable GPIO events.
Definition: dl_gpio.h:2867
Definition: dl_gpio.h:1759
Definition: dl_gpio.h:1592
__STATIC_INLINE void DL_GPIO_enablePower(GPIO_Regs *gpio)
Enables the Peripheral Write Enable (PWREN) register for the GPIO.
Definition: dl_gpio.h:1835
Definition: dl_gpio.h:1651
__STATIC_INLINE void DL_GPIO_setWakeupCompareValue(uint32_t pincmIndex, DL_GPIO_WAKEUP_COMPARE_VALUE value)
Set the compare value to use for wake for the specified pin.
Definition: dl_gpio.h:2177
__STATIC_INLINE void DL_GPIO_disableHiZ(uint32_t pincmIndex)
Disable Hi-Z for the pin.
Definition: dl_gpio.h:2528
Definition: dl_gpio.h:1771
Definition: dl_gpio.h:1725
__STATIC_INLINE void DL_GPIO_clearInterruptStatus(GPIO_Regs *gpio, uint32_t pins)
Clear pending GPIO interrupts.
Definition: dl_gpio.h:2674
Definition: dl_gpio.h:1715
Definition: dl_gpio.h:1631
Definition: dl_gpio.h:1793
Definition: dl_gpio.h:1723
__STATIC_INLINE void DL_GPIO_initPeripheralOutputFunctionFeatures(uint32_t pincmIndex, uint32_t function, DL_GPIO_INVERSION inversion, DL_GPIO_RESISTOR internalResistor, DL_GPIO_DRIVE_STRENGTH driveStrength, DL_GPIO_HIZ hiZ)
Configure a pin to operate with peripheral output functionality with optional features.
Definition: dl_gpio.h:2066
Definition: dl_gpio.h:1819
__STATIC_INLINE void DL_GPIO_disableInterrupt(GPIO_Regs *gpio, uint32_t pins)
Disable GPIO interrupts.
Definition: dl_gpio.h:2568
DL_GPIO_INVERSION
Definition: dl_gpio.h:1588
Definition: dl_gpio.h:1775
Definition: dl_gpio.h:1753
__STATIC_INLINE void DL_GPIO_writePins(GPIO_Regs *gpio, uint32_t pins)
Write a group of GPIO pins.
Definition: dl_gpio.h:2239
Definition: dl_gpio.h:1743
Definition: dl_gpio.h:1737
Definition: dl_gpio.h:1813
Definition: dl_gpio.h:1821
Definition: dl_gpio.h:1763
Definition: dl_gpio.h:1721
DL_GPIO_PUBLISHER_INDEX
Definition: dl_gpio.h:1663
Definition: dl_gpio.h:1735
Definition: dl_gpio.h:1797
__STATIC_INLINE void DL_GPIO_setLowerPinsInputFilter(GPIO_Regs *gpio, uint32_t filter)
Set the input filter of bits [0, 15] in the group of pins.
Definition: dl_gpio.h:2419
Definition: dl_gpio.h:1610
Definition: dl_gpio.h:1807
Definition: dl_gpio.h:1633
__STATIC_INLINE void DL_GPIO_togglePins(GPIO_Regs *gpio, uint32_t pins)
Toggle a group of GPIO pins.
Definition: dl_gpio.h:2291
__STATIC_INLINE uint32_t DL_GPIO_getEnabledEventStatus(GPIO_Regs *gpio, DL_GPIO_EVENT_ROUTE index, uint32_t pins)
Checks if any of the GPIO events which were previously enabled are pending.
Definition: dl_gpio.h:2924
Definition: dl_gpio.h:1675
__STATIC_INLINE void DL_GPIO_enableOutput(GPIO_Regs *gpio, uint32_t pins)
Enable output on a group of GPIO pins.
Definition: dl_gpio.h:2302
Definition: dl_gpio.h:1705
Definition: dl_gpio.h:1781
__STATIC_INLINE void DL_GPIO_setPublisherChanID(GPIO_Regs *gpio, DL_GPIO_PUBLISHER_INDEX index, uint8_t chanID)
Sets the event publisher channel id.
Definition: dl_gpio.h:2766
Definition: dl_gpio.h:1779
© Copyright 1995-2025, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale