| 78 | #define ZBS_RX_WAIT_SUBCHANNEL 19 |
| 79 | |
| 80 | bool 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 | } |
| 93 | void txEnd() { |
| 94 | if (xPortInIsrContext()) { |
| 95 | xSemaphoreGiveFromISR(txActive, NULL); |
no test coverage detected