Skip to content

Commit 0dc72c8

Browse files
authored
Make Brightness::custom public (#183)
1 parent cafc5a1 commit 0dc72c8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
## [Unreleased] - ReleaseDate
88

9+
### Added
10+
11+
- [#183](https://github.com/jamwaffles/ssd1306/pull/183) `Brightness::custom()` is now publicly available.
12+
913
### Fixed
1014

1115
- [#177](https://github.com/jamwaffles/ssd1306/pull/177) Fixed a few spelling mistakes.

src/brightness.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ impl Brightness {
3939
///
4040
/// `contrast` sets the value used in the `0x81 Set Contrast Control` command and must be
4141
/// between 0 and 255. See section 10.1.7 of the SSD1306 datasheet for more information.
42-
const fn custom(precharge: u8, contrast: u8) -> Self {
42+
pub const fn custom(precharge: u8, contrast: u8) -> Self {
4343
debug_assert!(
4444
0 < precharge && precharge <= 15,
4545
"Precharge value must be between 1 and 15"

0 commit comments

Comments
 (0)