unsigned char USBGenericRequest_GetRecipient(const USBGenericRequest *request) { // Recipient is in bits [0..4] of the bmRequestType field return request->bmRequestType & 0xF; }