diff options
| author | Jonathan Dickinson <[email protected]> | 2023-10-01 21:47:50 -0400 |
|---|---|---|
| committer | Jonathan Dickinson <[email protected]> | 2023-10-01 21:49:14 -0400 |
| commit | f98c8886b21099072b9373e7b194e6495291008e (patch) | |
| tree | 8cb77291190f27128c5a3c1dbe576011eb9bd196 /examples | |
| parent | a1036e111eddf82462ce3f6e50923bded89af450 (diff) | |
feat: allow schmitt, slew, and drive strength be set from Flex, Input, Output
Allows the schmitt, slew and drive strength to be set from Flex. Input and Output[OpenDrain] also expose the appropriate setters.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/rp/src/bin/usb_hid_keyboard.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/rp/src/bin/usb_hid_keyboard.rs b/examples/rp/src/bin/usb_hid_keyboard.rs index 99af1f02f..cc2090d22 100644 --- a/examples/rp/src/bin/usb_hid_keyboard.rs +++ b/examples/rp/src/bin/usb_hid_keyboard.rs | |||
| @@ -78,6 +78,9 @@ async fn main(_spawner: Spawner) { | |||
| 78 | // Set up the signal pin that will be used to trigger the keyboard. | 78 | // Set up the signal pin that will be used to trigger the keyboard. |
| 79 | let mut signal_pin = Input::new(p.PIN_16, Pull::None); | 79 | let mut signal_pin = Input::new(p.PIN_16, Pull::None); |
| 80 | 80 | ||
| 81 | // Enable the schmitt trigger to slightly debounce. | ||
| 82 | signal_pin.set_schmitt(true); | ||
| 83 | |||
| 81 | let (reader, mut writer) = hid.split(); | 84 | let (reader, mut writer) = hid.split(); |
| 82 | 85 | ||
| 83 | // Do stuff with the class! | 86 | // Do stuff with the class! |
