|
gossamer 0.0.1
a very lightweight app framework for SAMD and SAML chips
|
Functions for configuring and using the USB peripheral. More...
Functions | |
| void | usb_init (void) |
| Initializes the USB preipheral, and assigns the USB pins to their relevant functions. In the process, this function also sets up the 48 MHz DFLL clock on GCLK1. | |
| void | usb_enable (void) |
| Initializes the TinyUSB stack and enables the USB peripheral. | |
| bool | usb_is_enabled (void) |
| Checks if the USB peripheral is enabled. | |
| void | usb_disable (void) |
| Disables the USB peripheral. | |
Functions for configuring and using the USB peripheral.
Gossamer uses the TinyUSB stack for USB support.
| void usb_disable | ( | void | ) |
Disables the USB peripheral.
| void usb_enable | ( | void | ) |
Initializes the TinyUSB stack and enables the USB peripheral.
In order to make use of the tinyUSB stack, there are two additional setup steps you must take:
TINYUSB_MSC=1 to your app's Makefile. You can also add more than one class, e.g. for two CDC interfaces, you would add TINYUSB_CDC=2. Available TinyUSB classes are:usb_descriptors.c file. See the usb app for an example of how to do this.| bool usb_is_enabled | ( | void | ) |
Checks if the USB peripheral is enabled.