mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-09-14 15:16:40 +00:00
make promicro pinmap more tidy, move the LoRa pins to variant.h
This commit is contained in:
@@ -4,19 +4,6 @@
|
|||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <helpers/NRF52Board.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 PIN_VBAT_READ 17
|
||||||
#define ADC_MULTIPLIER (1.815f) // dependent on voltage divider resistors. TODO: more accurate battery tracking
|
#define ADC_MULTIPLIER (1.815f) // dependent on voltage divider resistors. TODO: more accurate battery tracking
|
||||||
|
|
||||||
|
|||||||
@@ -3,13 +3,29 @@
|
|||||||
#include "wiring_digital.h"
|
#include "wiring_digital.h"
|
||||||
|
|
||||||
const uint32_t g_ADigitalPinMap[] = {
|
const uint32_t g_ADigitalPinMap[] = {
|
||||||
8, 6, 17, 20, 22, 24, 32, 11, 36, 38,
|
8, // P0.08 = GPIO 0
|
||||||
9, 10, 43, 45, 47, 2, 29, 31,
|
6, // P0.06 = GPIO 1
|
||||||
33, 34, 37,
|
17, // P0.17 = GPIO 2
|
||||||
13, 15
|
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() {}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,9 +7,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "WVariant.h"
|
#include "WVariant.h"
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Low frequency clock source
|
// Low frequency clock source
|
||||||
|
|
||||||
#define VARIANT_MCK (64000000ul)
|
#define VARIANT_MCK (64000000ul)
|
||||||
|
|
||||||
@@ -79,4 +79,18 @@
|
|||||||
#define PIN_BUTTON1 (6)
|
#define PIN_BUTTON1 (6)
|
||||||
#define BUTTON_PIN PIN_BUTTON1
|
#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)
|
||||||
|
|||||||
Reference in New Issue
Block a user