Symbols
loading...
Files
loading...

TinyUSB Library library

TinyUSB Library is a library defining the following symbols:

Most used functions

Name
Location
Summary
Get number of items in FIFO. As this function only reads the read and write pointers once, this function is reentrant and thus thread and ISR save without any mutexes. In case an overflow occurred, this function return f.depth at maximum. Overflows are checked and corrected for in the read functions!
Clear the fifo read and write pointers
Get remaining space in FIFO. As this function only reads the read and write pointers once, this function is reentrant and thus thread and ISR save without any mutexes.
This function will write n elements into the array index specified by the write pointer and increment the write index.
This function will read n elements from the array index specified by the read pointer and increment the read index. This function checks for an overflow and corrects read pointer if required.
Read one item without removing it from the FIFO. This function checks for an overflow and corrects read pointer if required.
Check if FIFO is empty. As this function only reads the read and write pointers once, this function is reentrant and thus thread and ISR save without any mutexes.
Change the fifo mode to overwritable or not overwritable
Write one element into the buffer. This function will write one element into the array index specified by the write pointer and increment the write index.
Read one element out of the buffer. This function will return the element located at the array index of the read pointer, and then increment the read pointer index. This function checks for an overflow and corrects read pointer if required.
Check if FIFO is full. As this function only reads the read and write pointers once, this function is reentrant and thus thread and ISR save without any mutexes.
Advance write pointer - intended to be used in combination with DMA. It is possible to fill the FIFO by use of a DMA in circular mode. Within DMA ISRs you may update the write pointer to be able to read from the FIFO. As long as the DMA is the only process writing into the FIFO this is safe to use. USE WITH CARE - WE DO NOT CONDUCT SAFETY CHECKS HERE!
Advance read pointer - intended to be used in combination with DMA. It is possible to read from the FIFO by use of a DMA in linear mode. Within DMA ISRs you may update the read pointer to be able to again write into the FIFO. As long as the DMA is the only process reading from the FIFO this is safe to use. USE WITH CARE - WE DO NOT CONDUCT SAFETY CHECKS HERE!
Get read info Returns the length and pointer from which bytes can be read in a linear manner. This is of major interest for DMA transmissions. If returned length is zero the corresponding pointer is invalid. The read pointer does NOT get advanced, use tu_fifo_advance_read_pointer() to do so!
Get linear write info Returns the length and pointer to which bytes can be written into FIFO in a linear manner. This is of major interest for DMA transmissions not using circular mode. If a returned length is zero the corresponding pointer is invalid. The returned lengths summed up are the currently free space in the FIFO. The write pointer does NOT get advanced, use tu_fifo_advance_write_pointer() to do so! TAKE CARE TO NOT OVERFLOW THE BUFFER MORE THAN TWO TIMES THE FIFO DEPTH - IT CAN NOT RECOVERE OTHERWISE!
Read n items without removing it from the FIFO This function checks for an overflow and corrects read pointer if required.
Check if overflow happened. BE AWARE - THIS FUNCTION MIGHT NOT GIVE A CORRECT ANSWERE IN CASE WRITE POINTER "OVERFLOWS" Only one overflow is allowed for this function to work e.g. if depth = 100, you must not write more than 2*depth-1 items in one rush without updating write pointer. Otherwise write pointer wraps and your pointer states are messed up. This can only happen if you use DMAs, write functions do not allow such an error. Avoid such nasty things! All reading functions (read, peek) check for overflows and correct read pointer on their own such that latest items are read. If required (e.g. for DMA use) you can also correct the read pointer by tu_fifo_correct_read_pointer().
usbd_edpt_close will disable an endpoint. In progress transfers on this EP may be delivered after this call.

Other commonly used symbols

Name
Location
Summary
USB Interface Descriptor
USB Endpoint Descriptor
Command Block Wrapper
Command Status Wrapper
Standard HID Boot Protocol Keyboard Report.
USB Configuration Descriptor
SCSI Read 10 Command
Standard HID Boot Protocol Mouse Report.
SCSI Inquiry Command
SCSI Read Capacity 10 Response Data
SCSI Inquiry Response Data
USB Interface Association Descriptor (IAD ECN)
HID Gamepad Protocol Report.
Key codes of the currently pressed keys.
buttons mask for currently pressed buttons in the mouse.
SCSI Read Capacity 10 Command: Read Capacity
SCSI Test Unit Ready Command
USB Device Qualifier Descriptor
Abstract Control Management Functional Descriptor This functional descriptor describes the commands supported by by the Communications Class interface with SubClass code of CDC_COMM_SUBCLASS_ABSTRACT_CONTROL_MODEL
SCSI Read Format Capacity: Write Capacity
USB Other Speed Configuration Descriptor
Header Functional Descriptor (Communication Interface)
Union Functional Descriptor (Communication Interface)
Country Selection Functional Descriptor (Communication Interface)
Call Management Functional Descriptor This functional descriptor describes the processing of calls for the Communications Class interface.
Direct Line Management Functional Descriptor This functional descriptor describes the commands supported by the Communications Class interface with SubClass code of CDC_FUNC_DESC_DIRECT_LINE_MANAGEMENT
Telephone Ringer Functional Descriptor The Telephone Ringer functional descriptor describes the ringer capabilities supported by the Communications Class interface, with the SubClass code of CDC_COMM_SUBCLASS_TELEPHONE_CONTROL_MODEL
Telephone Operational Modes Functional Descriptor The Telephone Operational Modes functional descriptor describes the operational modes supported by the Communications Class interface, with the SubClass code of CDC_COMM_SUBCLASS_TELEPHONE_CONTROL_MODEL
Telephone Call and Line State Reporting Capabilities Descriptor The Telephone Call and Line State Reporting Capabilities functional descriptor describes the abilities of a telephone device to report optional call and line states.
the total size of the Report descriptor.
Current delta x movement of the mouse.
Current delta y movement on the mouse.
Current delta wheel movement on the mouse.
Keyboard modifier (KEYBOARD_MODIFIER_* masks).
Numeric expression that is the total size of the HID descriptor
Constant name specifying type of HID descriptor.
buttons mask for currently pressed buttons in the mouse.
Current x position of the mouse.
Current y position of the mouse.
Current delta wheel movement on the mouse.
Type of HID class report.
Reserved for OEM use, always set to 0.
Standard Gamepad Buttons Naming from Linux input event codes
Currently only Abstract Control Model subclass is supported
Numeric expression identifying the HID Class Specification release
Numeric expression identifying country code of the localized hardware.
Numeric expression specifying the number of class descriptors
must be 8*n, length in bytes of formattable capacity descriptor followed it.
Number of Logical Blocks
Like most PC's OS, Hub support is completely hidden from Application. In fact, application cannot determine whether a device is mounted directly via roothub or via a hub's port. All Hub-related procedures are performed and managed by tinyusb stack. Unless you are trying to develop the stack itself, there are nothing else can be used by Application.

Dependencies

TinyUSB Library depends on the following libraries: