Ejemplo n.º 1
0
void cc1101_t::Transmit(void *Ptr) {
    // WaitUntilChannelIsBusy();   // If this is not done, time after time FIFO is destroyed
    while(IState != CC_STB_IDLE) EnterIdle();
    WriteTX((uint8_t*)Ptr, IPktSz);
    // Enter TX and wait IRQ
    chSysLock();
    EnterTX();
    chThdSuspendS(&ThdRef);    // Wait IRQ
    chSysUnlock();  // Will be here when IRQ fires
}
Ejemplo n.º 2
0
/**
 * @brief   Initializes the lwIP subsystem.
 * @note    The function exits after the initialization is finished.
 *
 * @param[in] opts      pointer to the configuration structure, if @p NULL
 *                      then the static configuration is used.
 */
void lwipInit(const lwipthread_opts_t *opts) {

  /* Creating the lwIP thread (it changes priority internally).*/
  chThdCreateStatic(wa_lwip_thread, LWIP_THREAD_STACK_SIZE,
                    chThdGetPriorityX() - 1, lwip_thread, (void *)opts);

  /* Waiting for the lwIP thread complete initialization. Note,
     this thread reaches the thread reference object first because
     the relative priorities.*/
  chSysLock();
  chThdSuspendS(&lwip_trp);
  chSysUnlock();
}
Ejemplo n.º 3
0
__noreturn
static void EffectsThread(void *arg) {
    chRegSetThreadName("Effects");
    while(true) {
        if(PCurrentEff == nullptr) {
            chSysLock();
            chThdSuspendS(&PThd);
            chSysUnlock();
        }
        else {
            if(PCurrentEff->Process() == effEnd) {
                PCurrentEff = nullptr;
            }
        }
    }
}
Ejemplo n.º 4
0
Archivo: ch.cpp Proyecto: sdalu/ChibiOS
  msg_t ThreadStayPoint::suspendS(void) {

    return chThdSuspendS(&thread_ref);
  }