Instruction manual
Renesas USB MCU and USB ASSP USB Basic Host and Peripheral firmware
R01AN0512EJ0210 Rev.2.10 Page 38 of 157
Apr 1, 2013
R_usb_pstd_DeviceInformation
Get a USB peripheral’s device state information
Format
void R_usb_pstd_DeviceInformation (USB_UTR_t *ptr, uint16_t *tbl)
Arguments
*ptr Pointer to a USB Transfer Structure
*tbl Pointer to the buffer that the device information is stored.
Return Value
- -
Description
This function gets USB peripherals device state information. It stores the following information at the address
designated by the argument “tbl”.
[0] : USB device state
[1] : USB transfer speed
[2] : Configuration number used
[3] : Interface number used
[4] : Remote Wakeup Flag
Note
1. Besides above arguments, also set the following members of the USB Transfer Structure before calling this
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.
Example
void usb_smp_task(USB_UTR_t *ptr)
{
uint16_t res[5];
:
/* Get USB Device Information */
R_usb_pstd_DeviceInformation(ptr, (uint16_t *)res);
:
}