Base class for all displays compatible with SSD1306 (I2C interface)
More...
#include <OutputHardware.hpp>
|
| constexpr | OLEDBase () noexcept |
| | Create an uninitialized OLED base object.
|
| |
| | OLEDBase (::std::initializer_list< uint8_t > &&try_addresses, I2CBus bus) noexcept |
| | Create an OLED base object.
|
| |
|
virtual | ~OLEDBase () noexcept |
| | Destructor.
|
| |
| | OLEDBase (const OLEDBase &other) noexcept=delete |
| | Copy-constructor (deleted)
|
| |
| | OLEDBase (OLEDBase &&other) noexcept |
| | Move-constructor.
|
| |
| OLEDBase & | operator= (const OLEDBase &other) noexcept=delete |
| | Copy-Assignment (deleted)
|
| |
| OLEDBase & | operator= (OLEDBase &&other) noexcept |
| | Move-Assignment.
|
| |
| bool | write (const uint8_t *buffer, ::std::size_t size) const noexcept |
| | Raw write.
|
| |
| bool | write_cmd (uint8_t command) const noexcept |
| | Write a command with no arguments.
|
| |
| bool | write_cmd (uint8_t command, uint8_t arg) const noexcept |
| | Write a command with one argument.
|
| |
| bool | write_cmd (uint8_t command, uint8_t arg1, uint8_t arg2) const noexcept |
| | Write a command with two argument.
|
| |
| bool | write_gdd_ram (const uint8_t *buffer, ::std::size_t size) const noexcept |
| | Write to GDD RAM.
|
| |
| bool | read_status (uint8_t &status) const noexcept |
| | Read the status register.
|
| |
Base class for all displays compatible with SSD1306 (I2C interface)
- Note
- Protected methods return false if the device is not responding in the i2C bus
Definition at line 479 of file OutputHardware.hpp.
◆ Controller
OLED controllers that can be automatically detected.
| Enumerator |
|---|
| SSD1306 | SSD1306 OLED controller.
|
| SH1107 | SH1107 OLED controller.
|
| SH1106 | SH1106 OLED controller.
|
| UNKNOWN | Unknown OLED controller.
|
Definition at line 482 of file OutputHardware.hpp.
◆ OLEDBase() [1/4]
|
|
inlineconstexprprotectednoexcept |
◆ OLEDBase() [2/4]
| OLEDBase::OLEDBase |
( |
::std::initializer_list< uint8_t > && | try_addresses, |
|
|
I2CBus | bus ) |
|
protectednoexcept |
Create an OLED base object.
This constructor will probe each I2C address in try_address and use the first available in the I2C bus .
- Parameters
-
| try_addresses | List of ordered I2C full addresses to try (7 bit format). |
| bus | I2C bus |
◆ OLEDBase() [3/4]
| OLEDBase::OLEDBase |
( |
const OLEDBase & | other | ) |
|
|
protecteddeletenoexcept |
Copy-constructor (deleted)
- Parameters
-
| other | Instance to be copied |
◆ OLEDBase() [4/4]
Move-constructor.
- Parameters
-
| other | Instance to be moved |
◆ available()
| bool OLEDBase::available |
( |
| ) |
const |
|
inlinenoexcept |
Check if the OLED was found in the I2C bus.
- Returns
- true If the device was responding
-
false If not
Definition at line 507 of file OutputHardware.hpp.
◆ guess_controller()
Guess the OLED controller.
- Returns
- Controller Automatically-detected controller
◆ operator=() [1/2]
Copy-Assignment (deleted)
- Parameters
-
| other | Instance to be copied |
◆ operator=() [2/2]
Move-Assignment.
- Parameters
-
| other | Instance to be moved |
◆ read_status()
| bool OLEDBase::read_status |
( |
uint8_t & | status | ) |
const |
|
protectednoexcept |
Read the status register.
- Parameters
-
| [out] | status | Status register if the return value is true |
- Returns
- true On success
-
false On failure
◆ write()
| bool OLEDBase::write |
( |
const uint8_t * | buffer, |
|
|
::std::size_t | size ) const |
|
protectednoexcept |
Raw write.
- Parameters
-
| buffer | Pointer to commands or data |
| size | Size of buffer |
- Returns
- true On success
-
false On failure
◆ write_cmd() [1/3]
| bool OLEDBase::write_cmd |
( |
uint8_t | command | ) |
const |
|
protectednoexcept |
Write a command with no arguments.
- Parameters
-
- Returns
- true On success
-
false On failure
◆ write_cmd() [2/3]
| bool OLEDBase::write_cmd |
( |
uint8_t | command, |
|
|
uint8_t | arg ) const |
|
protectednoexcept |
Write a command with one argument.
- Parameters
-
| command | Command |
| arg | First argument |
- Returns
- true On success
-
false On failure
◆ write_cmd() [3/3]
| bool OLEDBase::write_cmd |
( |
uint8_t | command, |
|
|
uint8_t | arg1, |
|
|
uint8_t | arg2 ) const |
|
protectednoexcept |
Write a command with two argument.
- Parameters
-
| command | Command |
| arg1 | First argument |
| arg2 | Second argument |
- Returns
- true On success
-
false On failure
◆ write_gdd_ram()
| bool OLEDBase::write_gdd_ram |
( |
const uint8_t * | buffer, |
|
|
::std::size_t | size ) const |
|
protectednoexcept |
Write to GDD RAM.
- Parameters
-
| buffer | Pointer to graphics display data |
| size | Size of the graphics display data |
- Returns
- true On success
-
false On failure
The documentation for this struct was generated from the following file: