Instruction manual

Renesas USB MCU and USB ASSP USB Basic Host and Peripheral firmware
R01AN0512EJ0210 Rev.2.10 Page 94 of 157
Apr 1, 2013
R_usb_hstd_DeviceInformation
Request device information for connected peripheral
Format
void R_usb_hstd_DeviceInformation (USB_UTR_t *ptr, uint16_t devaddr, uint16_t *tbl)
Argument
*ptr Pointer to USB transfer structure
devaddr Device address
*tbl Pointer to the table address where acquired device information is stored
Return Value
Description
Information about the peripheral connected to the USB port is acquired.
The following information is stored in a device information table is shown below.
0Root port number to which device is connected
1Device state
2Configuration number
3Interface class code 1
4Connection speed
5Number of interfaces used
6Interface class code 2
7Interface class code 3
8Status of rootport0
9Status of rootport1
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. If this API is called in the state of other than Configured state, set 0(zero) to the argument “devaddr”. When
specifying 0 to the device address, the following information is returned.
(1). When there is not a device during enumeration.
table[0] = USB_NOPORT, table[1] = USB_STS_DETACH
(2). When there is a device during enumeration.
table[0] = Port number, table[1] = USB_STS_DEFAULT
4. As USB-BASIC-FW does not support multiple interfaces, [5], [6] and [7] above are not used.
5. Use a 20-byte area for argument *tbl.