27 #ifndef __SCU_18XX_43XX_H_
28 #define __SCU_18XX_43XX_H_
62 #define SCU_MODE_MODE_INACT (0x0 << 3)
63 #define SCU_MODE_MODE_PULLDOWN (0x1 << 3)
64 #define SCU_MODE_MODE_PULLUP (0x2 << 3)
65 #define SCU_MODE_MODE_REPEATER (0x3 << 3)
66 #define SCU_MODE_HIGHSPEEDSLEW_EN (0x1 << 5)
67 #define SCU_MODE_INBUFF_EN (0x1 << 6)
68 #define SCU_MODE_ZIF_DIS (0x1 << 7)
69 #define SCU_MODE_4MA_DRIVESTR (0x0 << 8)
70 #define SCU_MODE_8MA_DRIVESTR (0x1 << 8)
71 #define SCU_MODE_14MA_DRIVESTR (0x2 << 8)
72 #define SCU_MODE_20MA_DRIVESTR (0x3 << 8)
73 #define SCU_MODE_FUNC0 0x0
74 #define SCU_MODE_FUNC1 0x1
75 #define SCU_MODE_FUNC2 0x2
76 #define SCU_MODE_FUNC3 0x3
77 #define SCU_MODE_FUNC4 0x4
78 #define SCU_MODE_FUNC5 0x5
79 #define SCU_MODE_FUNC6 0x6
80 #define SCU_MODE_FUNC7 0x7
81 #define SCU_PINIO_FAST (SCU_MODE_MODE_PULLUP | SCU_MODE_HIGHSPEEDSLEW_EN | SCU_MODE_INBUFF_EN | SCU_MODE_ZIF_DIS)
87 #define MD_PUP (0x0 << 3)
88 #define MD_BUK (0x1 << 3)
89 #define MD_PLN (0x2 << 3)
90 #define MD_PDN (0x3 << 3)
91 #define MD_EHS (0x1 << 5)
92 #define MD_EZI (0x1 << 6)
93 #define MD_ZI (0x1 << 7)
94 #define MD_EHD0 (0x1 << 8)
95 #define MD_EHD1 (0x1 << 8)
96 #define MD_PLN_FAST (MD_PLN | MD_EZI | MD_ZI | MD_EHS)
97 #define I2C0_STANDARD_FAST_MODE (1 << 3 | 1 << 11)
98 #define I2C0_FAST_MODE_PLUS (2 << 1 | 1 << 3 | 1 << 7 | 1 << 10 | 1 << 11)
108 #define PORT_OFFSET 0x80
109 #define PIN_OFFSET 0x04
112 #define LPC_SCU_PIN(LPC_SCU_BASE, po, pi) (*(volatile int *) ((LPC_SCU_BASE) + ((po) * 0x80) + ((pi) * 0x4))
115 #define LPC_SCU_CLK(LPC_SCU_BASE, c) (*(volatile int *) ((LPC_SCU_BASE) +0xC00 + ((c) * 0x4)))
128 LPC_SCU->SFSP[port][pin] = modefunc;
198 LPC_SCU->ENAIO[ADC_ID] |= 1UL << channel;