Exemple #1
0
static void mma8451_int2_cb(EXTDriver *extp, expchannel_t channel){
  (void)extp;
  (void)channel;
  chSysLockFromIsr();
  mma8451_sem.signalI();
  chSysUnlockFromIsr();
}
Exemple #2
0
static void bmp085_cb(EXTDriver *extp, expchannel_t channel){
  (void)extp;
  (void)channel;
  chSysLockFromIsr();
  bmp085_sem.signalI();
  chSysUnlockFromIsr();
}
Exemple #3
0
void TimeKeeper::stop(void) {

  ready = false;

  chThdTerminate(worker);
  ppstimesync_sem.signal(); /* speed up termination */
  chThdWait(worker);
  worker = nullptr;
  Exti.pps(false);
}
Exemple #4
0
static void itg3200_cb(EXTDriver *extp, expchannel_t channel){
  (void)extp;
  (void)channel;
  chSysLockFromIsr();

#if !GYRO_UPDATE_PERIOD_HARDCODED
  if (itg3200_period_measured < 2){
    if (itg3200_period_measured == 0){
      tmStartMeasurement(&itg3200_tmup);
    }
    else if(itg3200_period_measured == 1){
      tmStopMeasurement(&itg3200_tmup);
      GyroUpdatePeriodUs = RTT2US(itg3200_tmup.last);
    }
    itg3200_period_measured++;
  }
#endif /* !GYRO_UPDATE_PERIOD_HARDCODED */

  itg3200_sem.signalI();
  lsm303_sem.signalI();
  chSysUnlockFromIsr();
}
Exemple #5
0
static void release(void) {
  protect_sem.signal();
}
Exemple #6
0
static void acquire(void) {
  protect_sem.wait();
}
Exemple #7
0
void TimeKeeper::PPS_ISR_I(void) {

  drift_est.sample_prev = drift_est.sample;
  drift_est.sample = utc();
  ppstimesync_sem.signalI();
}