Commented out unused functions from timer.c to save space.

This commit is contained in:
David A. Mellis 2006-07-04 22:08:35 +00:00
parent e9113e0320
commit 73612d95e0
1 changed files with 14 additions and 9 deletions

View File

@ -44,7 +44,7 @@ volatile unsigned long Timer2Reg0;
typedef void (*voidFuncPtr)(void); typedef void (*voidFuncPtr)(void);
volatile static voidFuncPtr TimerIntFunc[TIMER_NUM_INTERRUPTS]; volatile static voidFuncPtr TimerIntFunc[TIMER_NUM_INTERRUPTS];
/*
// delay for a minimum of <us> microseconds // delay for a minimum of <us> microseconds
// the time resolution is dependent on the time the loop takes // the time resolution is dependent on the time the loop takes
// e.g. with 4Mhz and 5 cycles per loop, the resolution is 1.25 us // e.g. with 4Mhz and 5 cycles per loop, the resolution is 1.25 us
@ -57,7 +57,8 @@ void delay_us(unsigned short time_us)
// one loop takes 5 cpu cycles // one loop takes 5 cpu cycles
for (i=0; i < delay_loops; i++) {}; for (i=0; i < delay_loops; i++) {};
} }
*/
/* /*
void delay_ms(unsigned char time_ms) void delay_ms(unsigned char time_ms)
{ {
@ -75,7 +76,8 @@ void delay_ms(unsigned char time_ms)
:"r"(time_ms), "r"((unsigned short) (delay_count)) :"r"(time_ms), "r"((unsigned short) (delay_count))
); );
} }
*/ */
/*
void timerInit(void) void timerInit(void)
{ {
u08 intNum; u08 intNum;
@ -92,7 +94,7 @@ void timerInit(void)
// enable interrupts // enable interrupts
sei(); sei();
} }
*/
void timer0Init() void timer0Init()
{ {
// initialize timer 0 // initialize timer 0
@ -149,7 +151,7 @@ u16 timer0GetPrescaler(void)
// get the current prescaler setting // get the current prescaler setting
return (pgm_read_word(TimerPrescaleFactor+(inb(TCCR0) & TIMER_PRESCALE_MASK))); return (pgm_read_word(TimerPrescaleFactor+(inb(TCCR0) & TIMER_PRESCALE_MASK)));
} }
/*
u16 timer1GetPrescaler(void) u16 timer1GetPrescaler(void)
{ {
// get the current prescaler setting // get the current prescaler setting
@ -186,7 +188,8 @@ void timerDetach(u08 interruptNum)
// set the interrupt function to run nothing // set the interrupt function to run nothing
TimerIntFunc[interruptNum] = 0; TimerIntFunc[interruptNum] = 0;
} }
} }
*/
/* /*
u32 timerMsToTics(u16 ms) u32 timerMsToTics(u16 ms)
{ {
@ -203,7 +206,8 @@ u16 timerTicsToMs(u32 tics)
// calculate the number of milliseconds in x timer tics // calculate the number of milliseconds in x timer tics
return (tics*1000*(prescaleDiv*256))/F_CPU; return (tics*1000*(prescaleDiv*256))/F_CPU;
} }
*/ */
void timerPause(unsigned short pause_ms) void timerPause(unsigned short pause_ms)
{ {
// pauses for exactly <pause_ms> number of milliseconds // pauses for exactly <pause_ms> number of milliseconds
@ -272,13 +276,14 @@ void timer2ClearOverflowCount(void)
// clear the timer overflow counter registers // clear the timer overflow counter registers
Timer2Reg0 = 0; // initialize time registers Timer2Reg0 = 0; // initialize time registers
} }
/*
long timer2GetOverflowCount(void) long timer2GetOverflowCount(void)
{ {
// return the current timer overflow count // return the current timer overflow count
// (this is since the last timer2ClearOverflowCount() command was called) // (this is since the last timer2ClearOverflowCount() command was called)
return Timer2Reg0; return Timer2Reg0;
} }
*/
#endif #endif
void timer1PWMInit(u08 bitRes) void timer1PWMInit(u08 bitRes)