Commit Graph

24 Commits

Author SHA1 Message Date
Mike Causer bc7822d8e9 drivers/display/ssd1306.py: Add support for 72x40 displays.
The 72x40 OLED requires selecting the internal IREF, as opposed to the
default external IREF.  This is an undocumented feature in the SSD1306
datasheet, but is present in the SSD1315 datasheet.  It's possible the
72x40 OLED is actually using the newer SSD1315 controller.  Sending the
IREF select command to SSD1306 displays has no effect on them, so it's
added to the init_display() instead of wrapping in an "if width = 72".

Also tested on a 128x64 OLED using the SSD1315 controller (smaller ribbon
cable) and the proposed change has no effect on the display, as the module
comes with the correct current limiting resistor.  Internal and external
IREF work the same.

Fixes issue #7281.
2021-06-17 18:54:32 +10:00
Mike Causer 9eea51b730 drivers/display/ssd1306.py: Add rotate method.
And clean up (make more efficient) display set-up commands.
2021-05-06 15:57:19 +10:00
robert-hh 8680a74595 drivers/display/ssd1306.py: Change the SET_COM_PIN_CFG setting.
Making it more specific to use 0x02 for display with an aspect ratio > 2
(resolutions 96x16 and 128x32) and 0x12 for all other sizes as recommended
by @mcauser.  Tested with a 64x32 display which did not work before.
2020-04-07 13:42:37 +10:00
Damien George 69661f3343 all: Reformat C and Python source code with tools/codeformat.py.
This is run with uncrustify 0.70.1, and black 19.10b0.
2020-02-28 10:33:03 +11:00
Damien George 02afc0d241 drivers/display/ssd1306.py: Change to use new i2c.writevto() method.
Fixes issue #3482.
2019-05-20 15:06:39 +10:00
Damien George dc77fdb7d4 drivers/display/lcd160cr.py: In fast_spi, send command before flushing.
The intention of oflush() is to flush the "fast SPI" command itself so that
the SPI object is ready to use when the function returns.
2018-09-18 13:49:49 +10:00
Jim Mussared bb3412291a drivers/display/ssd1306: Fix super() call in SSD1306 driver. 2018-01-10 17:56:10 +11:00
Peter Hinch 479392a56e drivers/display/ssd1306: Make SSD1306 class inherit from FrameBuffer. 2017-12-13 14:45:04 +11:00
Damien George ca2427c313 drivers/display/ssd1306: Make poweron() work the same with SSD1306_SPI.
The poweroff() and poweron() methods are used to do soft power control of
the display, and this patch makes these methods work the same for both I2C
and SPI interfaces.
2017-10-06 12:48:44 +11:00
Tiago Queiroz 7df4083ac6 drivers/display/ssd1306: Implement SSD1306_I2C poweron method.
After a poweroff(), the poweron() method does a soft power-on and any
previous state of the display persists.
2017-10-06 12:47:22 +11:00
Peter Hinch 8fa03fee77 drivers/display/ssd1306.py: Improve performance of graphics methods.
It removes the need for a wrapper Python function to dispatch to the
framebuf method which makes each function call a bit faster, roughly 2.5x.
This patch also adds the rest of the framebuf methods to the SSD class.
2017-09-25 16:13:32 +10:00
Paul Sokolovsky 1c9ee49756 drivers: Replace deprecated Pin.high()/low() methods with .__call__(1/0). 2017-05-21 17:44:58 +03:00
Damien George 55dd83a7ba drivers/display/lcd160cr_test: Allow test to take orientation parameter. 2017-05-17 19:54:38 +10:00
Damien George f351c6db5e drivers/display/lcd160cr: Fix get_line method and enhance screen_dump.
The docs are updated and describe the new behaviour of these methods.
2017-05-17 19:53:13 +10:00
Damien George 528aeb3bf3 drivers/display/lcd160cr: Add check that JPEG size is less than 65536. 2017-02-27 18:39:35 +11:00
Damien George 8400d0461d drivers/display/lcd160cr: Fix bug with save_to_flash method. 2017-02-24 17:22:57 +11:00
Damien George b0a6dda115 drivers/display/lcd160cr: Fix bugs with lcd.get_pixel().
Fixes issues #2880 and #2881.
2017-02-21 17:40:34 +11:00
Stephan Brauer 8f3e07f17d drivers/display/lcd160cr: Use correct variable in set_power(). 2017-02-17 16:54:05 +11:00
Damien George 43d9f9916a drivers/display: Add driver and test for uPy LCD160CR display. 2017-01-23 14:36:19 +11:00
Radomir Dopieralski eb09336e99 drivers/display/ssd1306.py: Update to use FrameBuffer not FrameBuffer1 2016-12-01 16:43:25 +11:00
Damien George 7bb0f7b0f6 drivers: Add "from micropython import const" when const is used.
Following best-practice use of the const feature, to make it compatible
with Python.
2016-11-03 12:41:11 +11:00
Radomir Dopieralski ab8a5d5199 drivers/display/ssd1306: Add width arg and support 64px wide displays.
In particular, the WeMOS D1 Mini board comes with a shield that has a
64x48 OLED display. This patch makes it display properly, with the upper
left pixel being at (0, 0) and not (32, 0).

I tried to do this with the configuration commands, but there doesn't
seem to be a command that would set the column offset (there is one for
the line offset, though).
2016-06-26 13:09:31 +01:00
Radomir Dopieralski 43c8f545d2 drivers/display/ssd1306: update SSD1306_SPI to work with new API
Makes it work on the ESP8266.
2016-06-03 11:13:17 +01:00
Damien George 73bc0c24ab drivers: Add SSD1306 OLED driver, with I2C and SPI interfaces. 2016-04-12 14:06:54 +01:00