MCPcopy Create free account
hub / github.com/PricelessToolkit/MailBoxGuard / endPacket

Method endPacket

Code/Arduino_libraries/LoRa/LoRa.cpp:184–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184int 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
205bool LoRaClass::isTransmitting()
206{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected