35 #ifndef __ALT_SOCAL_GPIO_H__
36 #define __ALT_SOCAL_GPIO_H__
90 #define ALT_GPIO_SWPORTA_DR_GPIO_SWPORTA_DR_LSB 0
92 #define ALT_GPIO_SWPORTA_DR_GPIO_SWPORTA_DR_MSB 23
94 #define ALT_GPIO_SWPORTA_DR_GPIO_SWPORTA_DR_WIDTH 24
96 #define ALT_GPIO_SWPORTA_DR_GPIO_SWPORTA_DR_SET_MSK 0x00ffffff
98 #define ALT_GPIO_SWPORTA_DR_GPIO_SWPORTA_DR_CLR_MSK 0xff000000
100 #define ALT_GPIO_SWPORTA_DR_GPIO_SWPORTA_DR_RESET 0x0
102 #define ALT_GPIO_SWPORTA_DR_GPIO_SWPORTA_DR_GET(value) (((value) & 0x00ffffff) >> 0)
104 #define ALT_GPIO_SWPORTA_DR_GPIO_SWPORTA_DR_SET(value) (((value) << 0) & 0x00ffffff)
117 struct ALT_GPIO_SWPORTA_DR_s
119 uint32_t gpio_swporta_dr : 24;
124 typedef volatile struct ALT_GPIO_SWPORTA_DR_s ALT_GPIO_SWPORTA_DR_t;
128 #define ALT_GPIO_SWPORTA_DR_RESET 0x00000000
130 #define ALT_GPIO_SWPORTA_DR_OFST 0x0
132 #define ALT_GPIO_SWPORTA_DR_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_GPIO_SWPORTA_DR_OFST))
183 #define ALT_GPIO_SWPORTA_DDR_GPIO_SWPORTA_DDR_E_IN 0x0
189 #define ALT_GPIO_SWPORTA_DDR_GPIO_SWPORTA_DDR_E_OUT 0x1
192 #define ALT_GPIO_SWPORTA_DDR_GPIO_SWPORTA_DDR_LSB 0
194 #define ALT_GPIO_SWPORTA_DDR_GPIO_SWPORTA_DDR_MSB 23
196 #define ALT_GPIO_SWPORTA_DDR_GPIO_SWPORTA_DDR_WIDTH 24
198 #define ALT_GPIO_SWPORTA_DDR_GPIO_SWPORTA_DDR_SET_MSK 0x00ffffff
200 #define ALT_GPIO_SWPORTA_DDR_GPIO_SWPORTA_DDR_CLR_MSK 0xff000000
202 #define ALT_GPIO_SWPORTA_DDR_GPIO_SWPORTA_DDR_RESET 0x0
204 #define ALT_GPIO_SWPORTA_DDR_GPIO_SWPORTA_DDR_GET(value) (((value) & 0x00ffffff) >> 0)
206 #define ALT_GPIO_SWPORTA_DDR_GPIO_SWPORTA_DDR_SET(value) (((value) << 0) & 0x00ffffff)
219 struct ALT_GPIO_SWPORTA_DDR_s
221 uint32_t gpio_swporta_ddr : 24;
226 typedef volatile struct ALT_GPIO_SWPORTA_DDR_s ALT_GPIO_SWPORTA_DDR_t;
230 #define ALT_GPIO_SWPORTA_DDR_RESET 0x00000000
232 #define ALT_GPIO_SWPORTA_DDR_OFST 0x4
234 #define ALT_GPIO_SWPORTA_DDR_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_GPIO_SWPORTA_DDR_OFST))
293 #define ALT_GPIO_INTEN_GPIO_INTEN_E_DIS 0x0
299 #define ALT_GPIO_INTEN_GPIO_INTEN_E_EN 0x1
302 #define ALT_GPIO_INTEN_GPIO_INTEN_LSB 0
304 #define ALT_GPIO_INTEN_GPIO_INTEN_MSB 23
306 #define ALT_GPIO_INTEN_GPIO_INTEN_WIDTH 24
308 #define ALT_GPIO_INTEN_GPIO_INTEN_SET_MSK 0x00ffffff
310 #define ALT_GPIO_INTEN_GPIO_INTEN_CLR_MSK 0xff000000
312 #define ALT_GPIO_INTEN_GPIO_INTEN_RESET 0x0
314 #define ALT_GPIO_INTEN_GPIO_INTEN_GET(value) (((value) & 0x00ffffff) >> 0)
316 #define ALT_GPIO_INTEN_GPIO_INTEN_SET(value) (((value) << 0) & 0x00ffffff)
329 struct ALT_GPIO_INTEN_s
331 uint32_t gpio_inten : 24;
336 typedef volatile struct ALT_GPIO_INTEN_s ALT_GPIO_INTEN_t;
340 #define ALT_GPIO_INTEN_RESET 0x00000000
342 #define ALT_GPIO_INTEN_OFST 0x30
344 #define ALT_GPIO_INTEN_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_GPIO_INTEN_OFST))
401 #define ALT_GPIO_INTMSK_GPIO_INTMSK_E_DIS 0x0
407 #define ALT_GPIO_INTMSK_GPIO_INTMSK_E_EN 0x1
410 #define ALT_GPIO_INTMSK_GPIO_INTMSK_LSB 0
412 #define ALT_GPIO_INTMSK_GPIO_INTMSK_MSB 23
414 #define ALT_GPIO_INTMSK_GPIO_INTMSK_WIDTH 24
416 #define ALT_GPIO_INTMSK_GPIO_INTMSK_SET_MSK 0x00ffffff
418 #define ALT_GPIO_INTMSK_GPIO_INTMSK_CLR_MSK 0xff000000
420 #define ALT_GPIO_INTMSK_GPIO_INTMSK_RESET 0x0
422 #define ALT_GPIO_INTMSK_GPIO_INTMSK_GET(value) (((value) & 0x00ffffff) >> 0)
424 #define ALT_GPIO_INTMSK_GPIO_INTMSK_SET(value) (((value) << 0) & 0x00ffffff)
437 struct ALT_GPIO_INTMSK_s
439 uint32_t gpio_intmask : 24;
444 typedef volatile struct ALT_GPIO_INTMSK_s ALT_GPIO_INTMSK_t;
448 #define ALT_GPIO_INTMSK_RESET 0x00000000
450 #define ALT_GPIO_INTMSK_OFST 0x34
452 #define ALT_GPIO_INTMSK_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_GPIO_INTMSK_OFST))
503 #define ALT_GPIO_INTTYPE_LEVEL_GPIO_INTTYPE_LEVEL_E_LEVEL 0x0
509 #define ALT_GPIO_INTTYPE_LEVEL_GPIO_INTTYPE_LEVEL_E_EDGE 0x1
512 #define ALT_GPIO_INTTYPE_LEVEL_GPIO_INTTYPE_LEVEL_LSB 0
514 #define ALT_GPIO_INTTYPE_LEVEL_GPIO_INTTYPE_LEVEL_MSB 23
516 #define ALT_GPIO_INTTYPE_LEVEL_GPIO_INTTYPE_LEVEL_WIDTH 24
518 #define ALT_GPIO_INTTYPE_LEVEL_GPIO_INTTYPE_LEVEL_SET_MSK 0x00ffffff
520 #define ALT_GPIO_INTTYPE_LEVEL_GPIO_INTTYPE_LEVEL_CLR_MSK 0xff000000
522 #define ALT_GPIO_INTTYPE_LEVEL_GPIO_INTTYPE_LEVEL_RESET 0x0
524 #define ALT_GPIO_INTTYPE_LEVEL_GPIO_INTTYPE_LEVEL_GET(value) (((value) & 0x00ffffff) >> 0)
526 #define ALT_GPIO_INTTYPE_LEVEL_GPIO_INTTYPE_LEVEL_SET(value) (((value) << 0) & 0x00ffffff)
539 struct ALT_GPIO_INTTYPE_LEVEL_s
541 uint32_t gpio_inttype_level : 24;
546 typedef volatile struct ALT_GPIO_INTTYPE_LEVEL_s ALT_GPIO_INTTYPE_LEVEL_t;
550 #define ALT_GPIO_INTTYPE_LEVEL_RESET 0x00000000
552 #define ALT_GPIO_INTTYPE_LEVEL_OFST 0x38
554 #define ALT_GPIO_INTTYPE_LEVEL_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_GPIO_INTTYPE_LEVEL_OFST))
607 #define ALT_GPIO_INT_POL_GPIO_INT_POL_E_ACTLOW 0x0
613 #define ALT_GPIO_INT_POL_GPIO_INT_POL_E_ACTHIGH 0x1
616 #define ALT_GPIO_INT_POL_GPIO_INT_POL_LSB 0
618 #define ALT_GPIO_INT_POL_GPIO_INT_POL_MSB 23
620 #define ALT_GPIO_INT_POL_GPIO_INT_POL_WIDTH 24
622 #define ALT_GPIO_INT_POL_GPIO_INT_POL_SET_MSK 0x00ffffff
624 #define ALT_GPIO_INT_POL_GPIO_INT_POL_CLR_MSK 0xff000000
626 #define ALT_GPIO_INT_POL_GPIO_INT_POL_RESET 0x0
628 #define ALT_GPIO_INT_POL_GPIO_INT_POL_GET(value) (((value) & 0x00ffffff) >> 0)
630 #define ALT_GPIO_INT_POL_GPIO_INT_POL_SET(value) (((value) << 0) & 0x00ffffff)
643 struct ALT_GPIO_INT_POL_s
645 uint32_t gpio_int_polarity : 24;
650 typedef volatile struct ALT_GPIO_INT_POL_s ALT_GPIO_INT_POL_t;
654 #define ALT_GPIO_INT_POL_RESET 0x00000000
656 #define ALT_GPIO_INT_POL_OFST 0x3c
658 #define ALT_GPIO_INT_POL_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_GPIO_INT_POL_OFST))
699 #define ALT_GPIO_INTSTAT_GPIO_INTSTAT_E_INACT 0x0
705 #define ALT_GPIO_INTSTAT_GPIO_INTSTAT_E_ACT 0x1
708 #define ALT_GPIO_INTSTAT_GPIO_INTSTAT_LSB 0
710 #define ALT_GPIO_INTSTAT_GPIO_INTSTAT_MSB 23
712 #define ALT_GPIO_INTSTAT_GPIO_INTSTAT_WIDTH 24
714 #define ALT_GPIO_INTSTAT_GPIO_INTSTAT_SET_MSK 0x00ffffff
716 #define ALT_GPIO_INTSTAT_GPIO_INTSTAT_CLR_MSK 0xff000000
718 #define ALT_GPIO_INTSTAT_GPIO_INTSTAT_RESET 0x0
720 #define ALT_GPIO_INTSTAT_GPIO_INTSTAT_GET(value) (((value) & 0x00ffffff) >> 0)
722 #define ALT_GPIO_INTSTAT_GPIO_INTSTAT_SET(value) (((value) << 0) & 0x00ffffff)
735 struct ALT_GPIO_INTSTAT_s
737 const uint32_t gpio_intstatus : 24;
742 typedef volatile struct ALT_GPIO_INTSTAT_s ALT_GPIO_INTSTAT_t;
746 #define ALT_GPIO_INTSTAT_RESET 0x00000000
748 #define ALT_GPIO_INTSTAT_OFST 0x40
750 #define ALT_GPIO_INTSTAT_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_GPIO_INTSTAT_OFST))
791 #define ALT_GPIO_RAW_INTSTAT_GPIO_RAW_INTSTAT_E_INACT 0x0
797 #define ALT_GPIO_RAW_INTSTAT_GPIO_RAW_INTSTAT_E_ACT 0x1
800 #define ALT_GPIO_RAW_INTSTAT_GPIO_RAW_INTSTAT_LSB 0
802 #define ALT_GPIO_RAW_INTSTAT_GPIO_RAW_INTSTAT_MSB 23
804 #define ALT_GPIO_RAW_INTSTAT_GPIO_RAW_INTSTAT_WIDTH 24
806 #define ALT_GPIO_RAW_INTSTAT_GPIO_RAW_INTSTAT_SET_MSK 0x00ffffff
808 #define ALT_GPIO_RAW_INTSTAT_GPIO_RAW_INTSTAT_CLR_MSK 0xff000000
810 #define ALT_GPIO_RAW_INTSTAT_GPIO_RAW_INTSTAT_RESET 0x0
812 #define ALT_GPIO_RAW_INTSTAT_GPIO_RAW_INTSTAT_GET(value) (((value) & 0x00ffffff) >> 0)
814 #define ALT_GPIO_RAW_INTSTAT_GPIO_RAW_INTSTAT_SET(value) (((value) << 0) & 0x00ffffff)
827 struct ALT_GPIO_RAW_INTSTAT_s
829 const uint32_t gpio_raw_intstatus : 24;
834 typedef volatile struct ALT_GPIO_RAW_INTSTAT_s ALT_GPIO_RAW_INTSTAT_t;
838 #define ALT_GPIO_RAW_INTSTAT_RESET 0x00000000
840 #define ALT_GPIO_RAW_INTSTAT_OFST 0x44
842 #define ALT_GPIO_RAW_INTSTAT_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_GPIO_RAW_INTSTAT_OFST))
897 #define ALT_GPIO_DEBOUNCE_GPIO_DEBOUNCE_E_DIS 0x0
903 #define ALT_GPIO_DEBOUNCE_GPIO_DEBOUNCE_E_EN 0x1
906 #define ALT_GPIO_DEBOUNCE_GPIO_DEBOUNCE_LSB 0
908 #define ALT_GPIO_DEBOUNCE_GPIO_DEBOUNCE_MSB 23
910 #define ALT_GPIO_DEBOUNCE_GPIO_DEBOUNCE_WIDTH 24
912 #define ALT_GPIO_DEBOUNCE_GPIO_DEBOUNCE_SET_MSK 0x00ffffff
914 #define ALT_GPIO_DEBOUNCE_GPIO_DEBOUNCE_CLR_MSK 0xff000000
916 #define ALT_GPIO_DEBOUNCE_GPIO_DEBOUNCE_RESET 0x0
918 #define ALT_GPIO_DEBOUNCE_GPIO_DEBOUNCE_GET(value) (((value) & 0x00ffffff) >> 0)
920 #define ALT_GPIO_DEBOUNCE_GPIO_DEBOUNCE_SET(value) (((value) << 0) & 0x00ffffff)
933 struct ALT_GPIO_DEBOUNCE_s
935 uint32_t gpio_debounce : 24;
940 typedef volatile struct ALT_GPIO_DEBOUNCE_s ALT_GPIO_DEBOUNCE_t;
944 #define ALT_GPIO_DEBOUNCE_RESET 0x00000000
946 #define ALT_GPIO_DEBOUNCE_OFST 0x48
948 #define ALT_GPIO_DEBOUNCE_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_GPIO_DEBOUNCE_OFST))
999 #define ALT_GPIO_PORTA_EOI_GPIO_PORTA_EOI_E_NOCLR 0x0
1005 #define ALT_GPIO_PORTA_EOI_GPIO_PORTA_EOI_E_CLR 0x1
1008 #define ALT_GPIO_PORTA_EOI_GPIO_PORTA_EOI_LSB 0
1010 #define ALT_GPIO_PORTA_EOI_GPIO_PORTA_EOI_MSB 23
1012 #define ALT_GPIO_PORTA_EOI_GPIO_PORTA_EOI_WIDTH 24
1014 #define ALT_GPIO_PORTA_EOI_GPIO_PORTA_EOI_SET_MSK 0x00ffffff
1016 #define ALT_GPIO_PORTA_EOI_GPIO_PORTA_EOI_CLR_MSK 0xff000000
1018 #define ALT_GPIO_PORTA_EOI_GPIO_PORTA_EOI_RESET 0x0
1020 #define ALT_GPIO_PORTA_EOI_GPIO_PORTA_EOI_GET(value) (((value) & 0x00ffffff) >> 0)
1022 #define ALT_GPIO_PORTA_EOI_GPIO_PORTA_EOI_SET(value) (((value) << 0) & 0x00ffffff)
1024 #ifndef __ASSEMBLY__
1035 struct ALT_GPIO_PORTA_EOI_s
1037 uint32_t gpio_porta_eoi : 24;
1042 typedef volatile struct ALT_GPIO_PORTA_EOI_s ALT_GPIO_PORTA_EOI_t;
1046 #define ALT_GPIO_PORTA_EOI_RESET 0x00000000
1048 #define ALT_GPIO_PORTA_EOI_OFST 0x4c
1050 #define ALT_GPIO_PORTA_EOI_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_GPIO_PORTA_EOI_OFST))
1086 #define ALT_GPIO_EXT_PORTA_GPIO_EXT_PORTA_LSB 0
1088 #define ALT_GPIO_EXT_PORTA_GPIO_EXT_PORTA_MSB 23
1090 #define ALT_GPIO_EXT_PORTA_GPIO_EXT_PORTA_WIDTH 24
1092 #define ALT_GPIO_EXT_PORTA_GPIO_EXT_PORTA_SET_MSK 0x00ffffff
1094 #define ALT_GPIO_EXT_PORTA_GPIO_EXT_PORTA_CLR_MSK 0xff000000
1096 #define ALT_GPIO_EXT_PORTA_GPIO_EXT_PORTA_RESET 0x0
1098 #define ALT_GPIO_EXT_PORTA_GPIO_EXT_PORTA_GET(value) (((value) & 0x00ffffff) >> 0)
1100 #define ALT_GPIO_EXT_PORTA_GPIO_EXT_PORTA_SET(value) (((value) << 0) & 0x00ffffff)
1102 #ifndef __ASSEMBLY__
1113 struct ALT_GPIO_EXT_PORTA_s
1115 const uint32_t gpio_ext_porta : 24;
1120 typedef volatile struct ALT_GPIO_EXT_PORTA_s ALT_GPIO_EXT_PORTA_t;
1124 #define ALT_GPIO_EXT_PORTA_RESET 0x00000000
1126 #define ALT_GPIO_EXT_PORTA_OFST 0x50
1128 #define ALT_GPIO_EXT_PORTA_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_GPIO_EXT_PORTA_OFST))
1175 #define ALT_GPIO_LS_SYNC_GPIO_LS_SYNC_E_NOSYNC 0x0
1181 #define ALT_GPIO_LS_SYNC_GPIO_LS_SYNC_E_SYNC 0x1
1184 #define ALT_GPIO_LS_SYNC_GPIO_LS_SYNC_LSB 0
1186 #define ALT_GPIO_LS_SYNC_GPIO_LS_SYNC_MSB 0
1188 #define ALT_GPIO_LS_SYNC_GPIO_LS_SYNC_WIDTH 1
1190 #define ALT_GPIO_LS_SYNC_GPIO_LS_SYNC_SET_MSK 0x00000001
1192 #define ALT_GPIO_LS_SYNC_GPIO_LS_SYNC_CLR_MSK 0xfffffffe
1194 #define ALT_GPIO_LS_SYNC_GPIO_LS_SYNC_RESET 0x0
1196 #define ALT_GPIO_LS_SYNC_GPIO_LS_SYNC_GET(value) (((value) & 0x00000001) >> 0)
1198 #define ALT_GPIO_LS_SYNC_GPIO_LS_SYNC_SET(value) (((value) << 0) & 0x00000001)
1200 #ifndef __ASSEMBLY__
1211 struct ALT_GPIO_LS_SYNC_s
1213 uint32_t gpio_ls_sync : 1;
1218 typedef volatile struct ALT_GPIO_LS_SYNC_s ALT_GPIO_LS_SYNC_t;
1222 #define ALT_GPIO_LS_SYNC_RESET 0x00000000
1224 #define ALT_GPIO_LS_SYNC_OFST 0x60
1226 #define ALT_GPIO_LS_SYNC_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_GPIO_LS_SYNC_OFST))
1257 #define ALT_GPIO_ID_CODE_GPIO_ID_CODE_LSB 0
1259 #define ALT_GPIO_ID_CODE_GPIO_ID_CODE_MSB 31
1261 #define ALT_GPIO_ID_CODE_GPIO_ID_CODE_WIDTH 32
1263 #define ALT_GPIO_ID_CODE_GPIO_ID_CODE_SET_MSK 0xffffffff
1265 #define ALT_GPIO_ID_CODE_GPIO_ID_CODE_CLR_MSK 0x00000000
1267 #define ALT_GPIO_ID_CODE_GPIO_ID_CODE_RESET 0x0
1269 #define ALT_GPIO_ID_CODE_GPIO_ID_CODE_GET(value) (((value) & 0xffffffff) >> 0)
1271 #define ALT_GPIO_ID_CODE_GPIO_ID_CODE_SET(value) (((value) << 0) & 0xffffffff)
1273 #ifndef __ASSEMBLY__
1284 struct ALT_GPIO_ID_CODE_s
1286 const uint32_t gpio_id_code : 32;
1290 typedef volatile struct ALT_GPIO_ID_CODE_s ALT_GPIO_ID_CODE_t;
1294 #define ALT_GPIO_ID_CODE_RESET 0x00000000
1296 #define ALT_GPIO_ID_CODE_OFST 0x64
1298 #define ALT_GPIO_ID_CODE_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_GPIO_ID_CODE_OFST))
1327 #define ALT_GPIO_VER_ID_CODE_GPIO_VER_ID_CODE_LSB 0
1329 #define ALT_GPIO_VER_ID_CODE_GPIO_VER_ID_CODE_MSB 31
1331 #define ALT_GPIO_VER_ID_CODE_GPIO_VER_ID_CODE_WIDTH 32
1333 #define ALT_GPIO_VER_ID_CODE_GPIO_VER_ID_CODE_SET_MSK 0xffffffff
1335 #define ALT_GPIO_VER_ID_CODE_GPIO_VER_ID_CODE_CLR_MSK 0x00000000
1337 #define ALT_GPIO_VER_ID_CODE_GPIO_VER_ID_CODE_RESET 0x3230392a
1339 #define ALT_GPIO_VER_ID_CODE_GPIO_VER_ID_CODE_GET(value) (((value) & 0xffffffff) >> 0)
1341 #define ALT_GPIO_VER_ID_CODE_GPIO_VER_ID_CODE_SET(value) (((value) << 0) & 0xffffffff)
1343 #ifndef __ASSEMBLY__
1354 struct ALT_GPIO_VER_ID_CODE_s
1356 const uint32_t gpio_ver_id_code : 32;
1360 typedef volatile struct ALT_GPIO_VER_ID_CODE_s ALT_GPIO_VER_ID_CODE_t;
1364 #define ALT_GPIO_VER_ID_CODE_RESET 0x3230392a
1366 #define ALT_GPIO_VER_ID_CODE_OFST 0x6c
1368 #define ALT_GPIO_VER_ID_CODE_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_GPIO_VER_ID_CODE_OFST))
1422 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_A_E_WIDTHLESSONE8BITS 0x7
1428 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_A_E_WIDTHLESSONE24BITS 0x1c
1431 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_A_LSB 0
1433 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_A_MSB 4
1435 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_A_WIDTH 5
1437 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_A_SET_MSK 0x0000001f
1439 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_A_CLR_MSK 0xffffffe0
1441 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_A_RESET 0x17
1443 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_A_GET(value) (((value) & 0x0000001f) >> 0)
1445 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_A_SET(value) (((value) << 0) & 0x0000001f)
1477 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_B_E_WIDTHLESSONE8BITS 0x7
1483 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_B_E_WIDTHLESSONE24BITS 0x1c
1486 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_B_LSB 5
1488 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_B_MSB 9
1490 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_B_WIDTH 5
1492 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_B_SET_MSK 0x000003e0
1494 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_B_CLR_MSK 0xfffffc1f
1496 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_B_RESET 0x7
1498 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_B_GET(value) (((value) & 0x000003e0) >> 5)
1500 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_B_SET(value) (((value) << 5) & 0x000003e0)
1532 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_C_E_WIDTHLESSONE8BITS 0x7
1538 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_C_E_WIDTHLESSONE24BITS 0x1c
1541 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_C_LSB 10
1543 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_C_MSB 14
1545 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_C_WIDTH 5
1547 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_C_SET_MSK 0x00007c00
1549 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_C_CLR_MSK 0xffff83ff
1551 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_C_RESET 0x7
1553 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_C_GET(value) (((value) & 0x00007c00) >> 10)
1555 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_C_SET(value) (((value) << 10) & 0x00007c00)
1587 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_D_E_WIDTHLESSONE8BITS 0x7
1593 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_D_E_WIDTHLESSONE24BITS 0x1c
1596 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_D_LSB 15
1598 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_D_MSB 19
1600 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_D_WIDTH 5
1602 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_D_SET_MSK 0x000f8000
1604 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_D_CLR_MSK 0xfff07fff
1606 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_D_RESET 0x7
1608 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_D_GET(value) (((value) & 0x000f8000) >> 15)
1610 #define ALT_GPIO_CFG_REG2_ENC_ID_PWIDTH_D_SET(value) (((value) << 15) & 0x000f8000)
1612 #ifndef __ASSEMBLY__
1623 struct ALT_GPIO_CFG_REG2_s
1625 const uint32_t encoded_id_pwidth_a : 5;
1626 const uint32_t encoded_id_pwidth_b : 5;
1627 const uint32_t encoded_id_pwidth_c : 5;
1628 const uint32_t encoded_id_pwidth_d : 5;
1633 typedef volatile struct ALT_GPIO_CFG_REG2_s ALT_GPIO_CFG_REG2_t;
1637 #define ALT_GPIO_CFG_REG2_RESET 0x00039cf7
1639 #define ALT_GPIO_CFG_REG2_OFST 0x70
1641 #define ALT_GPIO_CFG_REG2_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_GPIO_CFG_REG2_OFST))
1705 #define ALT_GPIO_CFG_REG1_APB_DATA_WIDTH_E_WIDTH32BITS 0x2
1708 #define ALT_GPIO_CFG_REG1_APB_DATA_WIDTH_LSB 0
1710 #define ALT_GPIO_CFG_REG1_APB_DATA_WIDTH_MSB 1
1712 #define ALT_GPIO_CFG_REG1_APB_DATA_WIDTH_WIDTH 2
1714 #define ALT_GPIO_CFG_REG1_APB_DATA_WIDTH_SET_MSK 0x00000003
1716 #define ALT_GPIO_CFG_REG1_APB_DATA_WIDTH_CLR_MSK 0xfffffffc
1718 #define ALT_GPIO_CFG_REG1_APB_DATA_WIDTH_RESET 0x2
1720 #define ALT_GPIO_CFG_REG1_APB_DATA_WIDTH_GET(value) (((value) & 0x00000003) >> 0)
1722 #define ALT_GPIO_CFG_REG1_APB_DATA_WIDTH_SET(value) (((value) << 0) & 0x00000003)
1753 #define ALT_GPIO_CFG_REG1_NUM_PORTS_E_ONEPORTA 0x0
1756 #define ALT_GPIO_CFG_REG1_NUM_PORTS_LSB 2
1758 #define ALT_GPIO_CFG_REG1_NUM_PORTS_MSB 3
1760 #define ALT_GPIO_CFG_REG1_NUM_PORTS_WIDTH 2
1762 #define ALT_GPIO_CFG_REG1_NUM_PORTS_SET_MSK 0x0000000c
1764 #define ALT_GPIO_CFG_REG1_NUM_PORTS_CLR_MSK 0xfffffff3
1766 #define ALT_GPIO_CFG_REG1_NUM_PORTS_RESET 0x0
1768 #define ALT_GPIO_CFG_REG1_NUM_PORTS_GET(value) (((value) & 0x0000000c) >> 2)
1770 #define ALT_GPIO_CFG_REG1_NUM_PORTS_SET(value) (((value) << 2) & 0x0000000c)
1797 #define ALT_GPIO_CFG_REG1_PORTA_SINGLE_CTL_E_SOFTCTLONLY 0x1
1800 #define ALT_GPIO_CFG_REG1_PORTA_SINGLE_CTL_LSB 4
1802 #define ALT_GPIO_CFG_REG1_PORTA_SINGLE_CTL_MSB 4
1804 #define ALT_GPIO_CFG_REG1_PORTA_SINGLE_CTL_WIDTH 1
1806 #define ALT_GPIO_CFG_REG1_PORTA_SINGLE_CTL_SET_MSK 0x00000010
1808 #define ALT_GPIO_CFG_REG1_PORTA_SINGLE_CTL_CLR_MSK 0xffffffef
1810 #define ALT_GPIO_CFG_REG1_PORTA_SINGLE_CTL_RESET 0x1
1812 #define ALT_GPIO_CFG_REG1_PORTA_SINGLE_CTL_GET(value) (((value) & 0x00000010) >> 4)
1814 #define ALT_GPIO_CFG_REG1_PORTA_SINGLE_CTL_SET(value) (((value) << 4) & 0x00000010)
1841 #define ALT_GPIO_CFG_REG1_PORTB_SINGLE_CTL_E_SOFTCTLONLY 0x1
1844 #define ALT_GPIO_CFG_REG1_PORTB_SINGLE_CTL_LSB 5
1846 #define ALT_GPIO_CFG_REG1_PORTB_SINGLE_CTL_MSB 5
1848 #define ALT_GPIO_CFG_REG1_PORTB_SINGLE_CTL_WIDTH 1
1850 #define ALT_GPIO_CFG_REG1_PORTB_SINGLE_CTL_SET_MSK 0x00000020
1852 #define ALT_GPIO_CFG_REG1_PORTB_SINGLE_CTL_CLR_MSK 0xffffffdf
1854 #define ALT_GPIO_CFG_REG1_PORTB_SINGLE_CTL_RESET 0x1
1856 #define ALT_GPIO_CFG_REG1_PORTB_SINGLE_CTL_GET(value) (((value) & 0x00000020) >> 5)
1858 #define ALT_GPIO_CFG_REG1_PORTB_SINGLE_CTL_SET(value) (((value) << 5) & 0x00000020)
1885 #define ALT_GPIO_CFG_REG1_PORTC_SINGLE_CTL_E_SOFTCTLONLY 0x1
1888 #define ALT_GPIO_CFG_REG1_PORTC_SINGLE_CTL_LSB 6
1890 #define ALT_GPIO_CFG_REG1_PORTC_SINGLE_CTL_MSB 6
1892 #define ALT_GPIO_CFG_REG1_PORTC_SINGLE_CTL_WIDTH 1
1894 #define ALT_GPIO_CFG_REG1_PORTC_SINGLE_CTL_SET_MSK 0x00000040
1896 #define ALT_GPIO_CFG_REG1_PORTC_SINGLE_CTL_CLR_MSK 0xffffffbf
1898 #define ALT_GPIO_CFG_REG1_PORTC_SINGLE_CTL_RESET 0x1
1900 #define ALT_GPIO_CFG_REG1_PORTC_SINGLE_CTL_GET(value) (((value) & 0x00000040) >> 6)
1902 #define ALT_GPIO_CFG_REG1_PORTC_SINGLE_CTL_SET(value) (((value) << 6) & 0x00000040)
1929 #define ALT_GPIO_CFG_REG1_PORTD_SINGLE_CTL_E_SOFTCTLONLY 0x1
1932 #define ALT_GPIO_CFG_REG1_PORTD_SINGLE_CTL_LSB 7
1934 #define ALT_GPIO_CFG_REG1_PORTD_SINGLE_CTL_MSB 7
1936 #define ALT_GPIO_CFG_REG1_PORTD_SINGLE_CTL_WIDTH 1
1938 #define ALT_GPIO_CFG_REG1_PORTD_SINGLE_CTL_SET_MSK 0x00000080
1940 #define ALT_GPIO_CFG_REG1_PORTD_SINGLE_CTL_CLR_MSK 0xffffff7f
1942 #define ALT_GPIO_CFG_REG1_PORTD_SINGLE_CTL_RESET 0x1
1944 #define ALT_GPIO_CFG_REG1_PORTD_SINGLE_CTL_GET(value) (((value) & 0x00000080) >> 7)
1946 #define ALT_GPIO_CFG_REG1_PORTD_SINGLE_CTL_SET(value) (((value) << 7) & 0x00000080)
1973 #define ALT_GPIO_CFG_REG1_HW_PORTA_E_PORTANOHARD 0x0
1976 #define ALT_GPIO_CFG_REG1_HW_PORTA_LSB 8
1978 #define ALT_GPIO_CFG_REG1_HW_PORTA_MSB 8
1980 #define ALT_GPIO_CFG_REG1_HW_PORTA_WIDTH 1
1982 #define ALT_GPIO_CFG_REG1_HW_PORTA_SET_MSK 0x00000100
1984 #define ALT_GPIO_CFG_REG1_HW_PORTA_CLR_MSK 0xfffffeff
1986 #define ALT_GPIO_CFG_REG1_HW_PORTA_RESET 0x0
1988 #define ALT_GPIO_CFG_REG1_HW_PORTA_GET(value) (((value) & 0x00000100) >> 8)
1990 #define ALT_GPIO_CFG_REG1_HW_PORTA_SET(value) (((value) << 8) & 0x00000100)
2007 #define ALT_GPIO_CFG_REG1_HW_PORTB_LSB 9
2009 #define ALT_GPIO_CFG_REG1_HW_PORTB_MSB 9
2011 #define ALT_GPIO_CFG_REG1_HW_PORTB_WIDTH 1
2013 #define ALT_GPIO_CFG_REG1_HW_PORTB_SET_MSK 0x00000200
2015 #define ALT_GPIO_CFG_REG1_HW_PORTB_CLR_MSK 0xfffffdff
2017 #define ALT_GPIO_CFG_REG1_HW_PORTB_RESET 0x0
2019 #define ALT_GPIO_CFG_REG1_HW_PORTB_GET(value) (((value) & 0x00000200) >> 9)
2021 #define ALT_GPIO_CFG_REG1_HW_PORTB_SET(value) (((value) << 9) & 0x00000200)
2038 #define ALT_GPIO_CFG_REG1_HW_PORTC_LSB 10
2040 #define ALT_GPIO_CFG_REG1_HW_PORTC_MSB 10
2042 #define ALT_GPIO_CFG_REG1_HW_PORTC_WIDTH 1
2044 #define ALT_GPIO_CFG_REG1_HW_PORTC_SET_MSK 0x00000400
2046 #define ALT_GPIO_CFG_REG1_HW_PORTC_CLR_MSK 0xfffffbff
2048 #define ALT_GPIO_CFG_REG1_HW_PORTC_RESET 0x0
2050 #define ALT_GPIO_CFG_REG1_HW_PORTC_GET(value) (((value) & 0x00000400) >> 10)
2052 #define ALT_GPIO_CFG_REG1_HW_PORTC_SET(value) (((value) << 10) & 0x00000400)
2069 #define ALT_GPIO_CFG_REG1_HW_PORTD_LSB 11
2071 #define ALT_GPIO_CFG_REG1_HW_PORTD_MSB 11
2073 #define ALT_GPIO_CFG_REG1_HW_PORTD_WIDTH 1
2075 #define ALT_GPIO_CFG_REG1_HW_PORTD_SET_MSK 0x00000800
2077 #define ALT_GPIO_CFG_REG1_HW_PORTD_CLR_MSK 0xfffff7ff
2079 #define ALT_GPIO_CFG_REG1_HW_PORTD_RESET 0x0
2081 #define ALT_GPIO_CFG_REG1_HW_PORTD_GET(value) (((value) & 0x00000800) >> 11)
2083 #define ALT_GPIO_CFG_REG1_HW_PORTD_SET(value) (((value) << 11) & 0x00000800)
2110 #define ALT_GPIO_CFG_REG1_PORTA_INTR_E_PORTAINTERR 0x1
2113 #define ALT_GPIO_CFG_REG1_PORTA_INTR_LSB 12
2115 #define ALT_GPIO_CFG_REG1_PORTA_INTR_MSB 12
2117 #define ALT_GPIO_CFG_REG1_PORTA_INTR_WIDTH 1
2119 #define ALT_GPIO_CFG_REG1_PORTA_INTR_SET_MSK 0x00001000
2121 #define ALT_GPIO_CFG_REG1_PORTA_INTR_CLR_MSK 0xffffefff
2123 #define ALT_GPIO_CFG_REG1_PORTA_INTR_RESET 0x1
2125 #define ALT_GPIO_CFG_REG1_PORTA_INTR_GET(value) (((value) & 0x00001000) >> 12)
2127 #define ALT_GPIO_CFG_REG1_PORTA_INTR_SET(value) (((value) << 12) & 0x00001000)
2154 #define ALT_GPIO_CFG_REG1_DEBOUNCE_E_DEBOUNCEA 0x1
2157 #define ALT_GPIO_CFG_REG1_DEBOUNCE_LSB 13
2159 #define ALT_GPIO_CFG_REG1_DEBOUNCE_MSB 13
2161 #define ALT_GPIO_CFG_REG1_DEBOUNCE_WIDTH 1
2163 #define ALT_GPIO_CFG_REG1_DEBOUNCE_SET_MSK 0x00002000
2165 #define ALT_GPIO_CFG_REG1_DEBOUNCE_CLR_MSK 0xffffdfff
2167 #define ALT_GPIO_CFG_REG1_DEBOUNCE_RESET 0x1
2169 #define ALT_GPIO_CFG_REG1_DEBOUNCE_GET(value) (((value) & 0x00002000) >> 13)
2171 #define ALT_GPIO_CFG_REG1_DEBOUNCE_SET(value) (((value) << 13) & 0x00002000)
2198 #define ALT_GPIO_CFG_REG1_ADD_ENC_PARAMS_E_ADDENCPARAMS 0x1
2201 #define ALT_GPIO_CFG_REG1_ADD_ENC_PARAMS_LSB 14
2203 #define ALT_GPIO_CFG_REG1_ADD_ENC_PARAMS_MSB 14
2205 #define ALT_GPIO_CFG_REG1_ADD_ENC_PARAMS_WIDTH 1
2207 #define ALT_GPIO_CFG_REG1_ADD_ENC_PARAMS_SET_MSK 0x00004000
2209 #define ALT_GPIO_CFG_REG1_ADD_ENC_PARAMS_CLR_MSK 0xffffbfff
2211 #define ALT_GPIO_CFG_REG1_ADD_ENC_PARAMS_RESET 0x1
2213 #define ALT_GPIO_CFG_REG1_ADD_ENC_PARAMS_GET(value) (((value) & 0x00004000) >> 14)
2215 #define ALT_GPIO_CFG_REG1_ADD_ENC_PARAMS_SET(value) (((value) << 14) & 0x00004000)
2242 #define ALT_GPIO_CFG_REG1_GPIO_ID_E_IDCODE 0x1
2245 #define ALT_GPIO_CFG_REG1_GPIO_ID_LSB 15
2247 #define ALT_GPIO_CFG_REG1_GPIO_ID_MSB 15
2249 #define ALT_GPIO_CFG_REG1_GPIO_ID_WIDTH 1
2251 #define ALT_GPIO_CFG_REG1_GPIO_ID_SET_MSK 0x00008000
2253 #define ALT_GPIO_CFG_REG1_GPIO_ID_CLR_MSK 0xffff7fff
2255 #define ALT_GPIO_CFG_REG1_GPIO_ID_RESET 0x1
2257 #define ALT_GPIO_CFG_REG1_GPIO_ID_GET(value) (((value) & 0x00008000) >> 15)
2259 #define ALT_GPIO_CFG_REG1_GPIO_ID_SET(value) (((value) << 15) & 0x00008000)
2282 #define ALT_GPIO_CFG_REG1_ENC_ID_WIDTH_E_ENCIDWIDTH 0x1f
2285 #define ALT_GPIO_CFG_REG1_ENC_ID_WIDTH_LSB 16
2287 #define ALT_GPIO_CFG_REG1_ENC_ID_WIDTH_MSB 20
2289 #define ALT_GPIO_CFG_REG1_ENC_ID_WIDTH_WIDTH 5
2291 #define ALT_GPIO_CFG_REG1_ENC_ID_WIDTH_SET_MSK 0x001f0000
2293 #define ALT_GPIO_CFG_REG1_ENC_ID_WIDTH_CLR_MSK 0xffe0ffff
2295 #define ALT_GPIO_CFG_REG1_ENC_ID_WIDTH_RESET 0x1f
2297 #define ALT_GPIO_CFG_REG1_ENC_ID_WIDTH_GET(value) (((value) & 0x001f0000) >> 16)
2299 #define ALT_GPIO_CFG_REG1_ENC_ID_WIDTH_SET(value) (((value) << 16) & 0x001f0000)
2301 #ifndef __ASSEMBLY__
2312 struct ALT_GPIO_CFG_REG1_s
2314 const uint32_t apb_data_width : 2;
2315 const uint32_t num_ports : 2;
2316 const uint32_t porta_single_ctl : 1;
2317 const uint32_t portb_single_ctl : 1;
2318 const uint32_t portc_single_ctl : 1;
2319 const uint32_t portd_single_ctl : 1;
2320 const uint32_t hw_porta : 1;
2321 const uint32_t hw_portb : 1;
2322 const uint32_t hw_portc : 1;
2323 const uint32_t hw_portd : 1;
2324 const uint32_t porta_intr : 1;
2325 const uint32_t debounce : 1;
2326 const uint32_t add_encoded_params : 1;
2327 const uint32_t gpio_id : 1;
2328 const uint32_t encoded_id_width : 5;
2333 typedef volatile struct ALT_GPIO_CFG_REG1_s ALT_GPIO_CFG_REG1_t;
2337 #define ALT_GPIO_CFG_REG1_RESET 0x001ff0f2
2339 #define ALT_GPIO_CFG_REG1_OFST 0x74
2341 #define ALT_GPIO_CFG_REG1_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_GPIO_CFG_REG1_OFST))
2343 #ifndef __ASSEMBLY__
2356 ALT_GPIO_SWPORTA_DR_t gpio_swporta_dr;
2357 ALT_GPIO_SWPORTA_DDR_t gpio_swporta_ddr;
2358 volatile uint32_t _pad_0x8_0x2f[10];
2359 ALT_GPIO_INTEN_t gpio_inten;
2360 ALT_GPIO_INTMSK_t gpio_intmask;
2361 ALT_GPIO_INTTYPE_LEVEL_t gpio_inttype_level;
2362 ALT_GPIO_INT_POL_t gpio_int_polarity;
2363 ALT_GPIO_INTSTAT_t gpio_intstatus;
2364 ALT_GPIO_RAW_INTSTAT_t gpio_raw_intstatus;
2365 ALT_GPIO_DEBOUNCE_t gpio_debounce;
2366 ALT_GPIO_PORTA_EOI_t gpio_porta_eoi;
2367 ALT_GPIO_EXT_PORTA_t gpio_ext_porta;
2368 volatile uint32_t _pad_0x54_0x5f[3];
2369 ALT_GPIO_LS_SYNC_t gpio_ls_sync;
2370 ALT_GPIO_ID_CODE_t gpio_id_code;
2371 volatile uint32_t _pad_0x68_0x6b;
2372 ALT_GPIO_VER_ID_CODE_t gpio_ver_id_code;
2373 ALT_GPIO_CFG_REG2_t gpio_config_reg2;
2374 ALT_GPIO_CFG_REG1_t gpio_config_reg1;
2375 volatile uint32_t _pad_0x78_0x80[2];
2379 typedef volatile struct ALT_GPIO_s ALT_GPIO_t;
2381 struct ALT_GPIO_raw_s
2383 volatile uint32_t gpio_swporta_dr;
2384 volatile uint32_t gpio_swporta_ddr;
2385 uint32_t _pad_0x8_0x2f[10];
2386 volatile uint32_t gpio_inten;
2387 volatile uint32_t gpio_intmask;
2388 volatile uint32_t gpio_inttype_level;
2389 volatile uint32_t gpio_int_polarity;
2390 volatile uint32_t gpio_intstatus;
2391 volatile uint32_t gpio_raw_intstatus;
2392 volatile uint32_t gpio_debounce;
2393 volatile uint32_t gpio_porta_eoi;
2394 volatile uint32_t gpio_ext_porta;
2395 uint32_t _pad_0x54_0x5f[3];
2396 volatile uint32_t gpio_ls_sync;
2397 volatile uint32_t gpio_id_code;
2398 uint32_t _pad_0x68_0x6b;
2399 volatile uint32_t gpio_ver_id_code;
2400 volatile uint32_t gpio_config_reg2;
2401 volatile uint32_t gpio_config_reg1;
2402 uint32_t _pad_0x78_0x80[2];
2406 typedef volatile struct ALT_GPIO_raw_s ALT_GPIO_raw_t;