Skip to content

Commit 5da10b0

Browse files
authored
Merge pull request #414 from anonymouscowhead/lpc-nonOD
In LPC port, alias PUSHPULL to default digital output
2 parents fa78359 + cf3c6d0 commit 5da10b0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

os/hal/ports/LPC/LLD/GPIO/hal_pal_lld.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@
5151
#define PAL_MODE_INPUT_PULLUP (MODE_DIR_IN | MODE_MODE_PULL_UP | MODE_AD_DIGITAL)
5252
#define PAL_MODE_INPUT_PULLDOWN (MODE_DIR_IN | MODE_MODE_PULL_DOWN | MODE_AD_DIGITAL)
5353
#define PAL_MODE_OUTPUT_OPENDRAIN (MODE_DIR_OUT | MODE_OD_ENABLE | MODE_AD_DIGITAL)
54+
/* LPC11Uxx does not support true pushpull output, but its non-opendrain output
55+
* is sufficient in many use cases, so convenient to alias PUSHPULL to it. */
56+
#define PAL_MODE_OUTPUT_PUSHPULL (MODE_DIR_OUT | MODE_AD_DIGITAL)
5457

5558
/*===========================================================================*/
5659
/* I/O Ports Types and constants. */

0 commit comments

Comments
 (0)