xyControl  0.1
Quadrotor Flight Controller on AVR Basis
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
Macros | Functions | Variables
time.c File Reference

Time API Implementation. More...

#include <stdlib.h>
#include <stdint.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/atomic.h>
#include <time.h>

Go to the source code of this file.

Macros

#define TCRA   TCCR2A
 Timer 2 Control Register A. More...
 
#define TCRB   TCCR2B
 Timer 2 Control Register B. More...
 
#define OCR   OCR2A
 Timer 2 Compare Register A. More...
 
#define TIMS   TIMSK2
 Timer 2 Interrupt Mask. More...
 
#define OCIE   OCIE2A
 Timer 2 Compare Match A Interrupt Enable. More...
 

Functions

void initSystemTimer (void)
 Initialize the system timer. More...
 
 ISR (TIMER2_COMPA_vect)
 Timer 2 Compare Match A Interrupt. More...
 
time_t getSystemTime (void)
 Get the System Uptime. More...
 

Variables

volatile time_t systemTime = 0
 Current System Uptime. More...
 

Detailed Description

Time API Implementation.

Definition in file time.c.