Skip to content

Commit 35aa2f9

Browse files
committed
minor
1 parent 3e7a568 commit 35aa2f9

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

README.md

+2-10
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ A platform agnostic driver for [HCMS-29XX](https://docs.broadcom.com/doc/HCMS-29
1313
* Single dependency on embedded-hal v1.0
1414
* Optional dependency on avr-progmem for AVR targets to store font data in PROGMEM (requires nightly toolchain)
1515
* Examples for:
16-
* Arduino Uno using [avr-hal](https://github.com/Rahix/avr-hal)
17-
* ESP32-S3 using [esp-hal](https://github.com/esp-rs/esp-hal)
16+
* [Arduino Uno](examples/arduino-uno/), based on [avr-hal](https://github.com/Rahix/avr-hal/)
17+
* [ESP32-S3](examples/esp32-s3/), based on [esp-hal](https://github.com/esp-rs/esp-hal)
1818

1919
## Install
2020
To install this driver in your project, add the following line to your `Cargo.toml`'s `dependencies` table:
@@ -79,14 +79,6 @@ display.display_unblank().unwrap();
7979
display.print_ascii_bytes(b"goodbye!").unwrap();
8080
```
8181

82-
## Examples
83-
84-
There are currently two included examples:
85-
- [Arduino Uno](examples/arduino-uno/), based on [avr-hal](https://github.com/Rahix/avr-hal/)
86-
- [ESP32-S3](examples/esp32-s3/), based on [esp-hal](https://github.com/esp-rs/esp-hal).
87-
88-
Follow the appropriate documentation for each HAL for the prerequisite set up and then simply use cargo to build and/or run each.
89-
9082
## TODO
9183
- [ ] Improve generic type interface, e.g. UnconfiguredPin improvements, better constructor, etc.
9284
- [ ] Improve function signatures, e.g. generic implementation for integer print functions

src/lib.rs

+13
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use control_word::*;
88
use core::cell::RefCell;
99
use embedded_hal::digital::{ErrorType, OutputPin};
1010

11+
pub const CHAR_HEIGHT: usize = 7;
1112
pub const CHAR_WIDTH: usize = 5;
1213
const DEVICE_CHARS: u8 = 4;
1314

@@ -148,6 +149,18 @@ where
148149
})
149150
}
150151

152+
pub fn destroy(self) -> (DataPin, RsPin, ClkPin, CePin, BlankPin, OscSelPin, ResetPin) {
153+
(
154+
self.data.into_inner(),
155+
self.rs.into_inner(),
156+
self.clk.into_inner(),
157+
self.ce.into_inner(),
158+
self.blank.into_inner(),
159+
self.osc_sel.into_inner(),
160+
self.reset.into_inner(),
161+
)
162+
}
163+
151164
pub fn begin(&mut self) -> Result<(), Hcms29xxError<PinErr>> {
152165
self.clear()?;
153166

0 commit comments

Comments
 (0)