Skip to content

File usbd_core.c

FileList > fw > rbcx-coprocessor > lib > libusb_stm32 > src > usbd_core.c

Go to the source code of this file.

  • #include <stdint.h>
  • #include <stdbool.h>
  • #include "usb.h"

Public Functions

Type Name
__attribute__ ((externally_visible))

Public Static Functions

Type Name
usbd_respond usbd_configure (usbd_device * dev, uint8_t config)
SET_CONFIG request processing.
void usbd_process_callback (usbd_device * dev)
Control transfer completion callback processing.
usbd_respond usbd_process_devrq (usbd_device * dev, usbd_ctlreq * req)
Standard control request processing for device.
void usbd_process_ep0 (usbd_device * dev, uint8_t event, uint8_t ep)
Control endpoint 0 event processing callback.
void usbd_process_eprx (usbd_device * dev, uint8_t ep)
Control endpoint RX event processing.
usbd_respond usbd_process_eptrq (usbd_device * dev, usbd_ctlreq * req)
Standard control request processing for endpoint.
void usbd_process_eptx (usbd_device * dev, uint8_t ep)
Control endpoint TX event processing.
void usbd_process_evt (usbd_device * dev, uint8_t evt, uint8_t ep)
General event processing callback.
usbd_respond usbd_process_intrq (usbd_device * dev, usbd_ctlreq * req)
Standard control request processing for interface.
usbd_respond usbd_process_request (usbd_device * dev, usbd_ctlreq * req)
Processing control request.
void usbd_process_reset (usbd_device * dev)
Resets USB device state.
void usbd_set_address (usbd_device * dev, usbd_ctlreq * req)
Callback that sets USB device address.
void usbd_stall_pid (usbd_device * dev, uint8_t ep)
Control endpoint stall (STALL PID)

Macros

Type Name
define _MIN (a, b) ((a) < (b)) ? (a) : (b)

Public Functions Documentation

function __attribute__

__attribute__ (
    (externally_visible)
) 

Public Static Functions Documentation

function usbd_configure

SET_CONFIG request processing.

static usbd_respond usbd_configure (
    usbd_device * dev,
    uint8_t config
) 

Parameters:

  • dev usbd_device
  • config config number from request

Returns:

usbd_ack if success

function usbd_process_callback

Control transfer completion callback processing.

static void usbd_process_callback (
    usbd_device * dev
) 

Parameters:

  • dev pointer to the usb device

Returns:

none

function usbd_process_devrq

Standard control request processing for device.

static usbd_respond usbd_process_devrq (
    usbd_device * dev,
    usbd_ctlreq * req
) 

Parameters:

  • dev pointer to usb device
  • req pointer to control request

Returns:

TRUE if request is handled

function usbd_process_ep0

Control endpoint 0 event processing callback.

static void usbd_process_ep0 (
    usbd_device * dev,
    uint8_t event,
    uint8_t ep
) 

Parameters:

  • dev usb device
  • event endpoint event

function usbd_process_eprx

Control endpoint RX event processing.

static void usbd_process_eprx (
    usbd_device * dev,
    uint8_t ep
) 

Parameters:

  • dev pointer to usb device
  • ep endpoint number

function usbd_process_eptrq

Standard control request processing for endpoint.

static usbd_respond usbd_process_eptrq (
    usbd_device * dev,
    usbd_ctlreq * req
) 

Parameters:

  • dev pointer to usb device
  • req pointer to control request

Returns:

TRUE if request is handled

function usbd_process_eptx

Control endpoint TX event processing.

static void usbd_process_eptx (
    usbd_device * dev,
    uint8_t ep
) 

Parameters:

  • dev pointer to usb device
  • ep endpoint number

function usbd_process_evt

General event processing callback.

static void usbd_process_evt (
    usbd_device * dev,
    uint8_t evt,
    uint8_t ep
) 

Parameters:

  • dev usb device
  • evt usb event
  • ep active endpoint

function usbd_process_intrq

Standard control request processing for interface.

static usbd_respond usbd_process_intrq (
    usbd_device * dev,
    usbd_ctlreq * req
) 

Parameters:

  • dev pointer to usb device
  • req pointer to control request

Returns:

TRUE if request is handled

function usbd_process_request

Processing control request.

static usbd_respond usbd_process_request (
    usbd_device * dev,
    usbd_ctlreq * req
) 

Parameters:

  • dev pointer to usb device
  • req pointer to usb control request

Returns:

TRUE if request is handled

function usbd_process_reset

Resets USB device state.

static void usbd_process_reset (
    usbd_device * dev
) 

Parameters:

  • dev pointer to usb device

Returns:

none

function usbd_set_address

Callback that sets USB device address.

static void usbd_set_address (
    usbd_device * dev,
    usbd_ctlreq * req
) 

Parameters:

  • dev pointer to usb device
  • req pointer to usb control request data

Returns:

none

function usbd_stall_pid

Control endpoint stall (STALL PID)

static void usbd_stall_pid (
    usbd_device * dev,
    uint8_t ep
) 

Parameters:

  • dev pointer to usb device
  • ep endpoint number

Macro Definition Documentation

define _MIN

#define _MIN (
    a,
    b
) ((a) < (b)) ? (a) : (b)

The documentation for this class was generated from the following file fw/rbcx-coprocessor/lib/libusb_stm32/src/usbd_core.c