You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Modelbahn/z21emu/i2csensor.h

32 lines
435 B

/*
* i2csensor.h
*
* Created on: 18.12.2017
* Author: steffen
*/
#ifndef I2CSENSOR_H_
#define I2CSENSOR_H_
#include <unistd.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string>
using namespace std;
class I2C {
private:
int i2cdev;
public:
I2C ();
~I2C ();
bool ReadByte(int addr, int reg, uint8_t *readval);
bool SendByte(int addr, int reg, uint8_t data);
};
#endif /* I2CSENSOR_H_ */