USB On The Go (OTG) Management
[USB - LUFA/Drivers/USB/USB.h]


Defines

#define USB_OTG_SRP_VBUS   (1 << SRPSEL)
#define USB_OTG_STP_DATA   0

Functions

static void USB_OTG_Device_RequestHNP (void)
static void USB_OTG_Device_CancelHNPRequest (void)
static bool USB_OTG_Device_IsSendingHNP (void)
static void USB_OTG_Host_AcceptHNP (void)
static void USB_OTG_Host_RejectHNP (void)
static bool USB_OTG_Host_IsHNPReceived (void)
static void USB_OTG_Dev_InitiateSRP (uint8_t SRPTypeMask)

Detailed Description

This module contains macros for embedded USB hosts with dual role On The Go capabilities, for managing role exchange. OTG is a way for two USB dual role devices to talk to one another directly without fixed device/host roles.

Define Documentation

#define USB_OTG_SRP_VBUS   (1 << SRPSEL)

Mask for the VBUS pulsing method of SRP, supported by some OTG devices.

See also:
USB_OTG_DEV_Initiate_SRP()

#define USB_OTG_STP_DATA   0

Mask for the Data + pulsing method of SRP, supported by some OTG devices.

See also:
USB_OTG_DEV_Initiate_SRP()


Function Documentation

static void USB_OTG_Dev_InitiateSRP ( uint8_t  SRPTypeMask  )  [inline, static]

Initiates a Session Request Protocol request. Most OTG devices turn off VBUS when the USB interface is not in use, to conserve power. Sending a SRP to a USB OTG device running in host mode indicates that VBUS should be applied and a session started.

There are two different methods of sending a SRP - either pulses on the VBUS line, or by pulsing the Data + line via the internal pull-up resistor.

Parameters:
SRPTypeMask Mask indicating the type of SRP to use, either USB_OTG_SRP_VBUS or USB_OTG_STP_DATA.

static void USB_OTG_Device_CancelHNPRequest ( void   )  [inline, static]

Cancel a Host Negotiation Protocol request. This stops a pending HNP request to the other connected device.

static bool USB_OTG_Device_IsSendingHNP ( void   )  [inline, static]

Determines if the device is currently sending a HNP to an attached host.

Returns:
Boolean true if currently sending a HNP to the other connected device, false otherwise

static void USB_OTG_Device_RequestHNP ( void   )  [inline, static]

Initiate a Host Negotiation Protocol request. This indicates to the other connected device that the device wishes to change device/host roles.

static void USB_OTG_Host_AcceptHNP ( void   )  [inline, static]

Accepts a HNP from a connected device, indicating that both devices should exchange device/host roles.

static bool USB_OTG_Host_IsHNPReceived ( void   )  [inline, static]

Indicates if the connected device is not currently sending a HNP request.

Returns:
Boolean true if a HNP is currently being issued by the connected device, false otherwise.

static void USB_OTG_Host_RejectHNP ( void   )  [inline, static]

Rejects a HNP from a connected device, indicating that both devices should remain in their current device/host roles.


Generated on Fri Jun 5 16:30:20 2009 for LUFA Library by  doxygen 1.5.7.1