17#ifndef MBED_DIGITALINOUT_H
18#define MBED_DIGITALINOUT_H
20#include "platform/platform.h"
22#include "interfaces/InterfaceDigitalInOut.h"
23#include "hal/gpio_api.h"
37#ifdef FEATURE_EXPERIMENTAL_API
155#if !defined(DOXYGEN_ONLY)
A digital input/output, used for setting or reading a bi-directional pin.
void mode(PinMode pull)
Set the input pin mode.
void write(int value)
Set the output, specified as 0 or 1 (int)
DigitalInOut(PinName pin)
Create a DigitalInOut connected to the specified pin.
DigitalInOut & operator=(int value)
A shorthand for write()
void output()
Set as an output.
DigitalInOut(PinName pin, PinDirection direction, PinMode mode, int value)
Create a DigitalInOut connected to the specified pin.
int read()
Return the output setting, represented as 0 or 1 (int)
void input()
Set as an input.
int is_connected()
Return the output setting, represented as 0 or 1 (int)
void gpio_init_in(gpio_t *gpio, PinName pin)
Init the input pin and set mode to PullDefault.
int gpio_is_connected(const gpio_t *obj)
Checks if gpio object is connected (pin was not initialized with NC)
int gpio_read(gpio_t *obj)
Read the input value.
void gpio_init_inout(gpio_t *gpio, PinName pin, PinDirection direction, PinMode mode, int value)
Init the pin to be in/out.
void gpio_write(gpio_t *obj, int value)
Set the output value.