---
title: SetLED
framework: hiddriverkit
role: symbol
role_heading: Instance Method
path: hiddriverkit/iohideventservice/setled
---

# SetLED

Configures the on/off state for an LED on the device.

## Declaration

```occ
virtual void SetLED(uint32_t usage, bool on);
```

## Parameters

- `usage`: The usage value that matches the LED you want to set. For a list of possible values, see doc://com.apple.hiddriverkit/documentation/HIDDriverKit/LEDs-enum.
- `on`: A Boolean value that indicates whether to turn the light on or off. Specify true to turn the light on or false to turn it off.
