mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-08-14 07:19:46 +00:00
Merge pull request #3170 from recrof/promicro-pin-tidy-up
[promicro] make pinmap more tidy, move the LoRa pins to variant.h
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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 = 0
|
||||
6, // P0.06 = 1
|
||||
17, // P0.17 = 2
|
||||
20, // P0.20 = 3
|
||||
22, // P0.22 = 4
|
||||
24, // P0.24 = 5
|
||||
32, // P1.00 = 6
|
||||
11, // P0.11 = 7
|
||||
36, // P1.04 = 8
|
||||
38, // P1.06 = 9
|
||||
9, // P0.09 = 10
|
||||
10, // P0.10 = 11
|
||||
43, // P1.11 = 12
|
||||
45, // P1.13 = 13
|
||||
47, // P1.15 = 14
|
||||
2, // P0.02 = 15
|
||||
29, // P0.29 = 16
|
||||
31, // P0.31 = 17
|
||||
33, // P1.01 = 18
|
||||
34, // P1.02 = 19
|
||||
37, // P1.05 = 20
|
||||
13, // P0.13 = 21
|
||||
15 // P0.15 = 22
|
||||
};
|
||||
|
||||
void initVariant()
|
||||
{
|
||||
}
|
||||
|
||||
void initVariant() {}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user