> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Add and manage peripherals

> Add the parts on your board to a project so Inlay can use their datasheets, then review or remove them.

Add peripherals so Inlay can use the datasheets for the parts on your board. Do this before you ask for a driver, a pin assignment, or a hardware test.

Adding a part only updates the project's context. Inlay doesn't change firmware until you ask for code.

## Add a catalog part

`/peripheral` is available once you select a project with `/project`.

In VS Code:

1. Run `/peripheral`, or choose **Open project peripherals** in the chat header.
2. In **Peripherals**, choose **Add peripherals**.
3. Search for the part by part number, manufacturer, or kind. You can also narrow the list by category.
4. Select each part fitted to your board. Selected parts collect in the shortlist.
5. Choose **Add**, which shows the count, such as **Add 2 peripherals**.

When you create a project from a platform, **What is on your board?** offers the same choice before the project is created.

In the terminal UI:

1. Run `/peripheral` to open the **Project Peripherals** list.
2. Type to filter the list by name, manufacturer, or description.
3. Press `Space` to select each part fitted to your board. Selected parts appear under **New choices**.
4. Press `Enter` to add them.

If the project has schematics or documents, Inlay suggests parts it found in them. In VS Code, they're listed under **Suggested for this project**. Check each suggestion against the schematic and board revision before you add them.

Parts already on the project are marked **On this project** in VS Code, or listed under **Already chosen** in the terminal UI, and can't be added twice. When several entries share a name, compare the manufacturer and description to pick the right one.

### Add a part from chat

In Act or Debug mode, you can also name the part in chat:

```text theme={"theme":"css-variables"}
Add the ADS131M04 to this project, then check its documentation for the SPI
mode and startup sequence. Do not change firmware yet.
```

If Inlay finds an exact catalog match, it adds the part. It asks for your approval first only in **Always ask** mode. If several catalog parts match, it lists them and asks which one you mean. If the part isn't in the catalog, Inlay tells you, and you can add it as a custom peripheral. Use the picker when a part name is ambiguous.

## Add a custom peripheral

Use a custom peripheral for a part that isn't in the catalog. You need its datasheet as a PDF. Name the peripheral with the exact part number so it matches your schematic and BOM.

For a part that comes from an uploaded schematic, you don't need the PDF. In VS Code, choose **Inlay finds it** in [Review parts](/docs/core-concepts/schematics.md#review-parts), and Inlay searches for the datasheet. Run `/datasheets` to check its progress.

In VS Code:

1. In **Add peripherals**, choose **Custom peripheral**.
2. Choose **+ Browse PDF files** and select the datasheets.
3. Check the name next to each file. It defaults to the file name.
4. Choose **Create peripherals**.

Each PDF you select in VS Code creates a separate peripheral.

In the terminal UI:

1. In **Project Peripherals**, choose **+ Add a peripheral**. If you've typed a search, the row reads `+ Add "<your search>"`.
2. Enter the part number as the name.
3. Under **Documentation & Schematics**, add one or more PDFs.
4. Press `Enter` to upload the files and add the peripheral.

The terminal UI form can attach several PDFs, such as a datasheet and its errata, to one part. Use it when a part needs more than one document.

### Add a custom peripheral from chat

If the datasheet is already in your workspace, name both the file and the part:

```text theme={"theme":"css-variables"}
Add @datasheets/OBSCURE123.pdf as the custom peripheral OBSCURE123.
```

Inlay asks you to confirm before it uploads the file, in every approval mode. If you mention a datasheet without asking for a peripheral, Inlay can read it, but the part doesn't appear in your peripheral list.

## Review or remove parts

In VS Code, run `/peripheral` to open **Peripherals**. It lists each part on the project with its manufacturer, category, and linked datasheets.

* To read a datasheet, select it. A PDF opens in a preview beside the list.
* To remove a part, select the trash icon on its row, then choose **Remove**. VS Code confirms with **Removed peripheral from project**.

In the terminal UI, `/peripheral` names the parts already on the project under **Already chosen**. Use VS Code to open datasheets or remove parts.

Removing a peripheral removes it from the project context only. Its firmware driver stays in your code, so ask separately for any cleanup.

## Verify before implementation

Before Inlay writes a driver, ask it to check the parts against your code and design:

```text theme={"theme":"css-variables"}
List the active platform and peripherals. Compare the BME280 I2C address and
pin mapping with @src/board/sensors.c and the schematic. Report discrepancies
before editing the driver.
```

For board-level connections, use [schematic references](/docs/core-concepts/schematics.md#reference-schematic-entities). To find a part by category, browse [supported peripherals](/docs/supported-hardware/overview.md#find-a-peripheral).

Then follow [Driver development](/docs/solutions/driver-development.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.