Monochrome OLED.
More...
#include <OutputHardware.hpp>
|
| constexpr | OLED () |
| | Create an uninitialized OLED.
|
| |
| | OLED (const OLEDParameters ¶ms, I2CBus bus) |
| | Create an OLED using any of the default I2C addresses.
|
| |
| | OLED (const OLEDParameters ¶ms, uint8_t address7bits, I2CBus bus) |
| | Create an OLED using a specific I2C address.
|
| |
| | OLED (const OLED &other) noexcept=delete |
| | Copy-constructor (deleted)
|
| |
| | OLED (OLED &&other) noexcept=default |
| | Move-constructor (default)
|
| |
| OLED & | operator= (const OLED &other) noexcept=delete |
| | Copy-Assignment (deleted)
|
| |
| OLED & | operator= (OLED &&other) noexcept=default |
| | Move-Assignment (default)
|
| |
| OLEDParameters | parameters () const noexcept |
| | Get the OLED parameters passed in the constructor.
|
| |
| ::std::size_t | frame_size () const noexcept |
| | Get the frame size in bytes.
|
| |
| void | contrast (uint8_t value) |
| | Set the display contrast.
|
| |
| void | enable_display (bool yesOrNo) |
| | Enable/Disable GDD RAM display.
|
| |
| void | turn (bool onOrOff) |
| | Turn display on/off.
|
| |
|
void | inverse_display (bool yesOrNo) |
| | Switch pixel colors.
|
| |
| void | clear (bool inverted=false) |
| | Clear the display.
|
| |
| void | show (const uint8_t *frame) |
| | Display a frame at once.
|
| |
| Controller | guess_controller () const noexcept |
| | Guess the OLED controller.
|
| |
| bool | available () const noexcept |
| | Check if the OLED was found in the I2C bus.
|
| |
|
|
void | init () |
| | Initialize the display (called from the constructor)
|
| |
| void | locate (uint8_t x, uint8_t page) |
| | Set the start page and start column before display.
|
| |
| uint8_t | row2col (uint8_t bit_index, const uint8_t *from, uint8_t row_count) |
| | Utility function to translate a row-major vector graphic to the column-major format used by OLED screens.
|
| |
| 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.
|
| |
Monochrome OLED.
Definition at line 616 of file OutputHardware.hpp.
◆ OLED() [1/5]
◆ OLED() [2/5]
Create an OLED using any of the default I2C addresses.
- Parameters
-
| params | OLED parameters |
| bus | I2C Bus |
◆ OLED() [3/5]
Create an OLED using a specific I2C address.
- Parameters
-
| params | OLED parameters |
| address7bits | Full 7-bit I2C address |
| bus | I2C Bus |
◆ OLED() [4/5]
| OLED::OLED |
( |
const OLED & | other | ) |
|
|
deletenoexcept |
Copy-constructor (deleted)
- Parameters
-
| other | Instance to be copied |
◆ OLED() [5/5]
| OLED::OLED |
( |
OLED && | other | ) |
|
|
defaultnoexcept |
Move-constructor (default)
- Parameters
-
| other | Instance to be moved |
◆ clear()
| void OLED::clear |
( |
bool | inverted = false | ) |
|
Clear the display.
- Parameters
-
| inverted | True for white, false for black. |
◆ contrast()
| void OLED::contrast |
( |
uint8_t | value | ) |
|
Set the display contrast.
- Parameters
-
| value | Contrast. Higher means more contrast. |
◆ enable_display()
| void OLED::enable_display |
( |
bool | yesOrNo | ) |
|
Enable/Disable GDD RAM display.
- Parameters
-
| yesOrNo | True to enable, false to Disable |
◆ frame_size()
| ::std::size_t OLED::frame_size |
( |
| ) |
const |
|
inlinenoexcept |
◆ locate()
| void OLED::locate |
( |
uint8_t | x, |
|
|
uint8_t | page ) |
|
protected |
Set the start page and start column before display.
- Note
- The controller is configured in "page" mode
- Parameters
-
| x | Column (or segment) index |
| page | Page index |
◆ operator=() [1/2]
| OLED & OLED::operator= |
( |
const OLED & | other | ) |
|
|
deletenoexcept |
Copy-Assignment (deleted)
- Parameters
-
| other | Instance to be copied |
◆ operator=() [2/2]
Move-Assignment (default)
- Parameters
-
| other | Instance to be moved |
◆ parameters()
◆ row2col()
| uint8_t OLED::row2col |
( |
uint8_t | bit_index, |
|
|
const uint8_t * | from, |
|
|
uint8_t | row_count ) |
|
inlineprotected |
Utility function to translate a row-major vector graphic to the column-major format used by OLED screens.
- Parameters
-
| bit_index | Column index in a single byte, range [0,7] |
| from | Pointer to the frame buffer's first row and column |
| row_count | Number of rows to translate, range [0,8] |
- Returns
- uint8_t byte representing an 1x8 chunk (one segment in one page)
◆ show()
| void OLED::show |
( |
const uint8_t * | frame | ) |
|
Display a frame at once.
- Parameters
-
| frame | Pointer to a frame buffer. |
◆ turn()
| void OLED::turn |
( |
bool | onOrOff | ) |
|
Turn display on/off.
- Parameters
-
| onOrOff | True to turn on, false to turn off. |
◆ _params
◆ height_b
◆ width_b
The documentation for this struct was generated from the following file: