diff options
author | Gautham Yerroju <gautham.yerroju@gmail.com> | 2020-07-15 22:48:04 -0700 |
---|---|---|
committer | Drashna Jael're <drashna@live.com> | 2020-08-08 22:39:53 -0700 |
commit | ed8461315a97122ff14c21bbcd92af0f555c41a8 (patch) | |
tree | 0c26574abe3067b8f5190be25af35e3d9345658f /drivers/oled/oled_driver.h | |
parent | 65cb9c4fdefd284db41d3bf5d5a522830e2cd712 (diff) |
OLED driver function to set pixels (#9713)
* Add a function to set individual pixels
* Add documentation for oled_write_pixel
* use smaller data type for oled_write_pixel
* Fix boundary check edge case
* Update oled_write_pixel doc
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'drivers/oled/oled_driver.h')
-rw-r--r-- | drivers/oled/oled_driver.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h index e8dc25d699..5d0184c55d 100644 --- a/drivers/oled/oled_driver.h +++ b/drivers/oled/oled_driver.h @@ -206,6 +206,10 @@ void oled_pan(bool left); void oled_write_raw(const char *data, uint16_t size); void oled_write_raw_byte(const char data, uint16_t index); +// Sets a specific pixel on or off +// Coordinates start at top-left and go right and down for positive x and y +void oled_write_pixel(uint8_t x, uint8_t y, bool on); + #if defined(__AVR__) // Writes a PROGMEM string to the buffer at current cursor position // Advances the cursor while writing, inverts the pixels if true |