HF-Core Platform 0.1.0-dev
Hardware-Agnostic Handler Layer & RTOS Utilities for HardFOC
Loading...
Searching...
No Matches
esp32_test_config.hpp File Reference

Centralized hardware pin and address configuration for hf-core tests. More...

#include <cstdint>
Include dependency graph for esp32_test_config.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PIN_I2C_SDA   8
 
#define PIN_I2C_SCL   9
 
#define I2C_PORT_NUM   0
 
#define I2C_CLOCK_HZ   400000
 
#define PIN_SPI_MOSI   11
 
#define PIN_SPI_MISO   13
 
#define PIN_SPI_SCLK   12
 
#define SPI_HOST_ID   1
 
#define PIN_AS5047U_CS   10
 
#define AS5047U_SPI_CLOCK_HZ   1000000
 
#define BNO08X_I2C_ADDR   0x4A
 
#define PIN_BNO08X_INT   4
 
#define PIN_BNO08X_RST   5
 
#define PCA9685_I2C_ADDR   0x40
 
#define PCAL95555_I2C_ADDR   0x20
 
#define PIN_PCAL95555_INT   6
 
#define NTC_ADC_CHANNEL   0
 
#define NTC_ADC_UNIT   0
 
#define PIN_TMC9660_CS   15
 
#define PIN_TMC9660_RST   16
 
#define PIN_TMC9660_DRV_EN   17
 
#define PIN_TMC9660_FAULTN   18
 
#define PIN_TMC9660_WAKE   21
 
#define TMC9660_DEVICE_ADDR   1
 
#define TMC9660_SPI_CLOCK_HZ   4000000
 
#define PIN_TMC5160_CS   37
 
#define PIN_TMC5160_DRV_ENN   38
 
#define PIN_TMC5160_DIAG0   39
 
#define PIN_TMC5160_DIAG1   40
 
#define TMC5160_SPI_CLOCK_HZ   4000000
 
#define PIN_TLE92466ED_CS   41
 
#define PIN_TLE92466ED_RESN   42
 
#define PIN_TLE92466ED_EN   2
 
#define PIN_TLE92466ED_FAULTN   1
 
#define TLE92466ED_SPI_CLOCK_HZ   5000000
 
#define PIN_MAX22200_CS   36
 
#define PIN_MAX22200_ENABLE   35
 
#define PIN_MAX22200_CMD   45
 
#define PIN_MAX22200_FAULT   48
 
#define MAX22200_SPI_CLOCK_HZ   5000000
 
#define PIN_WS2812_DATA   48
 
#define WS2812_NUM_LEDS   8
 
#define WS2812_RMT_CHANNEL   0
 

Detailed Description

Centralized hardware pin and address configuration for hf-core tests.

All pin assignments, I2C addresses, SPI configurations, and ADC channels are defined here. Modify this single file to match your hardware setup.

Default pin assignments target the HardFOC Vortex v1 board with an ESP32-S3 module. Override any pin at compile time with -D flags: -D PIN_I2C_SDA=21 -D PIN_I2C_SCL=22

Author
HardFOC Team
Date
2025-2026

Macro Definition Documentation

◆ AS5047U_SPI_CLOCK_HZ

#define AS5047U_SPI_CLOCK_HZ   1000000

◆ BNO08X_I2C_ADDR

#define BNO08X_I2C_ADDR   0x4A

◆ I2C_CLOCK_HZ

#define I2C_CLOCK_HZ   400000

◆ I2C_PORT_NUM

#define I2C_PORT_NUM   0

◆ MAX22200_SPI_CLOCK_HZ

#define MAX22200_SPI_CLOCK_HZ   5000000

◆ NTC_ADC_CHANNEL

#define NTC_ADC_CHANNEL   0

◆ NTC_ADC_UNIT

#define NTC_ADC_UNIT   0

◆ PCA9685_I2C_ADDR

#define PCA9685_I2C_ADDR   0x40

◆ PCAL95555_I2C_ADDR

#define PCAL95555_I2C_ADDR   0x20

◆ PIN_AS5047U_CS

#define PIN_AS5047U_CS   10

◆ PIN_BNO08X_INT

#define PIN_BNO08X_INT   4

◆ PIN_BNO08X_RST

#define PIN_BNO08X_RST   5

◆ PIN_I2C_SCL

#define PIN_I2C_SCL   9

◆ PIN_I2C_SDA

#define PIN_I2C_SDA   8

◆ PIN_MAX22200_CMD

#define PIN_MAX22200_CMD   45

◆ PIN_MAX22200_CS

#define PIN_MAX22200_CS   36

◆ PIN_MAX22200_ENABLE

#define PIN_MAX22200_ENABLE   35

◆ PIN_MAX22200_FAULT

#define PIN_MAX22200_FAULT   48

◆ PIN_PCAL95555_INT

#define PIN_PCAL95555_INT   6

◆ PIN_SPI_MISO

#define PIN_SPI_MISO   13

◆ PIN_SPI_MOSI

#define PIN_SPI_MOSI   11

◆ PIN_SPI_SCLK

#define PIN_SPI_SCLK   12

◆ PIN_TLE92466ED_CS

#define PIN_TLE92466ED_CS   41

◆ PIN_TLE92466ED_EN

#define PIN_TLE92466ED_EN   2

◆ PIN_TLE92466ED_FAULTN

#define PIN_TLE92466ED_FAULTN   1

◆ PIN_TLE92466ED_RESN

#define PIN_TLE92466ED_RESN   42

◆ PIN_TMC5160_CS

#define PIN_TMC5160_CS   37

◆ PIN_TMC5160_DIAG0

#define PIN_TMC5160_DIAG0   39

◆ PIN_TMC5160_DIAG1

#define PIN_TMC5160_DIAG1   40

◆ PIN_TMC5160_DRV_ENN

#define PIN_TMC5160_DRV_ENN   38

◆ PIN_TMC9660_CS

#define PIN_TMC9660_CS   15

◆ PIN_TMC9660_DRV_EN

#define PIN_TMC9660_DRV_EN   17

◆ PIN_TMC9660_FAULTN

#define PIN_TMC9660_FAULTN   18

◆ PIN_TMC9660_RST

#define PIN_TMC9660_RST   16

◆ PIN_TMC9660_WAKE

#define PIN_TMC9660_WAKE   21

◆ PIN_WS2812_DATA

#define PIN_WS2812_DATA   48

◆ SPI_HOST_ID

#define SPI_HOST_ID   1

◆ TLE92466ED_SPI_CLOCK_HZ

#define TLE92466ED_SPI_CLOCK_HZ   5000000

◆ TMC5160_SPI_CLOCK_HZ

#define TMC5160_SPI_CLOCK_HZ   4000000

◆ TMC9660_DEVICE_ADDR

#define TMC9660_DEVICE_ADDR   1

◆ TMC9660_SPI_CLOCK_HZ

#define TMC9660_SPI_CLOCK_HZ   4000000

◆ WS2812_NUM_LEDS

#define WS2812_NUM_LEDS   8

◆ WS2812_RMT_CHANNEL

#define WS2812_RMT_CHANNEL   0