From 3886bef7bad16f3313972837791fd44a02f7a1fd 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 32660d673..fc72b97eb 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)]