Instruction manual
Renesas USB MCU and USB ASSP USB Basic Host and Peripheral firmware
R01AN0512EJ0210 Rev.2.10 Page 24 of 157
Apr 1, 2013
Example
int16_t usb_smp_fn;
void usb_apl_task()
{
:
/* Set data receive complete notification call-back */
control(usb_smp_fn, USB_CTL_RD_NOTIFY_SET, (void*)&usb_ smp_Read_Notify);
/* receiving data request */
read(usb_smp_fn, (uint8_t *)buf, (int32_t)size);
/* receiving request status check */
err = control(usb_spvendor_bulk_fn, USB_CTL_GET_READ_STATE, (void*)&state);
if(err != USB_CTL_ERR_PROCESS_COMPLETE)
{
/* Error Processing */
}
:
}