CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
hw_config.h
Go to the documentation of this file.
1
#pragma once
2
3
// CDC Badge v1.0 Hardware Configuration
4
// All pin definitions in one place
5
6
#include "driver/gpio.h"
7
8
// === I2C Buses ===
9
// I2C0: Charging IC (BQ25895) + IO Expander (TCA9535)
10
#define I2C0_SDA_PIN GPIO_NUM_17
11
#define I2C0_SCL_PIN GPIO_NUM_18
12
13
// I2C1: Expansion header
14
#define I2C1_SDA_PIN GPIO_NUM_47
15
#define I2C1_SCL_PIN GPIO_NUM_48
16
17
// === IO Expander (TCA9535) ===
18
#define EXPANDER_ADDR 0x20
19
#define EXP_IRQ_PIN GPIO_NUM_1
20
21
// === Power / Charging (BQ25895) ===
22
#define BQ25895_ADDR 0x6A
23
#define CHG_DSEL_PIN GPIO_NUM_21
24
#define CHG_IRQ_PIN GPIO_NUM_39
25
26
// === Display (E-Paper GDEY029T94) ===
27
// Note: SPI pins configured via CalEPD Kconfig
28
#define EPD_LED_PIN GPIO_NUM_8
// Backlight/Frontlight
29
#define EPD_CS_PIN GPIO_NUM_41
30
#define EPD_DC_PIN GPIO_NUM_45
31
#define EPD_RST_PIN GPIO_NUM_46
32
#define EPD_BUSY_PIN GPIO_NUM_42
33
34
// === SPI Bus (shared: Display + TROPIC01) ===
35
#define SPI_SCLK_PIN GPIO_NUM_12
36
#define SPI_MISO_PIN GPIO_NUM_11
37
#define SPI_MOSI_PIN GPIO_NUM_13
38
39
// === TROPIC01 Secure Element ===
40
#define TR01_CS_PIN GPIO_NUM_10
41
42
// === Buttons ===
43
#define FLASH_BTN_PIN GPIO_NUM_0
// Flash/Power button
44
45
// === Expansion Ports ===
46
// SAO (Shitty Add-On) Port
47
#define SAO_GPIO1_PIN GPIO_NUM_15
48
#define SAO_GPIO2_PIN GPIO_NUM_16
49
#define SAO_EEPROM_ADDR 0x50
50
51
// Grove Port
52
#define GROVE_0_PIN GPIO_NUM_2
53
#define GROVE_1_PIN GPIO_NUM_3
components
cdc_hal
include
cdc_hal
hw_config.h
Generated by
1.16.1