1
0
mirror of https://github.com/danog/fast-gpio.git synced 2024-11-26 20:04:37 +01:00
fast-gpio/include/fastgpioomega.h
2016-08-15 15:29:18 -04:00

34 lines
704 B
C++

#ifndef _FAST_GPIO_OMEGA_H_
#define _FAST_GPIO_OMEGA_H_
#include <fastgpio.h>
//Define Macros in derived class.
#define REGISTER_BLOCK_ADDR 0x18040000
#define REGISTER_BLOCK_SIZE 0x30
#define REGISTER_OE_OFFSET 0
#define REGISTER_IN_OFFSET 1
#define REGISTER_OUT_OFFSET 2
#define REGISTER_SET_OFFSET 3
#define REGISTER_CLEAR_OFFSET 4
class FastGpioOmega : public FastGpio {
public:
FastGpioOmega(void);
~FastGpioOmega(void);
int SetDirection (int pinNum, int bOutput);
int GetDirection (int pinNum, int &bOutput);
int Set (int pinNum, int value);
int Read (int pinNum, int &value);
private:
// private functions
int pinNumber;
};
#endif // _FAST_GPIO_OMEGA_H_