whiskers 0.2.0
RP2350 BadUSB Tool
Loading...
Searching...
No Matches
wusb.h File Reference

Detailed Description

High-level code for setting up the USB stack.

Author
zane

This code is meant to setup all the USB stack functions in a high-level way. Typically, these are just wrappers for the underlying HAL functions.

#include "../../hal/usb.h"
#include "../../hal/standard.h"
#include <stdio.h>
#include <string.h>

Go to the source code of this file.

Macros

#define whiskers_usb_task()
 Wrapper for HAL usb_loop().
#define whiskers_send_report(x)
 Wrapper for HAL usb_keyboard_send_report().
#define whiskers_msc_setup(x, y, z)
 Wrapper for HAL usb_setup_msc().

Functions

void whiskers_start_usb ()
 Starts the USB stack with default values (being the descriptors).
void whiskers_start_usb_custom (w_usb_mods *mods)
 Starts the USB stack with custom modifications.
void whiskers_send_reset_report ()
 Sends a HID reset report (all 8 bytes being zero).

Macro Definition Documentation

◆ whiskers_msc_setup

#define whiskers_msc_setup ( x,
y,
z )
Value:
usb_setup_msc(x, y, z)
void usb_setup_msc(char vendor_string[8], char product_string[16], _DISK_INFO *di)
Sets up the MSC Class USB interface.

Wrapper for HAL usb_setup_msc().

◆ whiskers_send_report

#define whiskers_send_report ( x)
Value:
void usb_keyboard_send_report(const uint8_t rep[8])
Sends a standard HID keyboard report.

Wrapper for HAL usb_keyboard_send_report().

◆ whiskers_usb_task

#define whiskers_usb_task ( )
Value:
void usb_loop()
For TinyUSB based systems, this refreshes tud_task(). This must be called at least once every millise...

Wrapper for HAL usb_loop().

Function Documentation

◆ whiskers_start_usb_custom()

void whiskers_start_usb_custom ( w_usb_mods * mods)

Starts the USB stack with custom modifications.

Parameters
*modsThe pointer to the w_usb_mods to be applied.