blob: fdf0732972f77ed656432c9f8e395c976b6e9f3a [file] [log] [blame]
Lei YUab1327c2019-11-04 16:53:39 +08001#include "i2c.hpp"
2
3namespace i2c
4{
5
6void I2CDevice::read(uint8_t& data)
7{
8 // TODO
9 (void)data;
10}
11
12void I2CDevice::read(uint8_t addr, uint8_t& data)
13{
14 // TODO
15 (void)addr;
16 (void)data;
17}
18
19void I2CDevice::read(uint8_t addr, uint16_t& data)
20{
21 // TODO
22 (void)addr;
23 (void)data;
24}
25
26void I2CDevice::read(uint8_t addr, uint8_t& size, uint8_t* data)
27{
28 // TODO
29 (void)addr;
30 (void)size;
31 (void)data;
32}
33
34void I2CDevice::write(uint8_t data)
35{
36 // TODO
37 (void)data;
38}
39
40void I2CDevice::write(uint8_t addr, uint8_t data)
41{
42 // TODO
43 (void)addr;
44 (void)data;
45}
46
47void I2CDevice::write(uint8_t addr, uint16_t data)
48{
49 // TODO
50 (void)addr;
51 (void)data;
52}
53
54void I2CDevice::write(uint8_t addr, uint8_t size, const uint8_t* data)
55{
56 // TODO
57 (void)addr;
58 (void)size;
59 (void)data;
60}
61
62std::unique_ptr<I2CInterface> I2CDevice::create(uint8_t busId, uint8_t devAddr)
63{
64 std::unique_ptr<I2CDevice> dev(new I2CDevice(busId, devAddr));
65 return dev;
66}
67
68std::unique_ptr<I2CInterface> create(uint8_t busId, uint8_t devAddr)
69{
70 return I2CDevice::create(busId, devAddr);
71}
72
73} // namespace i2c