Replacement for regular GPIO (DigitalIn, DigitalOut, DigitalInOut) classes which has superior speed.

Dependents:   Eavesdropper BitstreamGenerator SimpleDecimationFilter 11U68_MP3Player with TFTLCD ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers FastIO_Unsupported.h Source File

FastIO_Unsupported.h

00001 #include "mbed.h"
00002 
00003 typedef struct {
00004     DigitalInOut *_pin;
00005 } fastio_vars;
00006 
00007 #define INIT_PIN        this->container._pin = new DigitalInOut(pin)
00008 #define DESTROY_PIN     delete(this->container._pin)
00009 
00010 #define SET_DIR_INPUT   this->container._pin->input()
00011 #define SET_DIR_OUTPUT  this->container._pin->output()
00012 #define SET_MODE(pull)  this->container._pin->mode(pull)
00013 
00014 #define WRITE_PIN_SET   this->container._pin->write(1)
00015 #define WRITE_PIN_CLR   this->container._pin->write(0)
00016 
00017 #define READ_PIN        this->container._pin->read()
00018