From 997be6b4eb5a15837295c18f2426c103165f43da Mon Sep 17 00:00:00 2001 From: Drath Date: Thu, 20 Aug 2026 21:16:06 +0200 Subject: [PATCH] now? --- st7567/st7567-common.h | 4 ---- st7567/st7567-i2c.h | 8 +++++++- st7567/st7567-spi.h | 7 ++++++- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/st7567/st7567-common.h b/st7567/st7567-common.h index 1732909..46a51bd 100644 --- a/st7567/st7567-common.h +++ b/st7567/st7567-common.h @@ -1,9 +1,5 @@ #pragma once -// Display dimensions -#define ST7567_WIDTH 128 -#define ST7567_HEIGHT 64 -#define ST7567_PAGES (ST7567_HEIGHT / 8) // ST7567 command set #define ST7567_CMD_DISPLAY_OFF 0xAE diff --git a/st7567/st7567-i2c.h b/st7567/st7567-i2c.h index 093731c..85e95ea 100644 --- a/st7567/st7567-i2c.h +++ b/st7567/st7567-i2c.h @@ -4,7 +4,10 @@ #include "esp_err.h" #include "driver/i2c_master.h" -#include "st7567-common.h" +// Display dimensions +#define ST7567_WIDTH 128 +#define ST7567_HEIGHT 64 +#define ST7567_PAGES (ST7567_HEIGHT / 8) // Configuration structure typedef struct { @@ -29,4 +32,7 @@ typedef struct { */ esp_err_t st7567_init(const st7567_i2c_config_t *config, st7567_device_t *device); +#include "st7567-common.h" + + #endif // ST7567_I2C_H diff --git a/st7567/st7567-spi.h b/st7567/st7567-spi.h index e620b0c..6a3c8a0 100644 --- a/st7567/st7567-spi.h +++ b/st7567/st7567-spi.h @@ -5,7 +5,10 @@ #include "driver/spi_master.h" #include "driver/gpio.h" -#include "st7567-common.h" +// Display dimensions +#define ST7567_WIDTH 128 +#define ST7567_HEIGHT 64 +#define ST7567_PAGES (ST7567_HEIGHT / 8) // Configuration structure typedef struct { @@ -33,5 +36,7 @@ typedef struct { */ esp_err_t st7567_init(const st7567_spi_config_t *config, st7567_device_t *device); +#include "st7567-common.h" + #endif // ST7567_SPI_H