parent
f1ff79e6a0
commit
cf29b4b4c6
@ -0,0 +1,12 @@
|
|||||||
|
#include "driver.hpp"
|
||||||
|
|
||||||
|
Driver::Driver(i2c_write_buffer_t& i2cWB) : i2cWriteBuffer(i2cWB)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Driver::doSomething()
|
||||||
|
{
|
||||||
|
uint8_t a[] = {1,2,3,4};
|
||||||
|
i2cWriteBuffer(0x00,a,sizeof(a));
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
#ifndef _DRIVER_HPP_
|
||||||
|
#define _DRIVER_HPP_
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
struct Driver
|
||||||
|
{
|
||||||
|
typedef void (i2c_write_buffer_t) (const uint8_t& , const uint8_t* , uint8_t );
|
||||||
|
Driver(i2c_write_buffer_t& i2cWB) : i2cWriteBuffer(i2cWB)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void doSomething();
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
i2c_write_buffer_t& i2cWriteBuffer;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // _DRIVER_HPP_
|
Loading…
Reference in new issue