mirror of
https://github.com/esphome/esphome.git
synced 2025-02-24 13:58:14 +00:00
* Cleanup dashboard JS * Add vscode * Save start_mark/end_mark * Updates * Updates * Remove need for cv.nameable It's a bit hacky but removes so much bloat from integrations * Add enum helper * Document APIs, and Improvements * Fixes * Fixes * Update PULL_REQUEST_TEMPLATE.md * Updates * Updates * Updates
24 lines
551 B
C++
24 lines
551 B
C++
#pragma once
|
|
|
|
#include "esphome/core/component.h"
|
|
#include "esphome/components/ssd1306_base/ssd1306_base.h"
|
|
#include "esphome/components/i2c/i2c.h"
|
|
|
|
namespace esphome {
|
|
namespace ssd1306_i2c {
|
|
|
|
class I2CSSD1306 : public ssd1306_base::SSD1306, public i2c::I2CDevice {
|
|
public:
|
|
void setup() override;
|
|
void dump_config() override;
|
|
|
|
protected:
|
|
void command(uint8_t value) override;
|
|
void write_display_data() override;
|
|
|
|
enum ErrorCode { NONE = 0, COMMUNICATION_FAILED } error_code_{NONE};
|
|
};
|
|
|
|
} // namespace ssd1306_i2c
|
|
} // namespace esphome
|