arch/arm/src/sam34/sam4cm_oneshot.c
/****************************************************************************
 * Name: sam_oneshot_handler
 *
 * Description:
 *   Timer interrupt callback.  When the oneshot timer interrupt expires,
 *   this function will be called.  It will forward the call to the next
 *   level up.
 *
 * Input Parameters:
 *   tch - The handle that represents the timer state
 *   arg - An opaque argument provided when the interrupt was registered
 *   sr  - The value of the timer interrupt status register at the time
 *         that the interrupt occurred.
 *
 * Returned Value:
 *   None
 *
 ****************************************************************************/
sam_oneshot_handler
Description:
Timer interrupt callback.  When the oneshot timer interrupt expires,
this function will be called.  It will forward the call to the next
level up.

Input Parameters:
tch - The handle that represents the timer state
arg - An opaque argument provided when the interrupt was registered
sr  - The value of the timer interrupt status register at the time
that the interrupt occurred.

Returned Value:
None
sam_oneshot_handler Description : Timer interrupt callback . When the oneshot timer interrupt expires this function will be called . It will forward the call to the next level up . Input Parameters : tch - The handle that represents the timer state arg - An opaque argument provided when the interrupt was registered sr - The value of the timer interrupt status register at the time that the interrupt occurred . Returned Value : None
static void sam_oneshot_handler(TC_HANDLE tch, void *arg, uint32_t sr)
{
  struct sam_oneshot_s *oneshot = (struct sam_oneshot_s *)arg;
  oneshot_handler_t oneshot_handler;
  void *oneshot_arg;
  tcllvdbg("Expired...\n");
  DEBUGASSERT(oneshot && oneshot->handler);
  sam_tc_attach(oneshot->tch, NULL, NULL, 0);
  sam_tc_stop(oneshot->tch);
  oneshot->running = false;
  oneshot_handler  = (oneshot_handler_t)oneshot->handler;
  oneshot->handler = NULL;
  oneshot_arg      = (void *)oneshot->arg;
  oneshot->arg     = NULL;
  oneshot_handler(oneshot_arg);
}
static void sam_oneshot_handler ( TC_HANDLE tch , void * arg , uint32_t sr ) { struct sam_oneshot_s * oneshot = ( struct sam_oneshot_s * ) arg ; oneshot_handler_t oneshot_handler ; void * oneshot_arg ; tcllvdbg ( " \n " ) ; DEBUGASSERT ( oneshot && oneshot -> handler ) ; sam_tc_attach ( oneshot -> tch , NULL , NULL , 0 ) ; sam_tc_stop ( oneshot -> tch ) ; oneshot -> running = false ; oneshot_handler = ( oneshot_handler_t ) oneshot -> handler ; oneshot -> handler = NULL ; oneshot_arg = ( void * ) oneshot -> arg ; oneshot -> arg = NULL ; oneshot_handler ( oneshot_arg ) ; }
Name: sam_oneshot_handler
 Description:
   Timer interrupt callback.
Name : sam_oneshot_handler Description : Timer interrupt callback .
/* The clock was stopped, but not disabled when the RC match occurred.
   * Disable the TC now and disable any further interrupts.
   */ /* The timer is no longer running */ /* Forward the event, clearing out any vestiges */