diff options
| author | MathisDerooNXP <[email protected]> | 2025-11-21 10:00:01 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-11-21 10:00:01 -0800 |
| commit | eed314ebb58772476971af49b36b68301eb0d8cc (patch) | |
| tree | e89ac428dac9d24d96b0ef3cf2c96dc2e4f4dafe /src/lib.rs | |
| parent | a8eb124e47e633cd81e0863253d5f6bdd7545260 (diff) | |
Gpio support v2 (#26)
* Improve GPIO driver and add button example
- port and pcr registers are defined using paste!
- added pin configuration for slew rate, drive strength, mux function, etc...
- added button example to showcase input gpio feature
Signed-off-by: Mathis Deroo <[email protected]>
* Add pull-up pull-down config support for input gpio
Signed-off-by: Mathis Deroo <[email protected]>
* Replace GPIOs enum with existing ones in the PAC
Signed-off-by: Mathis Deroo <[email protected]>
* Remove init_gpio_pin function as it is done in hal init config
Signed-off-by: Mathis Deroo <[email protected]>
* Integrate feedback for the GPIO driver
- Add again missing IO peripherals
- Added function to configure separately slew rate, drive strength, pull.
- Revert comment changes
Signed-off-by: Mathis Deroo <[email protected]>
* Create user-readable field for the pin configuration
Signed-off-by: Mathis Deroo <[email protected]>
* examples: button: remove left-over OSTIMER initialization
While at that, also cargo fmt
* Fix warnings
* Add documentation for public functions
Signed-off-by: Mathis Deroo <[email protected]>
* Expose port and pcr registers to AnyPin implementation
Signed-off-by: Mathis Deroo <[email protected]>
* Remove unnecessary change
Signed-off-by: Mathis Deroo <[email protected]>
* Run cargo fmt
---------
Signed-off-by: Mathis Deroo <[email protected]>
Co-authored-by: Felipe Balbi <[email protected]>
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs index e93ff61a6..175642f75 100644 --- a/src/lib.rs +++ b/src/lib.rs | |||
| @@ -1,7 +1,9 @@ | |||
| 1 | #![no_std] | 1 | #![no_std] |
| 2 | // TODO(AJM): As of 2025-11-13, we need to do a pass to ensure safety docs | 2 | #![allow(async_fn_in_trait)] |
| 3 | // are complete prior to release. | 3 | #![doc = include_str!("../README.md")] |
| 4 | #![allow(clippy::missing_safety_doc)] | 4 | |
| 5 | // //! ## Feature flags | ||
| 6 | // #![doc = document_features::document_features!(feature_label = r#"<span class="stab portability"><code>{feature}</code></span>"#)] | ||
| 5 | 7 | ||
| 6 | pub mod clocks; // still provide clock helpers | 8 | pub mod clocks; // still provide clock helpers |
| 7 | pub mod gpio; | 9 | pub mod gpio; |
