if( (SETUP.bmRequestType & ~0x80) == DSC_HID)
{
switch (SETUP.bRequest)
{
case GET_REPORT:
Get_Report ();
break;
case SET_REPORT:
Set_Report ();
break;
case GET_IDLE:
Get_Idle ();
break;
case SET_IDLE:
Set_Idle ();
break;
case GET_PROTOCOL:
Get_Protocol ();
break;
case SET_PROTOCOL:
Set_Protocol ();
break;
default:
Force_Stall (); // Send stall to host if invalid
break; // request
}
}
aWYoIChTRVRVUC5ibVJlcXVlc3RUeXBlICYgfjB4ODApID09IERTQ19ISUQpCnsKICAgIHN3aXRjaCAoU0VUVVAuYlJlcXVlc3QpCiAgICB7CiAgICBjYXNlIEdFVF9SRVBPUlQ6CiAgICAgICAgR2V0X1JlcG9ydCAoKTsKICAgICAgICBicmVhazsKICAgIGNhc2UgU0VUX1JFUE9SVDoKICAgICAgICBTZXRfUmVwb3J0ICgpOwogICAgICAgIGJyZWFrOwogICAgY2FzZSBHRVRfSURMRToKICAgICAgICBHZXRfSWRsZSAoKTsKICAgICAgICBicmVhazsKICAgIGNhc2UgU0VUX0lETEU6CiAgICAgICAgU2V0X0lkbGUgKCk7CiAgICAgICAgYnJlYWs7CiAgICBjYXNlIEdFVF9QUk9UT0NPTDoKICAgICAgICBHZXRfUHJvdG9jb2wgKCk7CiAgICAgICAgYnJlYWs7CiAgICBjYXNlIFNFVF9QUk9UT0NPTDoKICAgICAgICBTZXRfUHJvdG9jb2wgKCk7CiAgICAgICAgYnJlYWs7CiAgICBkZWZhdWx0OgogICAgICAgIEZvcmNlX1N0YWxsICgpOyAgICAgIC8vIFNlbmQgc3RhbGwgdG8gaG9zdCBpZiBpbnZhbGlkCiAgICAgICAgYnJlYWs7ICAgICAgICAgICAgICAgICAvLyByZXF1ZXN0CiAgICB9Cn0=