Skip to content

Commit a1484e6

Browse files
committed
minor
1 parent 3e7a568 commit a1484e6

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-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

+12
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,18 @@ where
148148
})
149149
}
150150

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

0 commit comments

Comments
 (0)