nRF documentation warning fixes
This commit is contained in:
@ -10,6 +10,7 @@ use crate::{Interface, STRING_INDEX_CUSTOM_START};
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
#[non_exhaustive]
|
||||
/// Configuration used when creating [UsbDevice].
|
||||
pub struct Config<'a> {
|
||||
pub(crate) vendor_id: u16,
|
||||
pub(crate) product_id: u16,
|
||||
@ -96,6 +97,7 @@ pub struct Config<'a> {
|
||||
}
|
||||
|
||||
impl<'a> Config<'a> {
|
||||
/// Create default configuration with the provided vid and pid values.
|
||||
pub fn new(vid: u16, pid: u16) -> Self {
|
||||
Self {
|
||||
device_class: 0x00,
|
||||
|
@ -1,3 +1,4 @@
|
||||
//! USB control data types.
|
||||
use core::mem;
|
||||
|
||||
use super::types::*;
|
||||
@ -8,7 +9,7 @@ use super::types::*;
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
pub enum RequestType {
|
||||
/// Request is a USB standard request. Usually handled by
|
||||
/// [`UsbDevice`](crate::device::UsbDevice).
|
||||
/// [`UsbDevice`](crate::UsbDevice).
|
||||
Standard = 0,
|
||||
/// Request is intended for a USB class.
|
||||
Class = 1,
|
||||
|
@ -12,7 +12,7 @@ pub trait Driver<'a> {
|
||||
|
||||
/// Allocates an endpoint and specified endpoint parameters. This method is called by the device
|
||||
/// and class implementations to allocate endpoints, and can only be called before
|
||||
/// [`start`](UsbBus::start) is called.
|
||||
/// [`start`](Self::start) is called.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
@ -95,7 +95,7 @@ pub trait Bus {
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
/// * [`Unsupported`](crate::UsbError::Unsupported) - This UsbBus implementation doesn't support
|
||||
/// * [`Unsupported`](crate::driver::Unsupported) - This UsbBus implementation doesn't support
|
||||
/// simulating a disconnect or it has not been enabled at creation time.
|
||||
fn force_reset(&mut self) -> Result<(), Unsupported> {
|
||||
Err(Unsupported)
|
||||
@ -105,7 +105,7 @@ pub trait Bus {
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
/// * [`Unsupported`](crate::UsbError::Unsupported) - This UsbBus implementation doesn't support
|
||||
/// * [`Unsupported`](crate::driver::Unsupported) - This UsbBus implementation doesn't support
|
||||
/// remote wakeup or it has not been enabled at creation time.
|
||||
fn remote_wakeup(&mut self) -> Self::RemoteWakeupFuture<'_>;
|
||||
}
|
||||
|
Reference in New Issue
Block a user