diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-01-15 02:42:54 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-01-15 02:42:54 +0000 |
commit | 77dda302acb0402a27565e12f98ffc56c1a86389 (patch) | |
tree | 8f08f2db96f1c8bb4c4a09e1731b75e886abd961 /Projects/Incomplete/Webserver/Lib | |
parent | f0d6d4ef13ddce09cfc3f684a5e5192cdd4e6a60 (diff) | |
download | lufa-77dda302acb0402a27565e12f98ffc56c1a86389.tar.gz lufa-77dda302acb0402a27565e12f98ffc56c1a86389.tar.bz2 lufa-77dda302acb0402a27565e12f98ffc56c1a86389.zip |
Fixed invalid USB controller PLL prescaler values for the ATMEGAxxU2 controllers
Fixed lack of support for the ATMEGA32U2 in the DFU and CDC class bootloaders
Changed incomplete Webserver project over to using the uIP timer library.
Diffstat (limited to 'Projects/Incomplete/Webserver/Lib')
-rw-r--r-- | Projects/Incomplete/Webserver/Lib/uip/conf/clock-arch.c | 14 | ||||
-rw-r--r-- | Projects/Incomplete/Webserver/Lib/uip/conf/clock-arch.h | 2 |
2 files changed, 6 insertions, 10 deletions
diff --git a/Projects/Incomplete/Webserver/Lib/uip/conf/clock-arch.c b/Projects/Incomplete/Webserver/Lib/uip/conf/clock-arch.c index c3e281ebd..8363d96e0 100644 --- a/Projects/Incomplete/Webserver/Lib/uip/conf/clock-arch.c +++ b/Projects/Incomplete/Webserver/Lib/uip/conf/clock-arch.c @@ -12,7 +12,7 @@ volatile clock_time_t clock_datetime = 0; //Overflow interrupt -ISR(TIMER0_OVF_vect) +ISR(TIMER1_COMPA_vect) {
clock_datetime += 1; } @@ -20,14 +20,10 @@ ISR(TIMER0_OVF_vect) //Initialise the clock void clock_init()
{
- //Activate overflow interrupt for timer0 - TIMSK0 |= (1<<TOIE0); - - //Use prescaler 1024 - TCCR0B |= ((1<<CS12)|(1<<CS10)); - - //Activate interrupts - sei(); + OCR1A = ((F_CPU / 1024) / 100); + TCCR1A = (1 << WGM12); + TCCR1B = ((1 << CS12) | (1 << CS10)); + TIMSK1 = (1 << OCIE1A); } //Return time diff --git a/Projects/Incomplete/Webserver/Lib/uip/conf/clock-arch.h b/Projects/Incomplete/Webserver/Lib/uip/conf/clock-arch.h index c759d01a3..9c895e56d 100644 --- a/Projects/Incomplete/Webserver/Lib/uip/conf/clock-arch.h +++ b/Projects/Incomplete/Webserver/Lib/uip/conf/clock-arch.h @@ -5,7 +5,7 @@ #include <stdint.h>
typedef uint16_t clock_time_t;
-#define CLOCK_CONF_SECOND (F_CPU / 1024 / 255) //Freqency divided prescaler and counter register size
+#define CLOCK_CONF_SECOND 100
void clock_init(void);
clock_time_t clock_time(void);
|