api / mbed / trunk / DigitalOut
DigitalOut
class DigitalOut : public Base
A digital output, used for setting the state of a pin
Example
// Toggle a LED
#include "mbed.h"
DigitalOut led(LED1);
int main() {
while(1) {
led = !led;
wait(0.2);
}
}| DigitalOut | A digital output, used for setting the state of a pin |
| Functions | |
| DigitalOut | Create a DigitalOut connected to the specified pin |
| write | Set the output, specified as 0 or 1 (int) |
| read | Return the output setting, represented as 0 or 1 (int) |
| operator= | A shorthand for write |
| operator int() | A shorthand for read |
operator=
DigitalOut& operator= ( int value )
A shorthand for write
operator int()
operator int()
A shorthand for read
A digital output, used for setting the state of a pin
class DigitalOut : public Base
Create a DigitalOut connected to the specified pin
DigitalOut( PinName pin, const char * name = NULL )
Set the output, specified as 0 or 1 (int)
void write( int value )
Return the output setting, represented as 0 or 1 (int)
int read()
A shorthand for write
DigitalOut& operator= ( int value )
A shorthand for read
operator int()
