We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3f2b0b commit fd8b3e5Copy full SHA for fd8b3e5
variants/intel_edu_x/variant.h
@@ -129,6 +129,28 @@ extern "C"{
129
#define ADC_RESOLUTION 12
130
#define ADC_CLOCK_GATE (1 << 31)
131
132
+#define digitalPinToBitMask(P) (1 << g_APinDescription[P].ulGPIOId)
133
+
134
+//static uint8_t __unused_var_POR;
135
+#define portOutputRegister(port) (uint32_t*)port
136
+#define portModeRegister(port) (uint32_t*)port
137
138
139
+static inline uint32_t digitalPinToPort(uint32_t pin) {
140
+ uint32_t reg = 0;
141
+ PinDescription *p = &g_APinDescription[pin];
142
143
+ if (p->ulGPIOType == SS_GPIO)
144
+ {
145
+ reg = p->ulGPIOBase + SS_GPIO_SWPORTA_DR;
146
+ }
147
+ else if (p->ulGPIOType == SOC_GPIO)
148
149
+ reg = p->ulGPIOBase + SOC_GPIO_SWPORTA_DR;
150
151
+ return reg;
152
+}
153
154
#ifdef __cplusplus
155
}
156
#endif
0 commit comments