Instruction manual
Renesas USB MCU and USB ASSP USB Basic Host and Peripheral firmware
R01AN0512EJ0210 Rev.2.10 Page 42 of 157
Apr 1, 2013
R_usb_pstd_ControlWrite
FIFO access request for control write transfer
Format
void R_usb_pstd_ControlWrite (USB_UTR_t *ptr, uint32_t bsize, uint8_t *table)
Argument
*ptr Pointer to a USB transfer structure containing pipe number etc
bsize Receive data buffer size for control write transfer
*table Receive data buffer address for control write transfer
Return Value
- -
Description
During a control transfer data stage, this function issues a FIFO access execution request to PCD.
PCD reads data from the FIFO buffer of the hardware and writes it to the area referenced by the argument table.
Note
1. Besides above arguments, also set the following members of the USB Transfer Structure.
USB_REGADR_t ipp :USB register base address
uint16_t ip :USB IP number
2. Please call this function at the control OUT transfer data stage. Please refer to
4.4 Peripheral Control
Transfer.
Example
uint8_t usb_smp_buf;
void usb_smp_task(USB_UTR_t *ptr)
{
:
R_usb_pstd_ControlWrite(ptr, (uint32_t)1, (uint8_t*)(& usb_smp_buf));
:
}