---
title: EncodeRequest
framework: IOKit
role: symbol
role_heading: Macro
platforms: [Mac Catalyst 13.0+, macOS 10.0+]
path: iokit/encoderequest
---

# EncodeRequest

## Declaration

```occ
#define EncodeRequest(request, direction, type, recipient)
```

## Discussion

Macro that encodes the bRequest and bRequestType fields of a IOUSBDevRequest into a single value. It is useful when one needs to know what type of request the IOUSBDevRequest encodes and simplifies comparisons.

## See Also

### Miscellaneous

- [USBmakebmRequestType](usbmakebmrequesttype.md)
