ChibiOS/HAL  6.1.0
USBDriver Struct Reference

Structure representing an USB driver. More...

#include <hal_usb_lld.h>

Collaboration diagram for USBDriver:
Collaboration graph

Data Fields

usbstate_t state
 Driver state. More...
 
const USBConfigconfig
 Current configuration data. More...
 
uint16_t transmitting
 Bit map of the transmitting IN endpoints. More...
 
uint16_t receiving
 Bit map of the receiving OUT endpoints. More...
 
const USBEndpointConfigepc [USB_MAX_ENDPOINTS+1]
 Active endpoints configurations. More...
 
void * in_params [USB_MAX_ENDPOINTS]
 Fields available to user, it can be used to associate an application-defined handler to an IN endpoint. More...
 
void * out_params [USB_MAX_ENDPOINTS]
 Fields available to user, it can be used to associate an application-defined handler to an OUT endpoint. More...
 
usbep0state_t ep0state
 Endpoint 0 state. More...
 
uint8_t * ep0next
 Next position in the buffer to be transferred through endpoint 0. More...
 
size_t ep0n
 Number of bytes yet to be transferred through endpoint 0. More...
 
usbcallback_t ep0endcb
 Endpoint 0 end transaction callback. More...
 
uint8_t setup [8]
 Setup packet buffer. More...
 
uint16_t status
 Current USB device status. More...
 
uint8_t address
 Assigned USB address. More...
 
uint8_t configuration
 Current USB device configuration. More...
 
usbstate_t saved_state
 State of the driver when a suspend happened. More...
 

Detailed Description

Structure representing an USB driver.

Definition at line 217 of file hal_usb_lld.h.

Field Documentation

const USBConfig* USBDriver::config

Current configuration data.

Definition at line 225 of file hal_usb_lld.h.

Referenced by _usb_ep0setup(), default_handler(), usbObjectInit(), usbStart(), and usbStop().

uint16_t USBDriver::transmitting

Bit map of the transmitting IN endpoints.

Definition at line 229 of file hal_usb_lld.h.

Referenced by _usb_reset(), usbDisableEndpointsI(), usbObjectInit(), and usbStartTransmitI().

uint16_t USBDriver::receiving

Bit map of the receiving OUT endpoints.

Definition at line 233 of file hal_usb_lld.h.

Referenced by _usb_reset(), usbDisableEndpointsI(), usbObjectInit(), and usbStartReceiveI().

void* USBDriver::in_params[USB_MAX_ENDPOINTS]

Fields available to user, it can be used to associate an application-defined handler to an IN endpoint.

Note
The base index is one, the endpoint zero does not have a reserved element in this array.

Definition at line 244 of file hal_usb_lld.h.

Referenced by sduDataTransmitted(), sduStart(), sduStop(), and usbObjectInit().

void* USBDriver::out_params[USB_MAX_ENDPOINTS]

Fields available to user, it can be used to associate an application-defined handler to an OUT endpoint.

Note
The base index is one, the endpoint zero does not have a reserved element in this array.

Definition at line 251 of file hal_usb_lld.h.

Referenced by sduDataReceived(), sduStart(), sduStop(), and usbObjectInit().

usbep0state_t USBDriver::ep0state

Endpoint 0 state.

Definition at line 255 of file hal_usb_lld.h.

Referenced by _usb_ep0in(), _usb_ep0out(), _usb_ep0setup(), and _usb_reset().

uint8_t* USBDriver::ep0next

Next position in the buffer to be transferred through endpoint 0.

Definition at line 259 of file hal_usb_lld.h.

Referenced by _usb_ep0setup().

size_t USBDriver::ep0n

Number of bytes yet to be transferred through endpoint 0.

Definition at line 263 of file hal_usb_lld.h.

Referenced by _usb_ep0in(), and _usb_ep0setup().

usbcallback_t USBDriver::ep0endcb

Endpoint 0 end transaction callback.

Definition at line 267 of file hal_usb_lld.h.

Referenced by _usb_ep0in(), and _usb_ep0out().

uint8_t USBDriver::setup[8]

Setup packet buffer.

Definition at line 271 of file hal_usb_lld.h.

Referenced by _usb_ep0in(), _usb_ep0setup(), default_handler(), sduDataTransmitted(), sduRequestsHook(), and set_address().

uint16_t USBDriver::status

Current USB device status.

Definition at line 275 of file hal_usb_lld.h.

Referenced by _usb_reset(), and default_handler().

uint8_t USBDriver::address

Assigned USB address.

Definition at line 279 of file hal_usb_lld.h.

Referenced by _usb_reset(), and set_address().

uint8_t USBDriver::configuration

Current USB device configuration.

Definition at line 283 of file hal_usb_lld.h.

Referenced by _usb_reset(), and default_handler().

usbstate_t USBDriver::saved_state

State of the driver when a suspend happened.

Definition at line 287 of file hal_usb_lld.h.

Referenced by _usb_suspend(), and _usb_wakeup().