mirror of
https://github.com/esphome/esphome.git
synced 2024-12-02 19:54:14 +01:00
58b6311821
* add ssd1325 component * fix i2c * remove ssd1325 i2c * add test * set max contrast * No macros - see styleguide * Remove invalid function * Formatting Co-authored-by: Otto Winter <otto@otto-winter.com>
29 lines
720 B
C++
29 lines
720 B
C++
#pragma once
|
|
|
|
#include "esphome/core/component.h"
|
|
#include "esphome/components/ssd1325_base/ssd1325_base.h"
|
|
#include "esphome/components/spi/spi.h"
|
|
|
|
namespace esphome {
|
|
namespace ssd1325_spi {
|
|
|
|
class SPISSD1325 : public ssd1325_base::SSD1325,
|
|
public spi::SPIDevice<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_HIGH, spi::CLOCK_PHASE_TRAILING,
|
|
spi::DATA_RATE_8MHZ> {
|
|
public:
|
|
void set_dc_pin(GPIOPin *dc_pin) { dc_pin_ = dc_pin; }
|
|
|
|
void setup() override;
|
|
|
|
void dump_config() override;
|
|
|
|
protected:
|
|
void command(uint8_t value) override;
|
|
|
|
void write_display_data() override;
|
|
|
|
GPIOPin *dc_pin_;
|
|
};
|
|
|
|
} // namespace ssd1325_spi
|
|
} // namespace esphome
|