examples/zolertia/tutorial/01-basics/03-timers.c
static void
ctimer_callback_example(void *ptr)
{
  uint32_t *ctimer_ticks = ptr;
  printf("ctimer, now: \t%ld\n", *ctimer_ticks);

  /* The real timer allows execution of real-time tasks (with predictable
   * execution times).
   * The function RTIMER_NOW() is used to get the current system time in ticks
   * and RTIMER_SECOND specifies the number of ticks per second.
   */

  (*ctimer_ticks)++;
  rtimer_set(&rt, RTIMER_NOW() + RTIMER_SECOND, 0,
             rtimer_callback_example, ctimer_ticks);
}
/*---------------------------------------------------------------------------*/
/* This is an example of functions called by the ctimer callback timer.  Notice
 * the argument of the function is "void *ptr", meaning you can pass any type
 * of data as pointer
 */
This is an example of functions called by the ctimer callback timer.  Notice
the argument of the function is "void *ptr", meaning you can pass any type
of data as pointer
This is an example of functions called by the ctimer callback timer . Notice the argument of the function is " void * ptr " meaning you can pass any type of data as pointer
static void
ctimer_callback_example(void *ptr)
{
  uint32_t *ctimer_ticks = ptr;
  printf("ctimer, now: \t%ld\n", *ctimer_ticks);
  (*ctimer_ticks)++;
  rtimer_set(&rt, RTIMER_NOW() + RTIMER_SECOND, 0,
             rtimer_callback_example, ctimer_ticks);
}
static void ctimer_callback_example ( void * ptr ) { uint32_t * ctimer_ticks = ptr ; printf ( " \t \n " , * ctimer_ticks ) ; ( * ctimer_ticks ) ++ ; rtimer_set ( & rt , RTIMER_NOW ( ) + RTIMER_SECOND , 0 , rtimer_callback_example , ctimer_ticks ) ; }
This is an example of functions called by the ctimer callback timer.
This is an example of functions called by the ctimer callback timer .
/* The real timer allows execution of real-time tasks (with predictable
   * execution times).
   * The function RTIMER_NOW() is used to get the current system time in ticks
   * and RTIMER_SECOND specifies the number of ticks per second.
   */