File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed
Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -255,16 +255,17 @@ GPIO drivers now take configuration structs.
255255
256256The OutputOpenDrain driver has been removed. You can use ` Output ` instead with
257257` DriveMode::OpenDrain ` . The input-related methods of ` OutputOpenDrain ` (` level ` ,
258- ` is_high ` , ` is_low ` ) are available through the (unstable) ` Flex ` driver.
258+ ` is_high ` , ` is_low ` ) are available through the (unstable) ` Flex ` driver when enabling input .
259259
260260``` diff
261- - OutputOpenDrain::new(peripherals.GPIO0, Level::Low);
262- + Output::new(
263- peripherals.GPIO0,
264- Level::Low,
265- OutputConfig::default()
266- .with_drive_mode(DriveMode::OpenDrain),
267- );
261+ - let mut gpio = OutputOpenDrain::new(peripherals.GPIO0, Level::Low);
262+ + let mut gpio = Output::new(
263+ + peripherals.GPIO0,
264+ + Level::Low,
265+ + OutputConfig::default()
266+ + .with_drive_mode(DriveMode::OpenDrain),
267+ + ).into_flex();
268+ + gpio.enable_input(true);
268269```
269270
270271## AES DMA driver changes
Original file line number Diff line number Diff line change @@ -1101,6 +1101,10 @@ pub enum DriveMode {
11011101 /// logical [`Level`], but leaves the high level floating, which is then
11021102 /// determined by external hardware, or internal pull-up/pull-down
11031103 /// resistors.
1104+ #[ cfg_attr(
1105+ feature = "unstable" ,
1106+ doc = "\n \n Enable the input related functionality by using [Output::into_flex] and enabling input via [Flex::enable_input]"
1107+ ) ]
11041108 OpenDrain ,
11051109}
11061110
You can’t perform that action at this time.
0 commit comments