You can use the DigitalInOut API to both read and write to a digital pin:
- Use the
output()
andinput()
function calls to switch modes. - Use just like you would DigitalIn or DigitalOut.
MIRRORED FROM MASTER EXAMPLE SNIPPETS REPOSITORY: mbed-os-examples-docs_only. ANY CHANGES MADE DIRECTLY TO THIS REPOSITORY WILL BE AUTOMATICALLY OVERWRITTEN.