ssd1331
is a Rust driver for the SSD1331 OLED display
driver/module. It implements the embedded-hal
traits to allow easy integration with embedded Rust
projects using an SPI interface.
Unreleased - ReleaseDate
0.3.0 - 2021-07-11
- (breaking) #12 Upgrade to
embedded-graphics
0.7.
0.2.3 - 2021-04-06
- #11 Add
turn_on
andturn_off
methods.
0.2.2 - 2020-03-21
- Fix docs.rs build config
0.2.1 - 2020-03-20
0.2.0 - 2020-03-20
- (breaking) #6 Upgrade to embedded-graphics 0.6.0
- #4 Guard against negative pixel coordinates panicking
draw_pixel()
calls.
- (breaking) Upgraded to embedded-graphics 0.6.0-alpha.3
The driver has been drastically simplified with removal of the RawMode
and GraphicsMode
structs, as well as the Builder
.
embedded-graphics is also upgraded to version 0.6.0-alpha.2
, so there may be breaking changes around uses of embedded-graphics.
Version 0.1.x
use ssd1331::{prelude::*, Builder};
let mut disp: GraphicsMode<_> = Builder::new().connect_spi(spi, dc).into();
disp.reset(&mut rst, &mut delay);
disp.init().unwrap();
disp.flush().unwrap();
disp.get_dimensions();
disp.get_rotation();
Version 0.2.x
use ssd1331::{Ssd1331, DisplayRotation};
let mut disp = Ssd1331::new(spi, dc, DisplayRotation::Rotate0);
disp.reset(&mut rst, &mut delay).unwrap();
disp.init().unwrap();
disp.flush().unwrap();
disp.dimensions();
disp.rotation();
- Added
ssd1331::Error
enum with pin (if DC pin fails to set) and communication error (if SPI write fails) variants. The return type of fallible methods has changed fromResult<(), ()>
toResult<(), ssd1331::Error<CommE, PinE>>
.CommE
andPinE
default to()
so no user code changes should be required.
-
Upgraded embedded-graphics to 0.6.0-alpha.2
-
(breaking)
display.get_dimensions()
is renamed todisplay.dimensions()
-
(breaking) The
Builder
struct has been removed. UseSsd1331::new()
instead. Code that looked like this:use ssd1331::{prelude::*, Builder}; let mut disp: GraphicsMode<_> = Builder::new().connect_spi(spi, dc).into(); disp.reset(&mut rst, &mut delay); disp.init().unwrap(); disp.flush().unwrap();
Should now look like this:
use ssd1331::{Ssd1331, DisplayRotation}; let mut disp = Ssd1331::new(spi, dc, DisplayRotation::Rotate0); disp.reset(&mut rst, &mut delay).unwrap(); disp.init().unwrap(); disp.flush().unwrap();
-
(breaking) Crate import structure has been simplified. Imports that looked like this:
use ssd1331::prelude::*; use ssd1331::Builder;
Should now look like this:
use ssd1331::{Ssd1331, DisplayRotation};
See above items about removal of
Builder
struct.
- (breaking) Removed
RawMode
andGraphicsMode
traits. The.set_pixel()
and.draw()
methods can now be used directly on theSsd1331
struct. - (breaking) Removed
Builder
struct.