Skip to content
Snippets Groups Projects
Unverified Commit 4a733796 authored by Giuliano Zaro's avatar Giuliano Zaro Committed by GitHub
Browse files

Prevent pin glitches on out commutation (#16835)

Better for switching from pulled input to output and also set real output (with no input enabled).
parent 0fd0554b
No related branches found
No related tags found
No related merge requests found
......@@ -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{ \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment