diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-01-25 12:10:13 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-01-25 12:10:13 +0000 |
commit | 15c408ab8635fe45226abc2c55c9bebfe1ccb6c8 (patch) | |
tree | 8b2b811f5857fadb9227e7faa64960d1efdf1b28 /Projects/Incomplete/Webserver/Lib/uip/conf/clock-arch.c | |
parent | d66f227ccef46a65e17b06d31c82c30158ae36a5 (diff) | |
download | lufa-15c408ab8635fe45226abc2c55c9bebfe1ccb6c8.tar.gz lufa-15c408ab8635fe45226abc2c55c9bebfe1ccb6c8.tar.bz2 lufa-15c408ab8635fe45226abc2c55c9bebfe1ccb6c8.zip |
Moved initial completed version of the Webserver project out of the Projects/Incomplete directory.
Diffstat (limited to 'Projects/Incomplete/Webserver/Lib/uip/conf/clock-arch.c')
-rw-r--r-- | Projects/Incomplete/Webserver/Lib/uip/conf/clock-arch.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/Projects/Incomplete/Webserver/Lib/uip/conf/clock-arch.c b/Projects/Incomplete/Webserver/Lib/uip/conf/clock-arch.c deleted file mode 100644 index 8363d96e0..000000000 --- a/Projects/Incomplete/Webserver/Lib/uip/conf/clock-arch.c +++ /dev/null @@ -1,39 +0,0 @@ -#include "global-conf.h" -#include <stdint.h> -#include <stdlib.h> -#include <stdio.h> -#include <avr/interrupt.h> -#include <avr/io.h> -#include <avr/sfr_defs.h> - -#include "clock-arch.h" - -//Counted time -volatile clock_time_t clock_datetime = 0; - -//Overflow interrupt -ISR(TIMER1_COMPA_vect) -{
- clock_datetime += 1; -} - -//Initialise the clock -void clock_init()
-{
- OCR1A = ((F_CPU / 1024) / 100); - TCCR1A = (1 << WGM12); - TCCR1B = ((1 << CS12) | (1 << CS10)); - TIMSK1 = (1 << OCIE1A); -} - -//Return time -clock_time_t clock_time()
-{
- clock_time_t time; - - cli(); - time = clock_datetime; - sei(); - - return time; -} |