File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,10 @@ with the [embedded-hal](crates.io/crates/embedded-hal) traits for maximum portab
88
99## [ Unreleased] - ReleaseDate
1010
11+ ### Added
12+
13+ - [ #20 ] ( https://github.com/jamwaffles/sh1106/pull/20 ) Add ` set_contrast ` method to set the display contrast/brightness.
14+
1115## [ 0.3.1] - 2020-03-21
1216
1317### Fixed
Original file line number Diff line number Diff line change @@ -160,6 +160,11 @@ where
160160 pub fn set_rotation ( & mut self , rot : DisplayRotation ) -> Result < ( ) , DI :: Error > {
161161 self . properties . set_rotation ( rot)
162162 }
163+
164+ /// Set the display contrast
165+ pub fn set_contrast ( & mut self , contrast : u8 ) -> Result < ( ) , DI :: Error > {
166+ self . properties . set_contrast ( contrast)
167+ }
163168}
164169
165170#[ cfg( feature = "graphics" ) ]
Original file line number Diff line number Diff line change @@ -187,4 +187,9 @@ where
187187 }
188188 }
189189 }
190+
191+ /// Set the display contrast
192+ pub fn set_contrast ( & mut self , contrast : u8 ) -> Result < ( ) , DI :: Error > {
193+ Command :: Contrast ( contrast) . send ( & mut self . iface )
194+ }
190195}
You can’t perform that action at this time.
0 commit comments