Implemented first Hangar-Service
Dependencies: CalibrateMagneto QuaternionMath
Fork of SML2 by
I2CPeripheral.h
- Committer:
- pvaibhav
- Date:
- 2015-02-17
- Revision:
- 7:604a8369b801
- Parent:
- 5:b9f2f62a8f90
File content as of revision 7:604a8369b801:
#ifndef _H_I2CPERIPHERAL_H #define _H_I2CPERIPHERAL_H #include "mbed.h" class I2CPeripheral { protected: I2C* mBus; uint8_t mAddress; protected: void write_reg(const uint8_t reg, const uint8_t val); uint8_t read_reg(const uint8_t reg); void read_reg(const uint8_t reg, uint8_t* destination, const size_t nBytes = 1); public: I2CPeripheral(I2C &i2c, const uint8_t address); }; #endif//_H_I2CPERIPHERAL_H