From 7133c2e9dbe376b91469dd09e504a5c59294a691 Mon Sep 17 00:00:00 2001 From: Alexandre Jomin Date: Wed, 14 Sep 2022 16:04:56 +0200 Subject: [PATCH] feat(ssd1306): add getter method to the current buffer --- ssd1306/ssd1306.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ssd1306/ssd1306.go b/ssd1306/ssd1306.go index ce68c9f..ebb76f2 100644 --- a/ssd1306/ssd1306.go +++ b/ssd1306/ssd1306.go @@ -233,6 +233,11 @@ func (d *Device) SetBuffer(buffer []byte) error { return nil } +// GetBuffer returns the whole buffer +func (d *Device) GetBuffer() []byte { + return d.buffer +} + // Command sends a command to the display func (d *Device) Command(command uint8) { d.bus.tx([]byte{command}, true)