Instruction manual
Renesas USB MCU and USB ASSP USB Basic Host and Peripheral firmware
R01AN0512EJ0210 Rev.2.10 Page 140 of 157
Apr 1, 2013
R_usb_cstd_RecMsg
Checks if an execution request was issued.
Format
USB_ER_t R_usb_cstd_RecMsg(uint8_t id, USB_MSG_t** mess, USB_TM_t tm)
Argument
id Task ID of received message
*mess Received message
tm Not Used
Return Value
USB_E_OK There is request processing
USB_E_ERROR Task ID is not set
Description
This function checks if the processing request corresponding to the ID specified in the 1
st
argument is in the priority
table.
The function is defined in the R_USB_RCV_MSG/ R_USB_TRCV_MSG macro.
Note
Please call the sceduler macro that this function is defined from the user application or the class driver
Example
void usb_smp_task()
{
USB_UTR_t *mess;
USB_ER_t err;
:
/* Checking the message */
err = R_USB_RCV_MSG(USB_SMP_MBX, (USB_MSG_t**)&mess);
if(err == USB_OK)
{
/* Processing corresponding to the received message */
}
:
}