Skip to content

Commit bbc2f58

Browse files
committed
doc(support_rp2040): documentate usbstdio::Options
1 parent fb375e7 commit bbc2f58

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/r3_support_rp2040/src/usbstdio.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,15 @@ fn with_usb_stdio_global<T>(f: impl FnOnce(&mut UsbStdioGlobal, &mut WriteBufDeq
4848
})
4949
}
5050

51+
/// The options for the USB serial device configured by [`configure`].
5152
pub trait Options {
53+
/// Handle incoming data.
54+
///
55+
/// This method may be called with interrupts disabled. It's safe to write
56+
/// bytes to the USB serial device here.
5257
fn handle_input(_s: &[u8]) {}
58+
59+
/// Get the product name to indicate in the USB device descriptor.
5360
fn product_name() -> &'static str {
5461
"R3 Example Application Port"
5562
}

0 commit comments

Comments
 (0)