#pragma once #include "driver/gpio.h" #include "driver/gptimer.h" #include "driver/spi_master.h" /* Board wiring: ESP32-H2 SuperMini, CC1101, SPI SSD1306, buttons, and LEDs. */ #define SPI_HOST_USED SPI2_HOST #define PIN_SPI_SCLK GPIO_NUM_4 #define PIN_SPI_MOSI GPIO_NUM_5 #define PIN_SPI_MISO GPIO_NUM_0 #define PIN_CC1101_CS GPIO_NUM_1 #define PIN_CC1101_GDO0 GPIO_NUM_3 #define PIN_OLED_CS GPIO_NUM_10 #define PIN_OLED_DC GPIO_NUM_11 #define PIN_OLED_RESET GPIO_NUM_12 #define PIN_BUTTON_BOOT GPIO_NUM_9 #define PIN_BUTTON_UP GPIO_NUM_6 #define PIN_BUTTON_DOWN GPIO_NUM_7 #define PIN_BUTTON_SELECT GPIO_NUM_14 #define PIN_BATTERY_ADC GPIO_NUM_2 #define PIN_STATUS_LED GPIO_NUM_13 #define PIN_NEOPIXEL GPIO_NUM_8 /* RF defaults and menu tuning range. */ #define RF_FREQ_HZ 435000000UL #define CC1101_XTAL_HZ 26000000UL #define TUNE_MIN_HZ 433000000UL #define TUNE_MAX_HZ 435500000UL #define TUNE_STEP_HZ 25000UL #define MY_RIC 1234567UL /* Add the test RICs you control in pager_presets.c. */ #define POCSAG_TX_ENABLE 1 #define TX_MIN_INTERVAL_MS 10000U #define TX_MAX_MESSAGE_CHARS 32U #define TX_PATABLE_VALUE 0x03U #define TX_BATCH_COUNT 3U #define OLED_IDLE_OFF_MS 60000U #define OWN_PAGE_ALERT_MS 3000U #define RX_DISPLAY_FLASHES 4U #define RX_DISPLAY_FLASH_MS 120U /* Enable only with a battery divider wired BAT+ -> GPIO2 -> GND. */ #define BATTERY_MONITOR_ENABLE 0 #define BATTERY_DIVIDER_TOP_OHMS 100000U #define BATTERY_DIVIDER_BOTTOM_OHMS 100000U #define SAMPLE_TIMER_HZ 1000000UL #define SAMPLE_PERIOD_TICKS 26UL #define SAMPLE_RATE_HZ (SAMPLE_TIMER_HZ / SAMPLE_PERIOD_TICKS) #define SAMPLE_BUF_SIZE 16384U #define SAMPLE_BUF_MASK (SAMPLE_BUF_SIZE - 1U) #define SPI_TRANSFER_CHUNK 64U #define HISTORY_COUNT 8 #define MESSAGE_SIZE 160