mirror of
https://github.com/liberatedsystems/RNode_Firmware_CE.git
synced 2024-07-02 14:34:13 +02:00
Updated board definitions
This commit is contained in:
parent
21b6348f1a
commit
51c45e43bd
4
LoRa.cpp
4
LoRa.cpp
@ -38,6 +38,7 @@
|
||||
#define REG_FRF_MID 0x07
|
||||
#define REG_FRF_LSB 0x08
|
||||
#define REG_PA_CONFIG 0x09
|
||||
#define REG_OCP 0x0b
|
||||
#define REG_LNA 0x0c
|
||||
#define REG_FIFO_ADDR_PTR 0x0d
|
||||
#define REG_FIFO_TX_BASE_ADDR 0x0e
|
||||
@ -63,6 +64,7 @@
|
||||
#define REG_SYNC_WORD 0x39
|
||||
#define REG_DIO_MAPPING_1 0x40
|
||||
#define REG_VERSION 0x42
|
||||
#define REG_PA_DAC 0x4d
|
||||
|
||||
// Modes
|
||||
#define MODE_LONG_RANGE_MODE 0x80
|
||||
@ -402,6 +404,7 @@ void LoRaClass::setTxPower(int level, int outputPin) {
|
||||
level = 14;
|
||||
}
|
||||
|
||||
writeRegister(REG_PA_DAC, 0x84);
|
||||
writeRegister(REG_PA_CONFIG, 0x70 | level);
|
||||
|
||||
} else {
|
||||
@ -412,6 +415,7 @@ void LoRaClass::setTxPower(int level, int outputPin) {
|
||||
level = 17;
|
||||
}
|
||||
|
||||
writeRegister(REG_PA_DAC, 0x84);
|
||||
writeRegister(REG_PA_CONFIG, PA_BOOST | (level - 2));
|
||||
}
|
||||
}
|
||||
|
1
ROM.h
1
ROM.h
@ -23,6 +23,7 @@
|
||||
#define MODEL_C9 0xC9
|
||||
#define MODEL_E4 0xE4
|
||||
#define MODEL_E9 0xE9
|
||||
#define MODEL_FE 0xFE
|
||||
#define MODEL_FF 0xFF
|
||||
|
||||
#define ADDR_PRODUCT 0x00
|
||||
|
14
Utilities.h
14
Utilities.h
@ -658,19 +658,19 @@ void setTXPower() {
|
||||
if (model == MODEL_A8) LoRa.setTxPower(lora_txp, PA_OUTPUT_PA_BOOST_PIN);
|
||||
if (model == MODEL_A9) LoRa.setTxPower(lora_txp, PA_OUTPUT_PA_BOOST_PIN);
|
||||
|
||||
if (model == MODEL_B3) LoRa.setTxPower(lora_txp, PA_OUTPUT_RFO_PIN);
|
||||
if (model == MODEL_B4) LoRa.setTxPower(lora_txp, PA_OUTPUT_RFO_PIN);
|
||||
if (model == MODEL_B3) LoRa.setTxPower(lora_txp, PA_OUTPUT_PA_BOOST_PIN);
|
||||
if (model == MODEL_B4) LoRa.setTxPower(lora_txp, PA_OUTPUT_PA_BOOST_PIN);
|
||||
if (model == MODEL_B8) LoRa.setTxPower(lora_txp, PA_OUTPUT_PA_BOOST_PIN);
|
||||
if (model == MODEL_B9) LoRa.setTxPower(lora_txp, PA_OUTPUT_PA_BOOST_PIN);
|
||||
|
||||
if (model == MODEL_C4) LoRa.setTxPower(lora_txp, PA_OUTPUT_RFO_PIN);
|
||||
if (model == MODEL_C4) LoRa.setTxPower(lora_txp, PA_OUTPUT_PA_BOOST_PIN);
|
||||
if (model == MODEL_C9) LoRa.setTxPower(lora_txp, PA_OUTPUT_PA_BOOST_PIN);
|
||||
|
||||
if (model == MODEL_E4) LoRa.setTxPower(lora_txp, PA_OUTPUT_RFO_PIN);
|
||||
if (model == MODEL_E4) LoRa.setTxPower(lora_txp, PA_OUTPUT_PA_BOOST_PIN);
|
||||
if (model == MODEL_E9) LoRa.setTxPower(lora_txp, PA_OUTPUT_PA_BOOST_PIN);
|
||||
|
||||
if (model == MODEL_FE) LoRa.setTxPower(lora_txp, PA_OUTPUT_PA_BOOST_PIN);
|
||||
if (model == MODEL_FF) LoRa.setTxPower(lora_txp, PA_OUTPUT_RFO_PIN);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -814,7 +814,7 @@ bool eeprom_model_valid() {
|
||||
#elif BOARD_MODEL == BOARD_RNODE_NG_21
|
||||
if (model == MODEL_A2 || model == MODEL_A7) {
|
||||
#elif BOARD_MODEL == BOARD_HMBRW
|
||||
if (model == MODEL_FF) {
|
||||
if (model == MODEL_FF || model == MODEL_FE) {
|
||||
#elif BOARD_MODEL == BOARD_TBEAM
|
||||
if (model == MODEL_E4 || model == MODEL_E9) {
|
||||
#elif BOARD_MODEL == BOARD_LORA32_V2_0
|
||||
@ -826,7 +826,7 @@ bool eeprom_model_valid() {
|
||||
#elif BOARD_MODEL == BOARD_HUZZAH32
|
||||
if (model == MODEL_FF) {
|
||||
#elif BOARD_MODEL == BOARD_GENERIC_ESP32
|
||||
if (model == MODEL_FF) {
|
||||
if (model == MODEL_FF || model == MODEL_FE) {
|
||||
#else
|
||||
if (false) {
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user