Module kobo

Module kobo 

Source
Expand description

USB mass storage gadget management for Kobo devices.

This module provides native USB lifecycle management, replacing the previous shell script-based implementation. It supports two backends:

  • MTK (MediaTek): Uses ConfigFS for newer devices (platform mt8113t-ntx).
  • Legacy: Uses kernel module loading via insmod/rmmod for older devices.

ยงExample

โ“˜
use cadmus_core::device::{CURRENT_DEVICE, DeviceMetadata};

let usb_manager = CURRENT_DEVICE.usb_manager()?;
usb_manager.enable()?;
// ... USB sharing active ...
usb_manager.disable()?;

Modulesยง

legacy ๐Ÿ”’
Legacy USB gadget implementation using kernel module loading.
mtk ๐Ÿ”’
MTK (MediaTek) USB gadget implementation using ConfigFS.
operations ๐Ÿ”’
Common USB operations trait for Kobo devices.

Functionsยง

create_usb_manager
Creates a USB manager appropriate for the current platform.