You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

8.2 KiB

group udd_group

The UDD driver provides a low-level abstraction of the device controller hardware. Most events coming from the hardware such as interrupts, which may cause the UDD to call into the UDC and UDI.

Summary

Members Descriptions
define Udd_setup_is_in Return true if the setup request udd_g_ctrlreq indicates IN data transfer.
define Udd_setup_is_out Return true if the setup request udd_g_ctrlreq indicates OUT data transfer.
define Udd_setup_type Return the type of the SETUP request udd_g_ctrlreq.
define Udd_setup_recipient Return the recipient of the SETUP request udd_g_ctrlreq.
enum udd_ep_status_t Endpoint transfer status Returned in parameters of callback register via udd_ep_run routine.
public bool udd_include_vbus_monitoring(void) Authorizes the VBUS event.
public void udd_enable(void) Enables the USB Device mode.
public void udd_disable(void) Disables the USB Device mode.
public void udd_attach(void) Attach device to the bus when possible.
public void udd_detach(void) Detaches the device from the bus.
public bool udd_is_high_speed(void) Test whether the USB Device Controller is running at high speed or not.
public void udd_set_address(uint8_t address) Changes the USB address of device.
public uint8_t udd_getaddress(void) Returns the USB address of device.
public uint16_t udd_get_frame_number(void) Returns the current start of frame number.
public uint16_t udd_get_micro_frame_number(void) Returns the current micro start of frame number.
public void udd_send_remotewakeup(void) The USB driver sends a resume signal called Upstream Resume.
public void udd_set_setup_payload(uint8_t * payload,uint16_t payload_size) Load setup payload.
struct udd_ctrl_request_t Global variable to give and record information of the setup request management.

Members

define Udd_setup_is_in

Return true if the setup request udd_g_ctrlreq indicates IN data transfer.

define Udd_setup_is_out

Return true if the setup request udd_g_ctrlreq indicates OUT data transfer.

define Udd_setup_type

Return the type of the SETUP request udd_g_ctrlreq.

See also: usb_reqtype.

define Udd_setup_recipient

Return the recipient of the SETUP request udd_g_ctrlreq.

See also: usb_recipient

enum udd_ep_status_t

Values Descriptions
UDD_EP_TRANSFER_OK
UDD_EP_TRANSFER_ABORT

Endpoint transfer status Returned in parameters of callback register via udd_ep_run routine.

public bool udd_include_vbus_monitoring(void)

Authorizes the VBUS event.

Returns

true, if the VBUS monitoring is possible.

public void udd_enable(void)

Enables the USB Device mode.

public void udd_disable(void)

Disables the USB Device mode.

public void udd_attach(void)

Attach device to the bus when possible.

If a VBus control is included in driver, then it will attach device when an acceptable Vbus level from the host is detected.

public void udd_detach(void)

Detaches the device from the bus.

The driver must remove pull-up on USB line D- or D+.

public bool udd_is_high_speed(void)

Test whether the USB Device Controller is running at high speed or not.

Returns

true if the Device is running at high speed mode, otherwise false.

public void udd_set_address(uint8_t address)

Changes the USB address of device.

Parameters

  • address New USB address

public uint8_t udd_getaddress(void)

Returns the USB address of device.

Returns

USB address

public uint16_t udd_get_frame_number(void)

Returns the current start of frame number.

Returns

current start of frame number.

public uint16_t udd_get_micro_frame_number(void)

Returns the current micro start of frame number.

Returns

current micro start of frame number required in high speed mode.

public void udd_send_remotewakeup(void)

The USB driver sends a resume signal called Upstream Resume.

public void udd_set_setup_payload(uint8_t * payload,uint16_t payload_size)

Load setup payload.

Parameters

  • payload Pointer on payload

  • payload_size Size of payload

struct udd_ctrl_request_t

Global variable to give and record information of the setup request management.

This global variable allows to decode and response a setup request. It can be updated by udc_process_setup() from UDC or *setup() from UDIs.

Summary

Members Descriptions

Members