Instruction manual
Renesas USB MCU and USB ASSP USB Basic Host and Peripheral firmware
R01AN0512EJ0210 Rev.2.10 Page 99 of 157
Apr 1, 2013
R_usb_hstd_MgrChangeDeviceState
Connected device state change request
Format
USB_ER_t R_usb_hstd_MgrChangeDeviceState (USB_UTR_t *ptr,
USB_CB_t complete,
uint16_t msginfo,
uint16_t devaddr)
Argument
*ptr Pointer to a USB Transfer Structure
complete Call-back function
msginfo Message information
devaddr Device address
Return Value
[non-OS]
USB_E_OK Success
USB_E_ERROR Failure
[RTOS]
- Error code. Please refer to RI600/4 User's manual for RX family Real-time OS.
Description
Setting the following values in msginfo and calling this API will send a request to HCD or HUBCD to change the
state of the connected USB device.
msginfo Outline
USB_GO_POWEREDSTATE
Request for transition from connected state to
disconnected state
USB_DO_RESET_AND_ENUMERATION
Request for transition from connected state to
communication initialized connected state.
(issue USB reset and request enumeration execution)
USB_PORT_ENABLE VBUS supply start request
USB_PORT_DISABLE VBUS shutdown request
USB_DO_GLOBAL_SUSPEND
Request for transition to suspended state with remote
wakeup enabled
USB_DO_GLOBAL_RESUME
Global resume execution request (request transition
from suspend state to state preceding suspend)
USB_DO_SELECTIVE_RESUME
Selective resume execution request (request transition
from suspend state to state preceding suspend)
Note
1. Besides above arguments, also set the following members of the USB Transfer Structure before calling the
function.
USB_REGADR_t ipp :USB register base address
uint16_t ip :USB IP number
2. Call this function from the user application or class driver.
3. This function is not necessary when using an ANSI IO API.