MCPcopy Create free account
hub / github.com/OpenEPaperLink/OpenEPaperLink / txStart

Function txStart

ESP32_AP-Flasher/src/serialap.cpp:80–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78#define ZBS_RX_WAIT_SUBCHANNEL 19
79
80bool txStart() {
81 while (1) {
82 if (xPortInIsrContext()) {
83 if (xSemaphoreTakeFromISR(txActive, NULL) == pdTRUE) return true;
84 } else {
85 if (xSemaphoreTake(txActive, portTICK_PERIOD_MS)) return true;
86 }
87 vTaskDelay(10 / portTICK_PERIOD_MS);
88 Serial.println("wait... tx busy");
89 }
90 // this never happens. Should we make a timeout?
91 return false;
92}
93void txEnd() {
94 if (xPortInIsrContext()) {
95 xSemaphoreGiveFromISR(txActive, NULL);

Callers 7

sendBlockFunction · 0.85
sendDataAvailFunction · 0.85
sendCancelPendingFunction · 0.85
sendChannelPowerFunction · 0.85
sendPingFunction · 0.85
sendGetInfoFunction · 0.85
sendHighspeedFunction · 0.85

Calls 1

printlnMethod · 0.80

Tested by

no test coverage detected