forked from Imagelibrary/rtems
2009-08-06 Xi Yang <hiyangxi@gmail.com>
* pxa255/clock/clock.c: Adjust clock for Skyeye. Joel added empty nanoseconds since last tick handler.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2009-08-06 Xi Yang <hiyangxi@gmail.com>
|
||||||
|
|
||||||
|
* pxa255/clock/clock.c: Adjust clock for Skyeye. Joel added empty
|
||||||
|
nanoseconds since last tick handler.
|
||||||
|
|
||||||
2009-08-04 Xi Yang <hiyangxi@gmail.com>
|
2009-08-04 Xi Yang <hiyangxi@gmail.com>
|
||||||
|
|
||||||
* pxa255/clock/clock.c: Move parentheses to improve math. More tests
|
* pxa255/clock/clock.c: Move parentheses to improve math. More tests
|
||||||
|
|||||||
@@ -27,6 +27,17 @@
|
|||||||
|
|
||||||
static unsigned long period_num;
|
static unsigned long period_num;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the nanoseconds since last tick
|
||||||
|
*/
|
||||||
|
uint32_t clock_driver_get_nanoseconds_since_last_tick(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define Clock_driver_nanoseconds_since_last_tick \
|
||||||
|
clock_driver_get_nanoseconds_since_last_tick
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enables clock interrupt.
|
* Enables clock interrupt.
|
||||||
*
|
*
|
||||||
@@ -40,7 +51,11 @@ static void clock_isr_on(const rtems_irq_connect_data *unused)
|
|||||||
/* enable timer interrupt */
|
/* enable timer interrupt */
|
||||||
XSCALE_OS_TIMER_IER |= 0x1;
|
XSCALE_OS_TIMER_IER |= 0x1;
|
||||||
|
|
||||||
|
#if ON_SKYEYE==1
|
||||||
|
period_num = (TIMER_RATE* Configuration.microseconds_per_tick)/100000;
|
||||||
|
#else
|
||||||
period_num = (TIMER_RATE* Configuration.microseconds_per_tick)/10000;
|
period_num = (TIMER_RATE* Configuration.microseconds_per_tick)/10000;
|
||||||
|
#endif
|
||||||
|
|
||||||
XSCALE_OS_TIMER_MR0 = XSCALE_OS_TIMER_TCR + period_num;
|
XSCALE_OS_TIMER_MR0 = XSCALE_OS_TIMER_TCR + period_num;
|
||||||
}
|
}
|
||||||
@@ -90,7 +105,11 @@ rtems_irq_connect_data clock_isr_data = {
|
|||||||
|
|
||||||
void Clock_driver_support_initialize_hardware(void)
|
void Clock_driver_support_initialize_hardware(void)
|
||||||
{
|
{
|
||||||
|
#if ON_SKYEYE==1
|
||||||
|
period_num = (TIMER_RATE* Configuration.microseconds_per_tick)/100000;
|
||||||
|
#else
|
||||||
period_num = (TIMER_RATE* Configuration.microseconds_per_tick)/10000;
|
period_num = (TIMER_RATE* Configuration.microseconds_per_tick)/10000;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user