We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 07ba8f2 + fbed6fb commit b67efa7Copy full SHA for b67efa7
1 file changed
STM32F4/variants/discovery_f407/variant.h
@@ -0,0 +1,14 @@
1
+#ifndef _VARIANT_ARDUINO_STM32_
2
+#define _VARIANT_ARDUINO_STM32_
3
+
4
+#define digitalPinToPort(P) ( PIN_MAP[P].gpio_device )
5
+#define digitalPinToBitMask(P) ( BIT(PIN_MAP[P].gpio_bit) )
6
+#define portOutputRegister(port) ( &(port->regs->ODR) )
7
+#define portInputRegister(port) ( &(port->regs->IDR) )
8
9
+#define portSetRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->BSRR) )
10
+#define portClearRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->BRR) )
11
12
+#define portConfigRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->CRL) )
13
14
+#endif /* _VARIANT_ARDUINO_STM32_ */
0 commit comments