make promicro pinmap more tidy, move the LoRa pins to variant.h

This commit is contained in:
Rastislav Vysoky
2026-08-10 20:13:59 +02:00
parent f6c25e6a25
commit a82dc1b9da
3 changed files with 40 additions and 23 deletions
-13
View File
@@ -4,19 +4,6 @@
#include <Arduino.h>
#include <helpers/NRF52Board.h>
#define P_LORA_NSS 13 //P1.13 45
#define P_LORA_DIO_1 11 //P0.10 10
#define P_LORA_RESET 10 //P0.09 9
#define P_LORA_BUSY 16 //P0.29 29
#define P_LORA_MISO 15 //P0.02 2
#define P_LORA_SCLK 12 //P1.11 43
#define P_LORA_MOSI 14 //P1.15 47
#define SX126X_POWER_EN 21 //P0.13 13
#define SX126X_RXEN 2 //P0.17
#define SX126X_TXEN RADIOLIB_NC
#define SX126X_DIO2_AS_RF_SWITCH true
#define SX126X_DIO3_TCXO_VOLTAGE (1.8f)
#define PIN_VBAT_READ 17
#define ADC_MULTIPLIER (1.815f) // dependent on voltage divider resistors. TODO: more accurate battery tracking
+24 -8
View File
@@ -3,13 +3,29 @@
#include "wiring_digital.h"
const uint32_t g_ADigitalPinMap[] = {
8, 6, 17, 20, 22, 24, 32, 11, 36, 38,
9, 10, 43, 45, 47, 2, 29, 31,
33, 34, 37,
13, 15
8, // P0.08 = GPIO 0
6, // P0.06 = GPIO 1
17, // P0.17 = GPIO 2
20, // P0.20 = GPIO 3
22, // P0.22 = GPIO 4
24, // P0.24 = GPIO 5
32, // P1.00 = GPIO 6
11, // P0.11 = GPIO 7
36, // P1.04 = GPIO 8
38, // P1.06 = GPIO 9
9, // P0.09 = GPIO 10
10, // P0.10 = GPIO 11
43, // P1.11 = GPIO 12
45, // P1.13 = GPIO 13
47, // P1.15 = GPIO 14
2, // P0.02 = GPIO 15
29, // P0.29 = GPIO 16
31, // P0.31 = GPIO 17
33, // P1.01 = GPIO 18
34, // P1.02 = GPIO 19
37, // P1.05 = GPIO 20
13, // P0.13 = GPIO 21
15 // P0.15 = GPIO 22
};
void initVariant()
{
}
void initVariant() {}
+16 -2
View File
@@ -7,9 +7,9 @@
#pragma once
#include "WVariant.h"
////////////////////////////////////////////////////////////////////////////////
// Low frequency clock source
// Low frequency clock source
#define VARIANT_MCK (64000000ul)
@@ -79,4 +79,18 @@
#define PIN_BUTTON1 (6)
#define BUTTON_PIN PIN_BUTTON1
//////////////////////////////////////////////////////////////////////////////
// LoRa
#define P_LORA_NSS (13)
#define P_LORA_DIO_1 (11)
#define P_LORA_RESET (10)
#define P_LORA_BUSY (16)
#define P_LORA_MISO (15)
#define P_LORA_SCLK (12)
#define P_LORA_MOSI (14)
#define SX126X_POWER_EN (21)
#define SX126X_RXEN (2)
#define SX126X_TXEN (-1)
#define SX126X_DIO2_AS_RF_SWITCH true
#define SX126X_DIO3_TCXO_VOLTAGE (1.8f)