From 8cd85d39451d06b680c3271002625b4d568f096f Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Thu, 21 Dec 2023 11:46:11 +0100 Subject: [PATCH] riot-rs-embassy: add comment on how to override the usb config --- src/riot-rs-embassy/src/lib.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/riot-rs-embassy/src/lib.rs b/src/riot-rs-embassy/src/lib.rs index 3e6a4369b..da2f29edc 100644 --- a/src/riot-rs-embassy/src/lib.rs +++ b/src/riot-rs-embassy/src/lib.rs @@ -1,3 +1,14 @@ +//! This module provides an opinionated integration of `embassy`. +//! +//! To provide a custom USB configuration, enable the feature +//! `riot_rs_embassy/override_usb_config`, then add this to your code: +//! ```rust +//! #[no_mangle] +//! pub fn riot_rs_usb_config() -> embassy_usb::Config<'static> { +//! /// create config here +//! } +//! ``` + #![no_std] #![feature(type_alias_impl_trait)] #![feature(used_with_arg)]