Aruna
ESP32_I2C_master.h
Go to the documentation of this file.
1 //
2 // Created by noeel on 14-10-20.
3 //
4 
5 #ifndef ARUNA_ESP32_I2C_MASTER_H
6 #define ARUNA_ESP32_I2C_MASTER_H
7 
9 #include "driver/i2c.h"
10 
11 namespace aruna {
12  namespace driver {
13  class ESP32_I2C_master : public I2C_master {
14  private:
15  i2c_port_t i2c_num;
16  const i2c_config_t *i2c_conf;
17  i2c_cmd_handle_t i2c_cmd_handler;
18 
19  err_t _write(uint8_t address, uint8_t reg, uint8_t *data, size_t data_size) override;
20 
21  err_t _read(uint8_t address, uint8_t reg, uint8_t *buffer, size_t buffer_size) override;
22 
23  public:
24  ESP32_I2C_master(i2c_port_t i2c_num, const i2c_config_t *i2c_conf);
25 
27  };
28  }
29 }
30 
31 
32 #endif //ARUNA_ESP32_I2C_MASTER_H
Definition: comm.cpp:14
err_t _write(uint8_t address, uint8_t reg, uint8_t *data, size_t data_size) override
ESP32_I2C_master(i2c_port_t i2c_num, const i2c_config_t *i2c_conf)
err_t _read(uint8_t address, uint8_t reg, uint8_t *buffer, size_t buffer_size) override
Link * driver
stores the driver.
Definition: comm.cpp:45