#pragma once

#define DEBUGLOG_DEFAULT_LOG_LEVEL_INFO

#include <DebugLog.h>
#include <Arduino.h>
#include <Wire.h>
#include <vector>
#include <mutex>

#define I2C_SCL_PIN 41
#define I2C_SDA_PIN 42

namespace drivers
{

    class I2C
    {
    public:
        I2C(void);
        ~I2C(void);

        const bool read(const uint8_t deviceAddr, const uint8_t deviceReg, const uint8_t len, std::vector<uint8_t> &data);
        const bool write(const uint8_t deviceAddr, const uint8_t deviceReg, const std::vector<uint8_t> &data);

    private:
        bool m_initialized;
        std::mutex m_mutex;
    };

}
