Hi,
I have a code that reads a GPIO and sends it it over Lora radio on ESP8266. There is a wifi page that shows the status on a web client.
Both the radio and wifi code works independently, however WiFi doesnt work when integrated together
While debugging the problem, I reached a call to yield in the LoRa library. Commenting the yield() function makes both work.
So, my question is, what is about a call to the yield() that the wifi does not like.
Here is the problematic LoRa transmit function
Hope somebody can pinpoint the problem and provide the solution.
int LoRaClass::endPacket()
{
// put in TX mode
writeRegister(REG_OP_MODE, MODE_LONG_RANGE_MODE | MODE_TX);
// wait for TX done
while ((readRegister(REG_IRQ_FLAGS) & IRQ_TX_DONE_MASK) == 0) {
//yield();
}
// clear IRQ's
writeRegister(REG_IRQ_FLAGS, IRQ_TX_DONE_MASK);
return 1;
}
Thanks and Regards,
WI