projet_pololu_et5_ees

Fork of FastIO by Erik -

FastIO_Unsupported.h

Committer:
lesuperguerrier
Date:
2018-03-09
Revision:
23:6b6ea8ba43e3
Parent:
17:87872fcf8586

File content as of revision 23:6b6ea8ba43e3:

#include "mbed.h"

typedef struct {
    DigitalInOut *_pin;
} fastio_vars;

#define INIT_PIN        this->container._pin = new DigitalInOut(pin)
#define DESTROY_PIN     delete(this->container._pin)

#define SET_DIR_INPUT   this->container._pin->input()
#define SET_DIR_OUTPUT  this->container._pin->output()
#define SET_MODE(pull)  this->container._pin->mode(pull)

#define WRITE_PIN_SET   this->container._pin->write(1)
#define WRITE_PIN_CLR   this->container._pin->write(0)

#define READ_PIN        this->container._pin->read()