PebbleOS v4.47.0-757-g12b6c531f
Loading...
Searching...
No Matches
pbl_udc_ops Struct Reference

Driver operations. More...

#include <udc.h>

Data Fields

int(* init )(const struct pbl_udc *udc)
 Bring the controller up, disconnected.
 
int(* enable )(const struct pbl_udc *udc)
 Connect to the bus.
 
int(* disable )(const struct pbl_udc *udc)
 Disconnect from the bus.
 
enum pbl_udc_speed(* speed )(const struct pbl_udc *udc)
 The speed the bus runs at, once enumerated.
 
int(* set_address )(const struct pbl_udc *udc, uint8_t addr)
 Take the address the host gave.
 
int(* ep_enable )(const struct pbl_udc *udc, uint8_t ep, enum pbl_udc_ep_type type, uint16_t mps)
 Set an endpoint up.
 
int(* ep_disable )(const struct pbl_udc *udc, uint8_t ep)
 Shut an endpoint down, ending its transfer with -ECONNABORTED.
 
int(* ep_set_halt )(const struct pbl_udc *udc, uint8_t ep, bool halt)
 Stall an endpoint, or clear its stall and its data toggle.
 
int(* ep_queue )(const struct pbl_udc *udc, uint8_t ep, void *buf, size_t len)
 Start a transfer.
 

Detailed Description

Driver operations.

Field Documentation

◆ disable

int(* pbl_udc_ops::disable) (const struct pbl_udc *udc)

Disconnect from the bus.

Returns 0 or a negative errno.

◆ enable

int(* pbl_udc_ops::enable) (const struct pbl_udc *udc)

Connect to the bus.

Returns 0 or a negative errno.

◆ ep_disable

int(* pbl_udc_ops::ep_disable) (const struct pbl_udc *udc, uint8_t ep)

Shut an endpoint down, ending its transfer with -ECONNABORTED.

◆ ep_enable

int(* pbl_udc_ops::ep_enable) (const struct pbl_udc *udc, uint8_t ep, enum pbl_udc_ep_type type, uint16_t mps)

Set an endpoint up.

Returns 0 or a negative errno.

◆ ep_queue

int(* pbl_udc_ops::ep_queue) (const struct pbl_udc *udc, uint8_t ep, void *buf, size_t len)

Start a transfer.

Returns 0, -EBUSY if one is under way, or another negative errno.

◆ ep_set_halt

int(* pbl_udc_ops::ep_set_halt) (const struct pbl_udc *udc, uint8_t ep, bool halt)

Stall an endpoint, or clear its stall and its data toggle.

◆ init

int(* pbl_udc_ops::init) (const struct pbl_udc *udc)

Bring the controller up, disconnected.

Returns 0 or a negative errno.

◆ set_address

int(* pbl_udc_ops::set_address) (const struct pbl_udc *udc, uint8_t addr)

Take the address the host gave.

Returns 0 or a negative errno.

◆ speed

enum pbl_udc_speed(* pbl_udc_ops::speed) (const struct pbl_udc *udc)

The speed the bus runs at, once enumerated.


The documentation for this struct was generated from the following file: