Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
sys_time_arch.h File Reference

LPC21xx timing functions. More...

#include "mcu_periph/sys_time.h"
#include <BOARD_CONFIG>
#include "LPC21xx.h"
#include "armVIC.h"
#include "std.h"
+ Include dependency graph for sys_time_arch.h:

Go to the source code of this file.

Macros

#define TIMER0_VIC_SLOT   1
 
#define SysTickTimerStart(_t)   { _t = T0TC; }
 
#define SysTickTimer(_t)   ((uint32_t)(T0TC - _t))
 
#define SysTickTimerStop(_t)   { _t = (T0TC - _t); }
 

Functions

void TIMER0_ISR (void)
 
static uint32_t get_sys_time_usec (void)
 Get the time in microseconds since startup. More...
 
static uint32_t get_sys_time_msec (void)
 Get the time in milliseconds since startup. More...
 
static void sys_time_usleep (uint32_t us)
 Busy wait, in microseconds. More...
 

Detailed Description

LPC21xx timing functions.

Definition in file sys_time_arch.h.

Macro Definition Documentation

#define SysTickTimer (   _t)    ((uint32_t)(T0TC - _t))

Definition at line 83 of file sys_time_arch.h.

#define SysTickTimerStart (   _t)    { _t = T0TC; }

Definition at line 82 of file sys_time_arch.h.

#define SysTickTimerStop (   _t)    { _t = (T0TC - _t); }

Definition at line 84 of file sys_time_arch.h.

#define TIMER0_VIC_SLOT   1

Definition at line 59 of file sys_time_arch.h.

Referenced by sys_time_arch_init().

Function Documentation

static uint32_t get_sys_time_msec ( void  )
inlinestatic

Get the time in milliseconds since startup.

Returns
milliseconds since startup as uint32_t

Definition at line 76 of file sys_time_arch.h.

References msec_of_cpu_ticks(), and T0TC.

+ Here is the call graph for this function:

static uint32_t get_sys_time_usec ( void  )
inlinestatic

Get the time in microseconds since startup.

WARNING: overflows after ??

Returns
microseconds since startup as uint32_t

Definition at line 67 of file sys_time_arch.h.

References T0TC, and usec_of_cpu_ticks().

+ Here is the call graph for this function:

static void sys_time_usleep ( uint32_t  us)
inlinestatic

Busy wait, in microseconds.

Definition at line 87 of file sys_time_arch.h.

References cpu_ticks_of_usec(), T0TC, and ticks.

+ Here is the call graph for this function:

void TIMER0_ISR ( void  )

Definition at line 179 of file sys_time_arch.c.

References ACTUATORS_IT, AMI601_ISR, AMI601_IT, ISR_ENTRY, ISR_EXIT, LED_TOGGLE, MB_SCALE_IT, MB_TACHO_IT, PPM_ISR, PPM_IT, PWM_INPUT_IT1, PWM_INPUT_IT2, Servos4015Mat_ISR, SERVOS_4017_ISR, ServosPPMMat_ISR, sys_tick_irq_handler(), SYS_TICK_IT, T0IR, TIMER0_IT_MASK, TRIG_ISR(), TRIGGER_IT, and VICVectAddr.

Referenced by sys_time_arch_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: