dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pios_usbhook.c File Reference
#include "pios.h"
#include "pios_usb.h"
#include "pios_usbhook.h"
#include "pios_usb_defs.h"
#include "pios_usb_cdc_priv.h"
#include "pios_usb_board_data.h"
#include "usb_core.h"
#include "usbd_core.h"
#include "usbd_ioreq.h"
#include "usbd_req.h"
#include "usb_dcd_int.h"

Go to the source code of this file.

Data Structures

struct  usb_if_entry
 
struct  usb_ep_entry
 

Functions

void PIOS_USBHOOK_RegisterDevice (const uint8_t *desc, uint16_t desc_size)
 
void PIOS_USBHOOK_RegisterString (enum usb_string_desc string_id, const uint8_t *desc, uint16_t desc_size)
 
void PIOS_USBHOOK_RegisterConfig (uint8_t config_id, const uint8_t *desc, uint16_t desc_size)
 
void PIOS_USBHOOK_Activate (void)
 
void PIOS_USBHOOK_Deactivate (void)
 
void OTG_FS_IRQHandler (void)
 
void PIOS_USBHOOK_RegisterIfOps (uint8_t ifnum, struct pios_usb_ifops *ifops, uintptr_t context)
 
void PIOS_USBHOOK_RegisterEpInCallback (uint8_t epnum, uint16_t max_len, pios_usbhook_epcb cb, uintptr_t context)
 
void PIOS_USBHOOK_DeRegisterEpInCallback (uint8_t epnum)
 
void PIOS_USBHOOK_RegisterEpOutCallback (uint8_t epnum, uint16_t max_len, pios_usbhook_epcb cb, uintptr_t context)
 
void PIOS_USBHOOK_DeRegisterEpOutCallback (uint8_t epnum)
 
void PIOS_USBHOOK_CtrlTx (const uint8_t *buf, uint16_t len)
 
void PIOS_USBHOOK_CtrlRx (uint8_t *buf, uint16_t len)
 
void PIOS_USBHOOK_EndpointTx (uint8_t epnum, const uint8_t *buf, uint16_t len)
 
void PIOS_USBHOOK_EndpointRx (uint8_t epnum, uint8_t *buf, uint16_t len)
 
static const uint8_t * PIOS_USBHOOK_DEV_GetDeviceDescriptor (uint8_t speed, uint16_t *length)
 
static const uint8_t * PIOS_USBHOOK_DEV_GetLangIDStrDescriptor (uint8_t speed, uint16_t *length)
 
static const uint8_t * PIOS_USBHOOK_DEV_GetManufacturerStrDescriptor (uint8_t speed, uint16_t *length)
 
static const uint8_t * PIOS_USBHOOK_DEV_GetProductStrDescriptor (uint8_t speed, uint16_t *length)
 
static const uint8_t * PIOS_USBHOOK_DEV_GetSerialStrDescriptor (uint8_t speed, uint16_t *length)
 
static const uint8_t * PIOS_USBHOOK_DEV_GetConfigurationStrDescriptor (uint8_t speed, uint16_t *length)
 
static const uint8_t * PIOS_USBHOOK_DEV_GetInterfaceStrDescriptor (uint8_t speed, uint16_t *length)
 
static void PIOS_USBHOOK_USR_Init (void)
 
static void PIOS_USBHOOK_USR_DeviceReset (uint8_t speed)
 
static void PIOS_USBHOOK_USR_DeviceConfigured (void)
 
static void PIOS_USBHOOK_USR_DeviceSuspended (void)
 
static void PIOS_USBHOOK_USR_DeviceResumed (void)
 
static void PIOS_USBHOOK_USR_DeviceConnected (void)
 
static void PIOS_USBHOOK_USR_DeviceDisconnected (void)
 
static uint8_t PIOS_USBHOOK_CLASS_Init (void *pdev, uint8_t cfgidx)
 
static uint8_t PIOS_USBHOOK_CLASS_DeInit (void *pdev, uint8_t cfgidx)
 
static uint8_t PIOS_USBHOOK_CLASS_Setup (void *pdev, USB_SETUP_REQ *req)
 
static uint8_t PIOS_USBHOOK_CLASS_EP0_TxSent (void *pdev)
 
static uint8_t PIOS_USBHOOK_CLASS_EP0_RxReady (void *pdev)
 
static uint8_t PIOS_USBHOOK_CLASS_DataIn (void *pdev, uint8_t epnum)
 
static uint8_t PIOS_USBHOOK_CLASS_DataOut (void *pdev, uint8_t epnum)
 
static uint8_t PIOS_USBHOOK_CLASS_SOF (void *pdev)
 
static uint8_t PIOS_USBHOOK_CLASS_IsoINIncomplete (void *pdev)
 
static uint8_t PIOS_USBHOOK_CLASS_IsoOUTIncomplete (void *pdev)
 
static const uint8_t * PIOS_USBHOOK_CLASS_GetConfigDescriptor (uint8_t speed, uint16_t *length)
 

Variables

static struct
pios_usbhook_descriptor 
Device_Descriptor
 
static struct
pios_usbhook_descriptor 
String_Descriptor [4]
 
static struct
pios_usbhook_descriptor 
Config_Descriptor
 
static USB_OTG_CORE_HANDLE pios_usb_otg_core_handle
 
static USBD_Class_cb_TypeDef class_callbacks
 
static USBD_DEVICE device_callbacks
 
static USBD_Usr_cb_TypeDef user_callbacks
 
static struct usb_if_entry usb_if_table [3]
 
static struct usb_ep_entry usb_epin_table [6]
 
static struct usb_ep_entry usb_epout_table [6]
 
static struct usb_setup_request usb_ep0_active_req