stm32-rs / stm32l0xx-hal

A hardware abstraction layer (HAL) for the STM32L0 series microcontrollers written in Rust
BSD Zero Clause License
96 stars 60 forks source link

Release Rx, Tx resource back to Pin #236

Open lgjonathan opened 6 months ago

lgjonathan commented 6 months ago

Since the Serial Struct does not own the pins, I can't regain the ownership of the pins by calling release() I was wondering if there's a workaround of this?

My use case is that the tx pin sometimes need to transfer data, but sometimes need to send a specific amount of duration of ping.

I'd be happy to rewrite the serial module like stm32f4xx_hal if this feature requires a rewrite. stm32f4xx-hal provides a way to release the pin ownership: https://github.com/stm32-rs/stm32f4xx-hal/issues/748