Example #1
0
/*
** ===================================================================
**     Event       :  FRTOS1_vApplicationTickHook (module Events)
**
**     Component   :  FRTOS1 [FreeRTOS]
**     Description :
**         If enabled, this hook will be called by the RTOS for every
**         tick increment.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
void FRTOS1_vApplicationTickHook(void)
{
  TMOUT1_AddTick();
  TMR_OnInterrupt();
  #if PL_HAS_MOTOR_TACHO
    TACHO_Sample();
  #endif
}
Example #2
0
void TMR_OnInterrupt(void) {
  /* this one gets called from an interrupt!!!! */
 #if PL_HAS_TRIGGER
  TRG_IncTick();
#endif

	TMOUT1_AddTick();

#if PL_HAS_MOTOR_TACHO
	TACHO_Sample();
#endif

}
Example #3
0
void TMR_OnInterrupt(void) {
  /* this one gets called from an interrupt!!!! */
  static int cntr=0;

  cntr++;
  if (cntr==(1000/TMR_TICK_MS)) {
#if 1 /* setting an event */
    EVNT_SetEvent(EVENT_LED_HEARTBEAT);
#else /* toggling directly the LED */
    LED1_Neg();
#endif
    cntr = 0;
  }
#if PL_HAS_TRIGGER
  TRG_IncTick();
#endif
  TMOUT1_AddTick();
#if PL_HAS_MOTOR_TACHO
  TACHO_Sample();
#endif
}