17#ifndef MBED_BUSINOUT_H
18#define MBED_BUSINOUT_H
20#include "drivers/DigitalInOut.h"
21#include "rtos/Mutex.h"
22#include "platform/NonCopyable.h"
65 BusInOut(PinName p0, PinName p1 = NC, PinName p2 = NC, PinName p3 = NC,
66 PinName p4 = NC, PinName p5 = NC, PinName p6 = NC, PinName p7 = NC,
67 PinName p8 = NC, PinName p9 = NC, PinName p10 = NC, PinName p11 = NC,
68 PinName p12 = NC, PinName p13 = NC, PinName p14 = NC, PinName p15 = NC);
138#if !defined(DOXYGEN_ONLY)
140 virtual void unlock();
A digital input output bus, used for setting the state of a collection of pins.
void mode(PinMode pull)
Set the input pin mode for all the pins in bus.
void write(int value)
Write the value to the output bus.
BusInOut(PinName pins[16])
Create a BusInOut, connected to the specified pins.
BusInOut & operator=(int v)
A shorthand for write()
void output()
Set all the pins in bus as output.
BusInOut(PinName p0, PinName p1=NC, PinName p2=NC, PinName p3=NC, PinName p4=NC, PinName p5=NC, PinName p6=NC, PinName p7=NC, PinName p8=NC, PinName p9=NC, PinName p10=NC, PinName p11=NC, PinName p12=NC, PinName p13=NC, PinName p14=NC, PinName p15=NC)
Create a BusInOut, connected to the specified pins.
int mask()
Binary mask of bus pins connected to actual pins (not NC pins) If bus pin is in NC state make corresp...
int read()
Read the value currently output on the bus.
void input()
Set all the pins in bus as an input.
DigitalInOut & operator[](int index)
Access to particular bit in random-iterator fashion.
A digital input/output, used for setting or reading a bi-directional pin.
Prevents generation of copy constructor and copy assignment operator in derived classes.
The Mutex class is used to synchronize the execution of threads.