nRF52: FIX wrong bitmask for DRIVE setting

This bug made certain values of DRIVE setting
to be wrongly applied (which can be dangerous
under certain situations since for example H0D1
was mapped to H0H1).
This commit is contained in:
Matias N 2021-01-20 17:21:35 -03:00 committed by Xiang Xiao
parent cb6d78c9d1
commit ed5e494298

View File

@ -95,7 +95,7 @@
*/
#define GPIO_DRIVE_SHIFT (9) /* Bits 9-11: Pin pull-up mode */
#define GPIO_DRIVE_MASK (0x3 << GPIO_DRIVE_SHIFT)
#define GPIO_DRIVE_MASK (0x7 << GPIO_DRIVE_SHIFT)
# define GPIO_DRIVE_S0S1 (0 << GPIO_DRIVE_SHIFT) /* Standard '0', standard '1' */
# define GPIO_DRIVE_H0S1 (1 << GPIO_DRIVE_SHIFT) /* High drive '0', standard '1' */
# define GPIO_DRIVE_S0H1 (2 << GPIO_DRIVE_SHIFT) /* */