mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-07 01:54:26 +01:00
Commented out unused functions from timer.c to save space.
This commit is contained in:
parent
e9113e0320
commit
73612d95e0
@ -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
|
||||||
@ -58,6 +58,7 @@ 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)
|
||||||
{
|
{
|
||||||
@ -76,6 +77,7 @@ void delay_ms(unsigned char time_ms)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
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
|
||||||
@ -187,6 +189,7 @@ void timerDetach(u08 interruptNum)
|
|||||||
TimerIntFunc[interruptNum] = 0;
|
TimerIntFunc[interruptNum] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
/*
|
/*
|
||||||
u32 timerMsToTics(u16 ms)
|
u32 timerMsToTics(u16 ms)
|
||||||
{
|
{
|
||||||
@ -204,6 +207,7 @@ u16 timerTicsToMs(u32 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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user