Merge pull request #94 from martinayotte/master
Add missing/forgotten variant.h to STM32F4 supplied by @martinayotte
This commit is contained in:
commit
b67efa7691
|
@ -0,0 +1,14 @@
|
||||||
|
#ifndef _VARIANT_ARDUINO_STM32_
|
||||||
|
#define _VARIANT_ARDUINO_STM32_
|
||||||
|
|
||||||
|
#define digitalPinToPort(P) ( PIN_MAP[P].gpio_device )
|
||||||
|
#define digitalPinToBitMask(P) ( BIT(PIN_MAP[P].gpio_bit) )
|
||||||
|
#define portOutputRegister(port) ( &(port->regs->ODR) )
|
||||||
|
#define portInputRegister(port) ( &(port->regs->IDR) )
|
||||||
|
|
||||||
|
#define portSetRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->BSRR) )
|
||||||
|
#define portClearRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->BRR) )
|
||||||
|
|
||||||
|
#define portConfigRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->CRL) )
|
||||||
|
|
||||||
|
#endif /* _VARIANT_ARDUINO_STM32_ */
|
Loading…
Reference in New Issue