sapi: Use rtems_config*_get_microseconds_per_tick

This commit is contained in:
Sebastian Huber
2012-11-06 10:34:42 +01:00
parent dd40e1438b
commit 5e86086f1e
6 changed files with 12 additions and 12 deletions

View File

@@ -90,7 +90,7 @@ void Install_clock(
rtems_isr_entry clock_isr )
{
Clock_driver_ticks = 0;
Clock_isrs = (int)(Configuration.microseconds_per_tick / 1000);
Clock_isrs = (int)(rtems_configuration_get_microseconds_per_tick() / 1000);
/* led_putnum('c'); * for debugging purposes */
Old_ticker = (rtems_isr_entry) set_vector( clock_isr, CLOCK_VECTOR, 1 );

View File

@@ -60,7 +60,7 @@ static void Clock_driver_support_shutdown_hardware(void)
/*
* Set up the clock hardware
*
* We need to have 1 interrupt every BSP_Configuration.microseconds_per_tick
* We need to have 1 interrupt every rtems_configuration_get_microseconds_per_tick()
*/
static void Clock_driver_support_initialize_hardware(void)
{
@@ -68,7 +68,7 @@ static void Clock_driver_support_initialize_hardware(void)
uint32_t pmr;
uint32_t preScaleCode = 0;
uint32_t clk = bsp_get_CPU_clock_speed() >> 1;
uint32_t tps = 1000000 / Configuration.microseconds_per_tick;
uint32_t tps = 1000000 / rtems_configuration_get_microseconds_per_tick();
while (preScaleCode < 15) {
pmr = (clk >> preScaleCode) / tps;

View File

@@ -52,7 +52,7 @@ static void Clock_driver_support_shutdown_hardware(void)
/*
* Set up the clock hardware
*
* We need to have 1 interrupt every BSP_Configuration.microseconds_per_tick
* We need to have 1 interrupt every BSP_rtems_configuration_get_microseconds_per_tick()
*/
static void Clock_driver_support_initialize_hardware(void)
{
@@ -60,7 +60,7 @@ static void Clock_driver_support_initialize_hardware(void)
uint32_t pmr;
uint32_t preScaleCode = 0;
uint32_t clk = bsp_get_CPU_clock_speed() >> 1;
uint32_t tps = 1000000 / Configuration.microseconds_per_tick;
uint32_t tps = 1000000 / rtems_configuration_get_microseconds_per_tick();
while (preScaleCode < 15) {
pmr = (clk >> preScaleCode) / tps;

View File

@@ -59,7 +59,7 @@ static void Clock_driver_support_shutdown_hardware(void)
/*
* Set up the clock hardware
*
* We need to have 1 interrupt every BSP_Configuration.microseconds_per_tick
* We need to have 1 interrupt every rtems_configuration_get_microseconds_per_tick()
*/
static void Clock_driver_support_initialize_hardware(void)
{
@@ -67,7 +67,7 @@ static void Clock_driver_support_initialize_hardware(void)
uint32_t pmr;
uint32_t preScaleCode = 0;
uint32_t clk = bsp_get_BUS_clock_speed();
uint32_t tps = 1000000 / Configuration.microseconds_per_tick;
uint32_t tps = 1000000 / rtems_configuration_get_microseconds_per_tick();
while (preScaleCode < 15) {
pmr = (clk >> preScaleCode) / tps;

View File

@@ -50,9 +50,9 @@ static void clock_isr_on(const rtems_irq_connect_data *unused)
XSCALE_OS_TIMER_IER |= 0x1;
#if ON_SKYEYE==1
period_num = (TIMER_RATE* Configuration.microseconds_per_tick)/100000;
period_num = (TIMER_RATE* rtems_configuration_get_microseconds_per_tick())/100000;
#else
period_num = (TIMER_RATE* Configuration.microseconds_per_tick)/10000;
period_num = (TIMER_RATE* rtems_configuration_get_microseconds_per_tick())/10000;
#endif
XSCALE_OS_TIMER_MR0 = XSCALE_OS_TIMER_TCR + period_num;
@@ -103,9 +103,9 @@ rtems_irq_connect_data clock_isr_data = {
void Clock_driver_support_initialize_hardware(void)
{
#if ON_SKYEYE==1
period_num = (TIMER_RATE* Configuration.microseconds_per_tick)/100000;
period_num = (TIMER_RATE* rtems_configuration_get_microseconds_per_tick())/100000;
#else
period_num = (TIMER_RATE* Configuration.microseconds_per_tick)/10000;
period_num = (TIMER_RATE* rtems_configuration_get_microseconds_per_tick())/10000;
#endif
}