52 lines
1.3 KiB
C
52 lines
1.3 KiB
C
#pragma once
|
|
|
|
// WIFI AP
|
|
#define WIFI_CHANNEL 9
|
|
#define WIFI_MAX_STA 2
|
|
|
|
// NMEA2000 defaults
|
|
#define N2K_DEFAULT_NODEID 124
|
|
|
|
// Keys
|
|
#define KEY_1 GPIO_NUM_5 // D2
|
|
#define KEY_2 GPIO_NUM_6 // D3
|
|
#define KEY_3 GPIO_NUM_7 // D4
|
|
#define KEY_4 GPIO_NUM_8 // D5
|
|
#define KEY_5 GPIO_NUM_9 // D6
|
|
#define KEY_6 GPIO_NUM_10 // D7
|
|
#define KEY_DST GPIO_NUM_17 // D8
|
|
|
|
// Buzzer
|
|
#define BUZZER GPIO_NUM_0 // B1
|
|
#define LEDC_CHANNEL 0
|
|
#define LEDC_TIMER_8_BIT 8
|
|
#define LEDC_BASE_FREQ 5000
|
|
|
|
// LEDS
|
|
#define LED_A GPIO_NUM_1 // A0
|
|
#define LED_B GPIO_NUM_2 // A1
|
|
#define LED_C GPIO_NUM_3 // A2
|
|
#define RGBLED_R GPIO_NUM_4 // A3 red
|
|
#define RGBLED_G GPIO_NUM_13 // A6 green
|
|
#define RGBLED_B GPIO_NUM_14 // A7 blue
|
|
#define LED_USER GPIO_NUM_48 // internal red user led
|
|
|
|
// CAN bus for NMEA2000 connection
|
|
#define CAN_RX GPIO_NUM_18 // D9
|
|
#define CAN_TX GPIO_NUM_21 // D10
|
|
#define CAN_RECOVERY_PERIOD 3000
|
|
|
|
// I2C temp. sensor
|
|
#define I2C_SDA GPIO_NUM_11 // A4
|
|
#define I2C_SCL GPIO_NUM_12 // A5
|
|
#define I2C_SPEED 100000UL // 100kHz clock speed on I2C bus
|
|
|
|
// I2C addresses
|
|
#define SHT31_ADDRESS 0x44
|
|
|
|
// SPI display connector (optional)
|
|
#define SPI_MOSI GPIO_NUM_38 // D11
|
|
#define SPI_MISO GPIO_NUM_47 // D12
|
|
#define SPI_SCK GPIO_NUM_48 // D13
|
|
#define SPI_CS GPIO_NUM_46 // B0
|