APM:Libraries
Display_SH1106_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 SH1106_COLUMNS 132 // display columns
8 #define SH1106_ROWS 64 // display rows
9 #define SH1106_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_SH1106_I2C() override;
26 
27 private:
28 
29  bool hw_init() override;
30 
31  void _timer();
32 
36 
37 };
void clear_screen() override
Display_SH1106_I2C(AP_HAL::OwnPtr< AP_HAL::Device > dev)
void clear_pixel(uint16_t x, uint16_t y) override
AP_HAL::OwnPtr< AP_HAL::Device > _dev
#define SH1106_ROWS_PER_PAGE
#define x(i)
void hw_update() override
bool hw_init() override
static AP_HAL::OwnPtr< AP_HAL::Device > dev
Definition: ICM20789.cpp:16
uint8_t _displaybuffer[SH1106_COLUMNS *SH1106_ROWS_PER_PAGE]
static Display_SH1106_I2C * probe(AP_HAL::OwnPtr< AP_HAL::Device > dev)
#define SH1106_COLUMNS
void set_pixel(uint16_t x, uint16_t y) override