コード例 #1
0
/******************************************************************************
**  Function:  CFE_PSP_AuxClkHandler()
**
**  Purpose:
**    A timer int handler to keep track of seconds.
**
**  Arguments:
**
**  Return:
*/
void CFE_PSP_AuxClkHandler(int arg)
{
   static int auxCount = 0;

   if(++auxCount >= CFE_PSP_TIMER_AUX_TICK_PER_SEC)
   {
      auxCount = 0;

      ++g_nSecondsCount;


      /* calling enable every second, resets the counter to 0, allowing us
       * to use the higher resolution timestamp counter as a subsecond
       * time source */
      sysTimestampEnable();

      CFE_TIME_Local1HzISR();

      /* FOR DEBUG
      OS_time_t LocalTime;
      CFE_PSP_GetTime(&LocalTime);
      logMsg("aux clk handler: %u %u\n", LocalTime.seconds,LocalTime.microsecs,0,0,0,0);
      */
   }

   return;
}
コード例 #2
0
ファイル: cfe_psp_start.c プロジェクト: Spacecraft-Code/cFE
rtems_timer_service_routine CFE_PSP_1hzTimer( rtems_id timer_id, void *user_data)
{
   int status;

   timer_count++;
  
   /* printk("T:%d\n",timer_count);  */
   status = rtems_timer_reset(timer_id);
   CFE_TIME_Local1HzISR(); 
}
コード例 #3
0
ファイル: cfe_psp_start.c プロジェクト: WindhoverLabs/cfs-psp
/******************************************************************************
**  Function:  CFE_PSP_TimerHandler()
**
**  Purpose:
**    1hz "isr" routine for linux/OSX
**    This timer handler will execute 4 times a second.
**
**  Arguments:
**    (none)
**
**  Return:
**    (none)
*/
void CFE_PSP_TimerHandler (int signum)
{
      /*
      ** call the CFE_TIME 1hz ISR
      */
      if((TimerCounter % 4) == 0) CFE_TIME_Local1HzISR();

	  /* update timer counter */
	  TimerCounter++;
}
コード例 #4
0
/******************************************************************************
**  Function:  CFE_PSP_AuxClkHandler()
**
**  Purpose:
**    A timer int handler to keep track of seconds.
**
**  Arguments:
**
**  Return:
*/
void CFE_PSP_AuxClkHandler(int arg)
{
   static int auxCount = 0;

   if(++auxCount >= CFE_PSP_TIMER_AUX_TICK_PER_SEC)
   {
      auxCount = 0;
      CFE_TIME_Local1HzISR();

      /* FOR DEBUG
      OS_time_t LocalTime;
      CFE_PSP_GetTime(&LocalTime);
      logMsg("aux clk handler: %d.%d\n", LocalTime.seconds,LocalTime.microsecs,0,0,0,0);
      */
   }

   return;
}