Quick command lookup

… visits
Parent Previous Next

Find the action you need, then open the linked guide for its setup, example and limits. The table uses the main command names.

Read USB_Result after a command that reports status. These commands are not BASIC functions that you can put inside an expression. Some service and event commands leave USB_Result unchanged; check the detailed explanation before using the result.

What you want to do

Command

Explanation

Initialize the selected USB personality

USB_Init()

Startup

Run common protocol work in foreground

USB_Service()

USB servicing

Service a hardware USB interrupt

USB_ISR()

USB interrupts

Enable or mask the USB interrupt source

USB_EnableIRQ(), USB_DisableIRQ()

USB interrupts

Connect/disconnect deliberately in software

USB_Attach(), USB_Detach()

Connection changes

Check space for a HID/CDC packet

USB_CanWrite()

Sending data

Queue a HID/CDC packet

USB_Write(length)

Sending data

Retry a busy send for a bounded period

USB_WriteWait(length, timeout)

Sending data

Check or wait for all data packets to finish

USB_TxIdle(), USB_Flush(timeout)

Sending data

Check for a waiting HID/CDC packet

USB_Available()

Receiving data

Obtain the next HID/CDC packet

USB_Read()

Receiving data

Collect connection and activity events

USB_GetEvents()

Connection changes

Clear recorded hardware-error flags

USB_ClearErrors()

Connection changes

Supply the remote-wake timebase

USB_Tick(nowMs)

Remote wake-up

Request host wake after authorization

USB_RemoteWake()

Remote wake-up

Report serial-device status to the host

USB_CDC_Notify(state)

CDC serial

Progress storage commands

USB_MSCService()

MSC file handling

Finish the current file/flush request

USB_MSC_Complete(result)

MSC file handling

Progress network and HTTP traffic

USB_NetworkService()

Browser communication

Publish an integer

USB_NetSetValue(index, value)

Browser communication

Publish a scaled decimal

USB_NetSetFixed(index, value, places)

Browser communication

Publish an unavailable value

USB_NetSetNull(index)

Browser communication

Select the number of values per response

USB_NetSetCount(count)

Browser communication

Consume a browser command

USB_NetReadValue(index)

Browser communication

See also

Created with the Personal Edition of HelpNDoc: Transform your help documentation into a stunning website