17#ifndef MBED_DIGITALOUT_H
18#define MBED_DIGITALOUT_H
20#include "platform/platform.h"
22#include "interfaces/InterfaceDigitalOut.h"
23#include "hal/gpio_api.h"
52#ifdef FEATURE_EXPERIMENTAL_API
150#if !defined(DOXYGEN_ONLY)
A digital output, used for setting the state of a pin.
DigitalOut & operator=(int value)
A shorthand for write()
void write(int value)
Set the output, specified as 0 or 1 (int)
DigitalOut(PinName pin, int value)
Create a DigitalOut connected to the specified pin.
int read()
Return the output setting, represented as 0 or 1 (int)
DigitalOut(PinName pin)
Create a DigitalOut connected to the specified pin.
int is_connected()
Return the output setting, represented as 0 or 1 (int)
void gpio_init_out(gpio_t *gpio, PinName pin)
Init the output pin as an output, with predefined output value 0.
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_write(gpio_t *obj, int value)
Set the output value.
void gpio_init_out_ex(gpio_t *gpio, PinName pin, int value)
Init the pin as an output and set the output value.