usb_h_pipe_allocate

Allocate a pipe for the USB host communication.

static struct usb_h_pipe* usb_h_pipe_allocate(
    struct usb_h_desc * drv,
    uint8_t dev,
    uint8_t ep,
    uint16_t max_pkt_size,
    uint8_t attr,
    uint8_t interval,
    uint8_t speed,
    bool minimum_rsc
)

Parameters

drv

Type: struct usb_h_desc *

The USB HCD driver

dev

Type: uint8_t

The device address

ep

Type: uint8_t

The endpoint address

max_pkt_size

Type: uint16_t

The endpoint maximum packet size

attr

Type: uint8_t

The endpoint attribute

interval

Type: uint8_t

The endpoint interval (bInterval of USB Endpoint Descriptor)

speed

Type: uint8_t

The transfer speed of the endpoint

minimum_rsc

Type: bool

Minimum resource usage,

Returns

Type: struct usb_h_pipe *

Pointer to the allocated pipe structure instance

NULL

allocation fail