Skip to content

Hardware Profiles

c0smic edited this page Jun 20, 2026 · 1 revision

Hardware Profiles

The Cardputer ADV has GPIO headers that accept different hats. Instead of separate firmware builds for each hat, select the right profile in the menu:

Config -> Hardware Config -> Hardware Profile

Available Profiles

Profile Hardware CC1101 NRF24 LoRa
Stock Cardputer ADV Default pinout CS=1, GDO0=2 CS=1, CE=2 CS=5, RST=3, DIO0=4
Hydra RF 424/824/924 PingEqua hat CS=13, GDO0=5 CS=6, CE=4 CS=5, RST=3, DIO0=4
LoRa GPS Hat SX1262 + GPS CS=1, GDO0=2 CS=1, CE=2 CS=5, RST=3, DIO0=4

Adding a New Profile

Profiles are defined in src/core/menu_items/ConfigMenu.cpp. The structure is:

static const HWProfile PROFILES[] = {
    {
        "Your Hat Name",
        // CC1101:  {sck, miso, mosi, cs, io0}
        {(gpio_num_t)40, (gpio_num_t)39, (gpio_num_t)14, (gpio_num_t)X, (gpio_num_t)Y},
        // NRF24:   {sck, miso, mosi, cs, ce}
        {(gpio_num_t)40, (gpio_num_t)39, (gpio_num_t)14, (gpio_num_t)X, (gpio_num_t)Y},
        // LoRa:    {sck, miso, mosi, cs, rst, dio0}
        {(gpio_num_t)40, (gpio_num_t)39, (gpio_num_t)14, (gpio_num_t)5,  (gpio_num_t)3,  (gpio_num_t)4},
        // SDCard:  {sck, miso, mosi, cs}
        {(gpio_num_t)40, (gpio_num_t)39, (gpio_num_t)14, (gpio_num_t)12},
        // I2C:     {sda, scl}
        {(gpio_num_t)2,  (gpio_num_t)1},
        // UART:    {tx, rx}
        {(gpio_num_t)GPIO_NUM_NC, (gpio_num_t)GPIO_NUM_NC},
        // GPS:     {tx, rx}
        {(gpio_num_t)GPIO_NUM_NC, (gpio_num_t)GPIO_NUM_NC},
    },
};

The Cardputer ADV uses SPI bus: SCK=40, MISO=39, MOSI=14. Most hats share this bus and only differ on CS/IRQ pins.

Clone this wiki locally