Browse Source
Merge pull request #454 from FrankBoesing/patch-6
Arduino-Compatibility: digitalWrite controls pullup/pulldown in inpu…
main
Paul Stoffregen
4 years ago
No account linked to committer's email address
1 changed files with
6 additions and
3 deletions
-
teensy4/digital.c
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
// pin is configured for input mode |
|
|
// pin is configured for input mode |
|
|
// writing controls pullup resistor |
|
|
|
|
|
|
|
|
|
|
|
// TODO.... |
|
|
|
|
|
|
|
|
// value controls PULLUP/PULLDOWN resistors |
|
|
|
|
|
if (val) { |
|
|
|
|
|
*(p->pad) = IOMUXC_PAD_DSE(7) | IOMUXC_PAD_PKE | IOMUXC_PAD_PUE | IOMUXC_PAD_PUS(3) | IOMUXC_PAD_HYS; |
|
|
|
|
|
} else { |
|
|
|
|
|
*(p->pad) = IOMUXC_PAD_DSE(7) | IOMUXC_PAD_PKE | IOMUXC_PAD_PUE | IOMUXC_PAD_PUS(0) | IOMUXC_PAD_HYS; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|