libDaisy
Hardware Library for Daisy
Loading...
Searching...
No Matches
usb_host.h
Go to the documentation of this file.
1#ifndef USB_HOST_H
2#define USB_HOST_H
3
4#include <cstdint>
5#include "usbh_def.h"
6
7namespace daisy
8{
19
148
149} // namespace daisy
150
151#endif // DSY_MSD
Definition leddriver.h:33
Presents a USB Mass Storage Device host interface.
Definition usb_host.h:27
USBHostHandle & operator=(const USBHostHandle &other)=default
USBHostHandle()
Definition usb_host.h:139
USBHostHandle(const USBHostHandle &other)=default
Result RegisterClass(USBH_ClassTypeDef *pClass)
void(* ConnectCallback)(void *data)
User defineable callback for USB Connection.
Definition usb_host.h:47
bool IsActiveClass(USBH_ClassTypeDef *usbClass)
void(* ErrorCallback)(void *data)
User defineable callback for USB Unrecoverable Error.
Definition usb_host.h:68
const char * GetProductName()
void(* ClassActiveCallback)(void *userdata)
User defineable callback upon completion of class initialization For example, when a USB drive is con...
Definition usb_host.h:62
Result
return codes from the USB Processing can be used to check the state of USB while running outside of w...
Definition usb_host.h:37
void(* DisconnectCallback)(void *data)
User defineable callback for USB Disconnection.
Definition usb_host.h:50
Result Init(USBHostHandle::Config &config)
bool IsDeviceConnected()
Returns if the ST Middleware detects a connected device.
bool IsPortEnabled()
Returns if the HAL detects that the port is enabled.
Hardware defines and helpers for daisy field platform.
Definition index.h:2
ApplicationTypeDef
Definition usb_host.h:13
@ APPLICATION_IDLE
Definition usb_host.h:14
@ APPLICATION_START
Definition usb_host.h:15
@ APPLICATION_DISCONNECT
Definition usb_host.h:17
@ APPLICATION_READY
Definition usb_host.h:16
Configuration structure for interfacing with USB host Driver.
Definition usb_host.h:72
DisconnectCallback disconnect_callback
Definition usb_host.h:82
ClassActiveCallback class_active_callback
Definition usb_host.h:83
ConnectCallback connect_callback
Definition usb_host.h:81
void * userdata
Definition usb_host.h:85
ErrorCallback error_callback
Definition usb_host.h:84
Config()
Definition usb_host.h:73