APM:Libraries
Display_SSD1306_I2C.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Display.h"
4 #include "Display_Backend.h"
5 #include <AP_HAL/I2CDevice.h>
6 
7 #define SSD1306_COLUMNS 128 // display columns
8 #define SSD1306_ROWS 64 // display rows
9 #define SSD1306_ROWS_PER_PAGE 8
10 
12 
13 public:
14 
16 
17  void hw_update() override;
18  void set_pixel(uint16_t x, uint16_t y) override;
19  void clear_pixel(uint16_t x, uint16_t y) override;
20  void clear_screen() override;
21 
22 protected:
23 
25  ~Display_SSD1306_I2C() override;
26 
27 private:
28 
29  bool hw_init() override;
30 
31  void _timer();
32 
36 };
static Display_SSD1306_I2C * probe(AP_HAL::OwnPtr< AP_HAL::Device > dev)
#define SSD1306_ROWS_PER_PAGE
#define SSD1306_COLUMNS
Display_SSD1306_I2C(AP_HAL::OwnPtr< AP_HAL::Device > dev)
AP_HAL::OwnPtr< AP_HAL::Device > _dev
#define x(i)
static AP_HAL::OwnPtr< AP_HAL::Device > dev
Definition: ICM20789.cpp:16
void clear_screen() override
void set_pixel(uint16_t x, uint16_t y) override
uint8_t _displaybuffer[SSD1306_COLUMNS *SSD1306_ROWS_PER_PAGE]
void clear_pixel(uint16_t x, uint16_t y) override