return 'set_as_input' function for Flex (#3250)

* return 'set_as_input' function for Flex

* Update CHANGELOG.md
This commit is contained in:
Bykov Denis 2025-04-03 14:00:23 +03:00 committed by GitHub
parent ae60ceb8bc
commit 6d781b0cdf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 0 deletions

View File

@ -42,6 +42,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- ESP32/ESP32-S2: Avoid running into timeouts with reads/writes larger than the FIFO (#3199)
- ESP32: Enforce required pointer alignments in DMA buffers (#3296)
- ESP32-C6: Keep ADC enabled to improve radio signal strength (#3249)
- Flex: Revert removal of `Flex::set_as_input` (#3250)
- Fix off-by-one in the allowed range of the spi clock calculations (#3266)
- Fixed an issue where inverting a pin via the interconnect matrix was ineffective (#3312)
- The half-duplex SPI APIs should accept more valid line width combinations (#3325)

View File

@ -1794,6 +1794,14 @@ impl<'d> Flex<'d> {
self.pin.set_to_push_pull_output();
}
/// Set the GPIO to input mode.
#[inline]
#[instability::unstable]
pub fn set_as_input(&mut self, pull: Pull) {
self.pin.init_input(pull);
self.pin.enable_output(false);
}
/// Set the output as high.
#[inline]
#[instability::unstable]