Skip to content

Commit

Permalink
Prevent pin glitches on out commutation (#16835)
Browse files Browse the repository at this point in the history
Better for switching from pulled input to output and also set real output (with no input enabled).
  • Loading branch information
GMagician committed Feb 11, 2020
1 parent 0fd0554 commit 4a73379
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Marlin/src/HAL/HAL_SAMD51/fastio.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@
const EPortType port = (EPortType)GET_SAMD_PORT(IO); \
const uint32_t pin = GET_SAMD_PIN(IO); \
\
PORT->Group[port].PINCFG[pin].reg = (uint8_t)(PORT_PINCFG_INEN); \
PORT->Group[port].DIRSET.reg = MASK(pin); \
PORT->Group[port].PINCFG[pin].reg = 0; \
}while(0)
// Set pin as output (open drain)
#define SET_OUTPUT_OD(IO) do{ \
Expand Down

0 comments on commit 4a73379

Please sign in to comment.