MSPM0C110X Driver Library  2.08.00.03
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  IOMUX->SECCFG.PINCM[pincmIndex] &=
1955  IOMUX->SECCFG.PINCM[pincmIndex] |=
1956  IOMUX_PINCM_PC_CONNECTED | (uint32_t) internalResistor;
1957 }
1958 
1968  uint32_t pincmIndex, DL_GPIO_RESISTOR internalResistor)
1969 {
1970  /* GPIO functionality is always a pin function of 0x00000001 */
1971  /* For analog use case, setting IOMUX input enable */
1972  IOMUX->SECCFG.PINCM[pincmIndex] =
1973  IOMUX_PINCM_PC_UNCONNECTED | (uint32_t) internalResistor;
1974 }
1975 
1985 __STATIC_INLINE void DL_GPIO_initDigitalInput(uint32_t pincmIndex)
1986 {
1987  /* GPIO functionality is always a pin function of 0x00000001 */
1988  IOMUX->SECCFG.PINCM[pincmIndex] = IOMUX_PINCM_INENA_ENABLE |
1989  IOMUX_PINCM_PC_CONNECTED |
1990  ((uint32_t) 0x00000001);
1991 }
1992 
2007 __STATIC_INLINE void DL_GPIO_initDigitalInputFeatures(uint32_t pincmIndex,
2008  DL_GPIO_INVERSION inversion, DL_GPIO_RESISTOR internalResistor,
2009  DL_GPIO_HYSTERESIS hysteresis, DL_GPIO_WAKEUP wakeup)
2010 {
2011  /* GPIO functionality is always a pin function of 0x00000001 */
2012  IOMUX->SECCFG.PINCM[pincmIndex] =
2013  IOMUX_PINCM_INENA_ENABLE | IOMUX_PINCM_PC_CONNECTED |
2014  ((uint32_t) 0x00000001) | (uint32_t) inversion |
2015  (uint32_t) internalResistor | (uint32_t) hysteresis |
2016  ((uint32_t) wakeup & IOMUX_PINCM_WCOMP_MASK);
2017  IOMUX->SECCFG.PINCM[pincmIndex] |=
2018  ((uint32_t) wakeup & IOMUX_PINCM_WUEN_MASK);
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 & IOMUX_PINCM_WCOMP_MASK);
2117  IOMUX->SECCFG.PINCM[pincmIndex] |=
2118  ((uint32_t) wakeup & IOMUX_PINCM_WUEN_MASK);
2119 }
2120 
2128 __STATIC_INLINE void DL_GPIO_initPeripheralAnalogFunction(uint32_t pincmIndex)
2129 {
2130  IOMUX->SECCFG.PINCM[pincmIndex] = IOMUX_PINCM_PC_UNCONNECTED;
2131 }
2132 
2142 __STATIC_INLINE void DL_GPIO_enableWakeUp(uint32_t pincmIndex)
2143 {
2144  IOMUX->SECCFG.PINCM[pincmIndex] |= DL_GPIO_WAKEUP_ENABLE;
2145 }
2146 
2154 __STATIC_INLINE void DL_GPIO_disableWakeUp(uint32_t pincmIndex)
2155 {
2156  IOMUX->SECCFG.PINCM[pincmIndex] &= ~(IOMUX_PINCM_WUEN_MASK);
2157 }
2158 
2167 __STATIC_INLINE bool DL_GPIO_isWakeUpEnabled(uint32_t pincmIndex)
2168 {
2169  return ((IOMUX->SECCFG.PINCM[pincmIndex] & IOMUX_PINCM_WUEN_MASK) ==
2170  IOMUX_PINCM_WUEN_ENABLE);
2171 }
2172 
2181 __STATIC_INLINE void DL_GPIO_setWakeupCompareValue(
2182  uint32_t pincmIndex, DL_GPIO_WAKEUP_COMPARE_VALUE value)
2183 {
2184  DL_Common_updateReg(&IOMUX->SECCFG.PINCM[pincmIndex], (uint32_t) value,
2185  IOMUX_PINCM_WCOMP_MASK);
2186 }
2187 
2198 __STATIC_INLINE DL_GPIO_WAKEUP_COMPARE_VALUE DL_GPIO_getWakeupCompareValue(
2199  uint32_t pincmIndex)
2200 {
2201  uint32_t value = IOMUX->SECCFG.PINCM[pincmIndex] & IOMUX_PINCM_WCOMP_MASK;
2202 
2203  return (DL_GPIO_WAKEUP_COMPARE_VALUE)(value);
2204 }
2205 
2214 __STATIC_INLINE bool DL_GPIO_isWakeStateGenerated(uint32_t pincmIndex)
2215 {
2216  return ((IOMUX->SECCFG.PINCM[pincmIndex] & IOMUX_PINCM_WAKESTAT_MASK) ==
2217  IOMUX_PINCM_WAKESTAT_ENABLE);
2218 }
2219 
2231 __STATIC_INLINE uint32_t DL_GPIO_readPins(GPIO_Regs* gpio, uint32_t pins)
2232 {
2233  return (gpio->DIN31_0 & pins);
2234 }
2235 
2243 __STATIC_INLINE void DL_GPIO_writePins(GPIO_Regs* gpio, uint32_t pins)
2244 {
2245  gpio->DOUT31_0 = pins;
2246 }
2247 
2258 __STATIC_INLINE void DL_GPIO_writePinsVal(
2259  GPIO_Regs* gpio, uint32_t pinsMask, uint32_t pinsVal)
2260 {
2261  uint32_t doutVal = gpio->DOUT31_0;
2262  doutVal &= ~pinsMask;
2263  doutVal |= (pinsVal & pinsMask);
2264  gpio->DOUT31_0 = doutVal;
2265 }
2266 
2273 __STATIC_INLINE void DL_GPIO_setPins(GPIO_Regs* gpio, uint32_t pins)
2274 {
2275  gpio->DOUTSET31_0 = pins;
2276 }
2277 
2284 __STATIC_INLINE void DL_GPIO_clearPins(GPIO_Regs* gpio, uint32_t pins)
2285 {
2286  gpio->DOUTCLR31_0 = pins;
2287 }
2288 
2295 __STATIC_INLINE void DL_GPIO_togglePins(GPIO_Regs* gpio, uint32_t pins)
2296 {
2297  gpio->DOUTTGL31_0 = pins;
2298 }
2299 
2306 __STATIC_INLINE void DL_GPIO_enableOutput(GPIO_Regs* gpio, uint32_t pins)
2307 {
2308  gpio->DOESET31_0 = pins;
2309 }
2310 
2317 __STATIC_INLINE void DL_GPIO_disableOutput(GPIO_Regs* gpio, uint32_t pins)
2318 {
2319  gpio->DOECLR31_0 = pins;
2320 }
2321 
2328 __STATIC_INLINE void DL_GPIO_enableDMAAccess(GPIO_Regs* gpio, uint32_t pins)
2329 {
2330  DL_Common_updateReg(&gpio->DMAMASK, pins, pins);
2331 }
2332 
2340 __STATIC_INLINE void DL_GPIO_disableDMAAccess(GPIO_Regs* gpio, uint32_t pins)
2341 {
2342  DL_Common_updateReg(&gpio->DMAMASK, 0x00000000, pins);
2343 }
2344 
2356 __STATIC_INLINE uint32_t DL_GPIO_isDMAccessEnabled(
2357  GPIO_Regs* gpio, uint32_t pins)
2358 {
2359  return (gpio->DMAMASK & pins);
2360 }
2361 
2369 __STATIC_INLINE void DL_GPIO_setLowerPinsPolarity(
2370  GPIO_Regs* gpio, uint32_t polarity)
2371 {
2372  gpio->POLARITY15_0 |= polarity;
2373 }
2374 
2382 __STATIC_INLINE void DL_GPIO_setUpperPinsPolarity(
2383  GPIO_Regs* gpio, uint32_t polarity)
2384 {
2385  gpio->POLARITY31_16 |= polarity;
2386 }
2387 
2397 __STATIC_INLINE uint32_t DL_GPIO_getLowerPinsPolarity(GPIO_Regs* gpio)
2398 {
2399  return gpio->POLARITY15_0;
2400 }
2401 
2411 __STATIC_INLINE uint32_t DL_GPIO_getUpperPinsPolarity(GPIO_Regs* gpio)
2412 {
2413  return gpio->POLARITY31_16;
2414 }
2415 
2423 __STATIC_INLINE void DL_GPIO_setLowerPinsInputFilter(
2424  GPIO_Regs* gpio, uint32_t filter)
2425 {
2426  gpio->FILTEREN15_0 |= filter;
2427 }
2428 
2436 __STATIC_INLINE void DL_GPIO_setUpperPinsInputFilter(
2437  GPIO_Regs* gpio, uint32_t filter)
2438 {
2439  gpio->FILTEREN31_16 |= filter;
2440 }
2441 
2451 __STATIC_INLINE uint32_t DL_GPIO_getLowerPinsInputFilter(GPIO_Regs* gpio)
2452 {
2453  return gpio->FILTEREN15_0;
2454 }
2455 
2465 __STATIC_INLINE uint32_t DL_GPIO_getUpperPinsInputFilter(GPIO_Regs* gpio)
2466 {
2467  return gpio->FILTEREN31_16;
2468 }
2469 
2475 __STATIC_INLINE void DL_GPIO_enableGlobalFastWake(GPIO_Regs* gpio)
2476 {
2477  gpio->CTL |= GPIO_CTL_FASTWAKEONLY_GLOBAL_EN;
2478 }
2479 
2485 __STATIC_INLINE void DL_GPIO_disableGlobalFastWake(GPIO_Regs* gpio)
2486 {
2487  gpio->CTL &= ~GPIO_CTL_FASTWAKEONLY_GLOBAL_EN;
2488 }
2489 
2497 __STATIC_INLINE void DL_GPIO_enableFastWakePins(GPIO_Regs* gpio, uint32_t pins)
2498 {
2499  gpio->FASTWAKE |= pins;
2500 }
2501 
2509 __STATIC_INLINE void DL_GPIO_disableFastWakePins(
2510  GPIO_Regs* gpio, uint32_t pins)
2511 {
2512  gpio->FASTWAKE &= ~(pins);
2513 }
2514 
2521 __STATIC_INLINE void DL_GPIO_enableHiZ(uint32_t pincmIndex)
2522 {
2523  IOMUX->SECCFG.PINCM[pincmIndex] |= IOMUX_PINCM_HIZ1_ENABLE;
2524 }
2525 
2532 __STATIC_INLINE void DL_GPIO_disableHiZ(uint32_t pincmIndex)
2533 {
2534  IOMUX->SECCFG.PINCM[pincmIndex] &= ~(IOMUX_PINCM_HIZ1_ENABLE);
2535 }
2536 
2547 __STATIC_INLINE uint32_t DL_GPIO_getEnabledFastWakePins(
2548  GPIO_Regs* gpio, uint32_t pins)
2549 {
2550  return (gpio->FASTWAKE & pins);
2551 }
2552 
2560 __STATIC_INLINE void DL_GPIO_enableInterrupt(GPIO_Regs* gpio, uint32_t pins)
2561 {
2562  gpio->CPU_INT.IMASK |= pins;
2563 }
2564 
2572 __STATIC_INLINE void DL_GPIO_disableInterrupt(GPIO_Regs* gpio, uint32_t pins)
2573 {
2574  gpio->CPU_INT.IMASK &= ~(pins);
2575 }
2576 
2588 __STATIC_INLINE uint32_t DL_GPIO_getEnabledInterrupts(
2589  GPIO_Regs* gpio, uint32_t pins)
2590 {
2591  return (gpio->CPU_INT.IMASK & pins);
2592 }
2593 
2610 __STATIC_INLINE uint32_t DL_GPIO_getEnabledInterruptStatus(
2611  GPIO_Regs* gpio, uint32_t pins)
2612 {
2613  return (gpio->CPU_INT.MIS & pins);
2614 }
2615 
2627 __STATIC_INLINE void DL_GPIO_setInterrupt(GPIO_Regs* gpio, uint32_t pins)
2628 {
2629  gpio->CPU_INT.ISET = pins;
2630 }
2631 
2647 __STATIC_INLINE uint32_t DL_GPIO_getRawInterruptStatus(
2648  GPIO_Regs* gpio, uint32_t pins)
2649 {
2650  return (gpio->CPU_INT.RIS & pins);
2651 }
2652 
2665 __STATIC_INLINE DL_GPIO_IIDX DL_GPIO_getPendingInterrupt(GPIO_Regs* gpio)
2666 {
2667  return (DL_GPIO_IIDX)(gpio->CPU_INT.IIDX);
2668 }
2669 
2678 __STATIC_INLINE void DL_GPIO_clearInterruptStatus(
2679  GPIO_Regs* gpio, uint32_t pins)
2680 {
2681  gpio->CPU_INT.ICLR |= pins;
2682 }
2683 
2696 __STATIC_INLINE void DL_GPIO_configSubscriber(GPIO_Regs* gpio,
2697  DL_GPIO_SUBSCRIBER_INDEX index, DL_GPIO_SUBSCRIBER_OUT_POLICY policy,
2698  DL_GPIO_SUBSCRIBERx_PIN pinIndex)
2699 
2700 {
2701  volatile uint32_t* pReg = &gpio->SUB0CFG;
2702 
2703  pReg += ((uint32_t) index << 3);
2704 
2705  DL_Common_updateReg(pReg, ((uint32_t) pinIndex | (uint32_t) policy),
2706  (GPIO_SUB0CFG_INDEX_MASK | GPIO_SUB1CFG_OUTPOLICY_MASK));
2707 }
2708 
2716 __STATIC_INLINE void DL_GPIO_enableSubscriber(
2717  GPIO_Regs* gpio, DL_GPIO_SUBSCRIBER_INDEX index)
2718 {
2719  volatile uint32_t* pReg = &gpio->SUB0CFG;
2720 
2721  pReg += ((uint32_t) index << 3);
2722  *(pReg) |= (GPIO_SUB1CFG_ENABLE_SET);
2723 }
2724 
2732 __STATIC_INLINE void DL_GPIO_disableSubscriber(
2733  GPIO_Regs* gpio, DL_GPIO_SUBSCRIBER_INDEX index)
2734 {
2735  volatile uint32_t* pReg = &gpio->SUB0CFG;
2736 
2737  pReg += ((uint32_t) index << 3);
2738  *(pReg) &= ~(GPIO_SUB1CFG_ENABLE_SET);
2739 }
2740 
2751 __STATIC_INLINE bool DL_GPIO_isSubscriberEnabled(
2752  GPIO_Regs* gpio, DL_GPIO_SUBSCRIBER_INDEX index)
2753 {
2754  volatile uint32_t* pReg = &gpio->SUB0CFG;
2755 
2756  pReg += ((uint32_t) index << 3);
2757  return (GPIO_SUB1CFG_ENABLE_SET == (*(pReg) &GPIO_SUB1CFG_ENABLE_MASK));
2758 }
2759 
2770 __STATIC_INLINE void DL_GPIO_setPublisherChanID(
2771  GPIO_Regs* gpio, DL_GPIO_PUBLISHER_INDEX index, uint8_t chanID)
2772 {
2773  volatile uint32_t* pReg = &gpio->FPUB_0;
2774 
2775  *(pReg + (uint32_t) index) =
2776  ((uint32_t) chanID & GPIO_FSUB_0_CHANID_MAXIMUM);
2777 }
2778 
2788 __STATIC_INLINE uint8_t DL_GPIO_getPublisherChanID(
2789  GPIO_Regs* gpio, DL_GPIO_PUBLISHER_INDEX index)
2790 {
2791  volatile uint32_t* pReg = &gpio->FPUB_0;
2792 
2793  return ((uint8_t)(*(pReg + (uint32_t) index) & GPIO_FPUB_0_CHANID_MASK));
2794 }
2795 
2806 __STATIC_INLINE void DL_GPIO_setSubscriberChanID(
2807  GPIO_Regs* gpio, DL_GPIO_SUBSCRIBER_INDEX index, uint8_t chanID)
2808 {
2809  volatile uint32_t* pReg = &gpio->FSUB_0;
2810 
2811  *(pReg + (uint32_t) index) =
2812  ((uint32_t) chanID & GPIO_FSUB_0_CHANID_MAXIMUM);
2813 }
2814 
2824 __STATIC_INLINE uint8_t DL_GPIO_getSubscriberChanID(
2825  GPIO_Regs* gpio, DL_GPIO_SUBSCRIBER_INDEX index)
2826 {
2827  volatile uint32_t* pReg = &gpio->FSUB_0;
2828 
2829  return ((uint8_t)(*(pReg + (uint32_t) index) & GPIO_FSUB_0_CHANID_MASK));
2830 }
2831 
2844 __STATIC_INLINE void DL_GPIO_enableEvents(
2845  GPIO_Regs* gpio, DL_GPIO_EVENT_ROUTE index, uint32_t pins)
2846 {
2847  switch (index) {
2848  case DL_GPIO_EVENT_ROUTE_1:
2849  gpio->GEN_EVENT0.IMASK |= (pins & 0x0000FFFFU);
2850  break;
2851  case DL_GPIO_EVENT_ROUTE_2:
2852  gpio->GEN_EVENT1.IMASK |= (pins & 0xFFFF0000U);
2853  break;
2854  default:
2855  break;
2856  }
2857 }
2858 
2871 __STATIC_INLINE void DL_GPIO_disableEvents(
2872  GPIO_Regs* gpio, DL_GPIO_EVENT_ROUTE index, uint32_t pins)
2873 {
2874  switch (index) {
2875  case DL_GPIO_EVENT_ROUTE_1:
2876  gpio->GEN_EVENT0.IMASK &= ~(pins & 0x0000FFFFU);
2877  break;
2878  case DL_GPIO_EVENT_ROUTE_2:
2879  gpio->GEN_EVENT1.IMASK &= ~(pins & 0xFFFF0000U);
2880  break;
2881  default:
2882  break;
2883  }
2884 }
2885 
2902 __STATIC_INLINE uint32_t DL_GPIO_getEnabledEvents(
2903  GPIO_Regs* gpio, DL_GPIO_EVENT_ROUTE index, uint32_t pins)
2904 {
2905  volatile uint32_t* pReg = &gpio->GEN_EVENT0.IMASK;
2906 
2907  return ((*(pReg + (uint32_t) index) & pins));
2908 }
2909 
2928 __STATIC_INLINE uint32_t DL_GPIO_getEnabledEventStatus(
2929  GPIO_Regs* gpio, DL_GPIO_EVENT_ROUTE index, uint32_t pins)
2930 {
2931  const volatile uint32_t* pReg = &gpio->GEN_EVENT0.MIS;
2932 
2933  return ((*(pReg + (uint32_t) index) & pins));
2934 }
2935 
2948 __STATIC_INLINE void DL_GPIO_clearEventStatus(
2949  GPIO_Regs* gpio, DL_GPIO_EVENT_ROUTE index, uint32_t pins)
2950 {
2951  switch (index) {
2952  case DL_GPIO_EVENT_ROUTE_1:
2953  gpio->GEN_EVENT0.ICLR |= (pins & 0x0000FFFFU);
2954  break;
2955  case DL_GPIO_EVENT_ROUTE_2:
2956  gpio->GEN_EVENT1.ICLR |= (pins & 0xFFFF0000U);
2957  break;
2958  default:
2959  break;
2960  }
2961 }
2962 
2963 #ifdef __cplusplus
2964 }
2965 #endif
2966 
2967 #endif /* __MSPM0_HAS_GPIO__ */
2968 
2969 #endif /* ti_dl_dl_gpio__include */
2970 
__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:2328
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:2273
__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:2214
__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:2824
__STATIC_INLINE bool DL_GPIO_isSubscriberEnabled(GPIO_Regs *gpio, DL_GPIO_SUBSCRIBER_INDEX index)
Returns if GPIO subscriber is enabled.
Definition: dl_gpio.h:2751
__STATIC_INLINE uint32_t DL_GPIO_getEnabledInterruptStatus(GPIO_Regs *gpio, uint32_t pins)
Check interrupt flag of enabled GPIO interrupts.
Definition: dl_gpio.h:2610
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:1985
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:2509
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:1967
__STATIC_INLINE void DL_GPIO_disableWakeUp(uint32_t pincmIndex)
Clear GPIO pin&#39;s wakeup enable bit.
Definition: dl_gpio.h:2154
__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:2485
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:2902
__STATIC_INLINE void DL_GPIO_initPeripheralAnalogFunction(uint32_t pincmIndex)
Configure a pin to operate with analog functionality.
Definition: dl_gpio.h:2128
__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:2627
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:2465
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:2167
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:2284
__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:2844
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:2497
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:2948
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:2647
__STATIC_INLINE DL_GPIO_IIDX DL_GPIO_getPendingInterrupt(GPIO_Regs *gpio)
Get highest priority pending GPIO interrupt.
Definition: dl_gpio.h:2665
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:2317
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:2521
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:2382
__STATIC_INLINE void DL_GPIO_enableSubscriber(GPIO_Regs *gpio, DL_GPIO_SUBSCRIBER_INDEX index)
Enables GPIO subscriber.
Definition: dl_gpio.h:2716
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:2788
Definition: dl_gpio.h:1729
__STATIC_INLINE void DL_GPIO_enableGlobalFastWake(GPIO_Regs *gpio)
Enable Global Fast Wake.
Definition: dl_gpio.h:2475
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:2356
__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:2451
__STATIC_INLINE void DL_GPIO_enableInterrupt(GPIO_Regs *gpio, uint32_t pins)
Enable GPIO interrupts.
Definition: dl_gpio.h:2560
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:2588
__STATIC_INLINE void DL_GPIO_enableWakeUp(uint32_t pincmIndex)
Set GPIO pin&#39;s wakeup enable bit.
Definition: dl_gpio.h:2142
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:2231
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:2007
__STATIC_INLINE void DL_GPIO_disableSubscriber(GPIO_Regs *gpio, DL_GPIO_SUBSCRIBER_INDEX index)
Disables GPIO subscriber.
Definition: dl_gpio.h:2732
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:2411
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:2436
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:2369
__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:2696
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:2198
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:2547
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:2397
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:2340
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:2806
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:2258
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:2871
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:2181
__STATIC_INLINE void DL_GPIO_disableHiZ(uint32_t pincmIndex)
Disable Hi-Z for the pin.
Definition: dl_gpio.h:2532
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:2678
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:2572
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:2243
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:2423
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:2295
__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:2928
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:2306
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:2770
Definition: dl_gpio.h:1779
© Copyright 1995-2025, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale