Example #1
0
/**
 * @brief  Callback function for input capture unit.
 * @param  icup - pointer to the input capture driver.
 * @param  channel - input capture channel triggering the callback.
 * @return none.
 */
static void icuwidthcb(ICUDriver *icup, icuchannel_t channel) {
  if (&ICUD2 == icup) {
    g_inputValues[INPUT_CHANNEL_AUX3] = icuGetWidth(icup, channel);
  } else {
    g_inputValues[INPUT_CHANNEL_AUX4 + channel] = icuGetWidth(icup, channel);
  }
}
Example #2
0
static void icuwidthcb(ICUDriver *icup) {

  palSetPad(PORT_D, PD_LED2);
  last_width = icuGetWidth(icup);
}
static void icuwidth_RightWheelFirstSensor(ICUDriver *icup) {
    last_width_RightWheelFirstSensor = icuGetWidth(icup);

    timeStampRightWheelFirstSensor = chTimeNow();
}
static void icuwidth_LeftWheelSecondSensor(ICUDriver *icup) {
    last_width_LeftWheelSecondSensor = icuGetWidth(icup);

    timeStampLeftWheelSecondSensor = chTimeNow();
}
Example #5
0
static void icuwidthcb(ICUDriver *icup) {

  palSetPad(GPIOE, GPIOE_LED9_BLUE);
  last_width = icuGetWidth(icup);
}
Example #6
0
static void icuwidthcb(ICUDriver *icup) {

  palSetPad(GPIOD, GPIOD_LED4);
  last_width = icuGetWidth(icup);
}
Example #7
0
static void icuwidth_CH2(ICUDriver *icup) {
    last_width_CH2 = icuGetWidth(icup);
}
/* ICU part
 *
 *
 */
static void icuwidthcb(ICUDriver *icup) {

  last_width = icuGetWidth(icup);
}