Skip to content

Commit 246ceea

Browse files
Add support to e19 module(ebyte)
1 parent 595922a commit 246ceea

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/LoRa.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#define REG_SYNC_WORD 0x39
3939
#define REG_INVERTIQ2 0x3b
4040
#define REG_DIO_MAPPING_1 0x40
41+
#define REG_DIO_MAPPING_2 0x41
4142
#define REG_VERSION 0x42
4243
#define REG_PA_DAC 0x4d
4344

@@ -215,6 +216,7 @@ int LoRaClass::endPacket(bool async, int implicitHeader) {
215216

216217
// put in TX mode
217218
writeRegister(REG_OP_MODE, MODE_LONG_RANGE_MODE | MODE_TX);
219+
writeRegister(REG_DIO_MAPPING_2, 0x00); //
218220

219221
if (!async) {
220222
// wait for TX done
@@ -440,6 +442,7 @@ void LoRaClass::onTxDone(void (*callback)()) {
440442

441443
void LoRaClass::receive(int size) {
442444
writeRegister(REG_DIO_MAPPING_1, 0x00); // DIO0 => RXDONE
445+
writeRegister(REG_DIO_MAPPING_2, 0x40); //
443446

444447
if (size > 0) {
445448
implicitHeaderMode();

0 commit comments

Comments
 (0)