display: split DisplayBuffer and Display (#5001)

This commit is contained in:
Kamil Trzciński authored and GitHub committed 2023-07-05 14:33:26 -05:00
1 parent 301a78f983
commit 677b2c6618
15 files changed
+960 -902

No files matched your search

+2 -2
View File
@@ -1,5 +1,5 @@
#include "qr_code.h"
#include "esphome/components/display/display_buffer.h"
#include "esphome/components/display/display.h"
#include "esphome/core/color.h"
#include "esphome/core/log.h"
@@ -33,7 +33,7 @@ void QrCode::generate_qr_code() {
}
}
void QrCode::draw(display::DisplayBuffer *buff, uint16_t x_offset, uint16_t y_offset, Color color, int scale) {
void QrCode::draw(display::Display *buff, uint16_t x_offset, uint16_t y_offset, Color color, int scale) {
ESP_LOGV(TAG, "Drawing QR code at (%d, %d)", x_offset, y_offset);
if (this->needs_update_) {