Interface for initializing and using the USB Peripherals on the daisy. More...
Interface for initializing and using the USB Peripherals on the daisy.
#include <usb.h>
Public Types | |
| enum class | Result { OK , ERR , OK , ERR } |
| enum | UsbPeriph { FS_INTERNAL , FS_EXTERNAL , FS_BOTH , FS_INTERNAL , FS_EXTERNAL , FS_BOTH } |
| enum class | Result { OK , ERR , OK , ERR } |
| enum | UsbPeriph { FS_INTERNAL , FS_EXTERNAL , FS_BOTH , FS_INTERNAL , FS_EXTERNAL , FS_BOTH } |
| typedef void(*) | ReceiveCallback(uint8_t *buff, uint32_t *len) |
Public Member Functions | |
| UsbHandle () | |
| ~UsbHandle () | |
| void | Init (UsbPeriph dev) |
| void | DeInit (UsbPeriph dev) |
| Result | TransmitInternal (uint8_t *buff, size_t size) |
| Result | TransmitExternal (uint8_t *buff, size_t size) |
| void | SetReceiveCallback (ReceiveCallback cb, UsbPeriph dev) |
| UsbHandle () | |
| ~UsbHandle () | |
| void | Init (UsbPeriph dev) |
| void | DeInit (UsbPeriph dev) |
| Result | TransmitInternal (uint8_t *buff, size_t size) |
| Result | TransmitExternal (uint8_t *buff, size_t size) |
| void | SetReceiveCallback (ReceiveCallback cb, UsbPeriph dev) |
| typedef void(* UsbHandle::ReceiveCallback)(uint8_t *buff, uint32_t *len) |
Function called upon reception of a buffer
|
strong |
|
strong |
| enum UsbHandle::UsbPeriph |
Specified which of the two USB Peripherals to initialize.
| enum UsbHandle::UsbPeriph |
Specified which of the two USB Peripherals to initialize.
|
inline |
|
inline |
|
inline |
|
inline |
| void UsbHandle::DeInit | ( | UsbPeriph | dev | ) |
Deinitializes the specified peripheral(s)
| dev | Device to deinitialize |
| void UsbHandle::DeInit | ( | UsbPeriph | dev | ) |
Deinitializes the specified peripheral(s)
| dev | Device to deinitialize |
| void UsbHandle::Init | ( | UsbPeriph | dev | ) |
Initializes the specified peripheral(s) as USB CDC Devices
| dev | Device to initialize |
| void UsbHandle::Init | ( | UsbPeriph | dev | ) |
Initializes the specified peripheral(s) as USB CDC Devices
| dev | Device to initialize |
| void UsbHandle::SetReceiveCallback | ( | ReceiveCallback | cb, |
| UsbPeriph | dev ) |
sets the callback to be called upon reception of new data
| cb | Function to serve as callback |
| dev | Device to set callback for |
| void UsbHandle::SetReceiveCallback | ( | ReceiveCallback | cb, |
| UsbPeriph | dev ) |
sets the callback to be called upon reception of new data
| cb | Function to serve as callback |
| dev | Device to set callback for |
| Result UsbHandle::TransmitExternal | ( | uint8_t * | buff, |
| size_t | size ) |
Transmits a buffer of 'size' bytes from a USB port connected to the external USB Pins of the daisy seed.
| buff | Buffer to transmit |
| size | Buffer size |
| Result UsbHandle::TransmitExternal | ( | uint8_t * | buff, |
| size_t | size ) |
Transmits a buffer of 'size' bytes from a USB port connected to the external USB Pins of the daisy seed.
| buff | Buffer to transmit |
| size | Buffer size |
| Result UsbHandle::TransmitInternal | ( | uint8_t * | buff, |
| size_t | size ) |
Transmits a buffer of 'size' bytes from the on board USB FS port.
| buff | Buffer to transmit |
| size | Buffer size |
| Result UsbHandle::TransmitInternal | ( | uint8_t * | buff, |
| size_t | size ) |
Transmits a buffer of 'size' bytes from the on board USB FS port.
| buff | Buffer to transmit |
| size | Buffer size |