| 182 | } |
| 183 | |
| 184 | int LoRaClass::endPacket(bool async) |
| 185 | { |
| 186 | |
| 187 | if ((async) && (_onTxDone)) |
| 188 | writeRegister(REG_DIO_MAPPING_1, 0x40); // DIO0 => TXDONE |
| 189 | |
| 190 | // put in TX mode |
| 191 | writeRegister(REG_OP_MODE, MODE_LONG_RANGE_MODE | MODE_TX); |
| 192 | |
| 193 | if (!async) { |
| 194 | // wait for TX done |
| 195 | while ((readRegister(REG_IRQ_FLAGS) & IRQ_TX_DONE_MASK) == 0) { |
| 196 | yield(); |
| 197 | } |
| 198 | // clear IRQ's |
| 199 | writeRegister(REG_IRQ_FLAGS, IRQ_TX_DONE_MASK); |
| 200 | } |
| 201 | |
| 202 | return 1; |
| 203 | } |
| 204 | |
| 205 | bool LoRaClass::isTransmitting() |
| 206 | { |
nothing calls this directly
no outgoing calls
no test coverage detected