void owInit() { syslinkInit(); vSemaphoreCreateBinary(waitForReply); lockCmdBuf = xSemaphoreCreateMutex(); // Put reply semaphore in right state. xSemaphoreTake(waitForReply, portMAX_DELAY); }
void radiolinkInit(void) { if (isInit) return; syslinkInit(); crtpPacketDelivery = xQueueCreate(5, sizeof(CRTPPacket)); if (crtpPacketDelivery == 0) { return; } radiolinkSetChannel(configblockGetRadioChannel()); radiolinkSetDatarate(configblockGetRadioSpeed()); isInit = true; }
void radiolinkInit(void) { if (isInit) return; txQueue = xQueueCreate(RADIOLINK_TX_QUEUE_SIZE, sizeof(SyslinkPacket)); DEBUG_QUEUE_MONITOR_REGISTER(txQueue); crtpPacketDelivery = xQueueCreate(5, sizeof(CRTPPacket)); DEBUG_QUEUE_MONITOR_REGISTER(crtpPacketDelivery); ASSERT(crtpPacketDelivery); syslinkInit(); radiolinkSetChannel(configblockGetRadioChannel()); radiolinkSetDatarate(configblockGetRadioSpeed()); radiolinkSetAddress(configblockGetRadioAddress()); isInit = true; }