gpio: Bitmask overflow fix in gpio_reset_pin

For pins 32 and up the BIT(nr) macro used here overflowed,
causing undetermined GPIO pins to be reset.
Example: freeing SPI device/bus where CS is on pin 33
caused debug UART to cease communication, TXD0 was
disabled.

Fixed as BIT64(nr) macro, to be used elsewhere as needed.
For example in definitions like GPIO_SEL_32..GPIO_SEL_39.
This commit is contained in:
Taavi Hein
2018-08-08 15:31:17 +03:00
parent b85e8e10b9
commit f7749e18a8
2 changed files with 2 additions and 1 deletions

View File

@@ -134,6 +134,7 @@
#ifndef __ASSEMBLER__
#define BIT(nr) (1UL << (nr))
#define BIT64(nr) (1ULL << (nr))
#else
#define BIT(nr) (1 << (nr))
#endif