Skip to content

File webusb_controller.h

FileList > includes-api > webusb_controller.h

Go to the source code of this file

Connect MCU and Audio Tool via WebUSB.

  • #include <stdint.h>

Public Types

Type Name
typedef void(* webusb_rx_cb

Public Functions

Type Name
void webusb_init (void)
Init tinyusb.
void webusb_register_msg_cb (webusb_rx_cb cb, void * param)
Register message callback function and pass to callback pointer.
void webusb_register_raw_cb (webusb_rx_cb cb, void * param)
Register raw callback function and pass to callback pointer.
uint32_t webusb_send_data (uint8_t * buf, uint32_t bufsize)
Blocking USB Send Data.
void webusb_task (void)
tinyusb device task.

Public Types Documentation

typedef webusb_rx_cb

typedef void(* webusb_rx_cb) (const uint8_t *buf, uint32_t buf_len, void *param);

Public Functions Documentation

function webusb_init

void webusb_init (
    void
) 

function webusb_register_msg_cb

Register message callback function and pass to callback pointer.

void webusb_register_msg_cb (
    webusb_rx_cb cb,
    void * param
) 

Parameters:

  • cd Callback function
  • param Pointer to user parameter which will be passed to callback

function webusb_register_raw_cb

Register raw callback function and pass to callback pointer.

void webusb_register_raw_cb (
    webusb_rx_cb cb,
    void * param
) 

Parameters:

  • cd Callback function
  • param Pointer to user parameter which will be passed to callback

function webusb_send_data

Blocking USB Send Data.

uint32_t webusb_send_data (
    uint8_t * buf,
    uint32_t bufsize
) 

Parameters:

  • buf Pointer to buffer with data to be sent
  • bufsize Requested number of bytes

Returns:

uint32_t The amount of data written to the ring-buffer.

function webusb_task

void webusb_task (
    void
) 

The documentation for this class was generated from the following file neuralSPOT/neuralspot/ns-usb/includes-api/webusb_controller.h