Browse Source

ARC: BSP: Fix timer call-backs

In [1] we prefixed ARC Timer functions with "arc_"
and now we need to accommodate that change in RT-Thread
accordingly.

[1] https://github.com/foss-for-synopsys-dwc-arc-processors/embarc_bsp/commit/86a03d4bf99c8afad68c4c6a5941cda7a41dd4fe
Alexey Brodkin 2 years ago
parent
commit
4ee100eb86
1 changed files with 3 additions and 3 deletions
  1. 3 3
      bsp/synopsys/boards/drivers/rt_board.c

+ 3 - 3
bsp/synopsys/boards/drivers/rt_board.c

@@ -302,7 +302,7 @@ void rt_hw_board_init()
 
 
 static void rt_hw_timer_isr(int vector, void *param)
 static void rt_hw_timer_isr(int vector, void *param)
 {
 {
-    timer_int_clear(BOARD_OS_TIMER_ID);
+    arc_timer_int_clear(BOARD_OS_TIMER_ID);
     rt_tick_increase();
     rt_tick_increase();
 }
 }
 
 
@@ -312,8 +312,8 @@ int rt_hw_timer_init(void)
     unsigned int cyc = BOARD_CPU_CLOCK / RT_TICK_PER_SECOND;
     unsigned int cyc = BOARD_CPU_CLOCK / RT_TICK_PER_SECOND;
 
 
     int_disable(BOARD_OS_TIMER_INTNO); /* disable os timer interrupt */
     int_disable(BOARD_OS_TIMER_INTNO); /* disable os timer interrupt */
-    timer_stop(BOARD_OS_TIMER_ID);
-    timer_start(BOARD_OS_TIMER_ID, TIMER_CTRL_IE | TIMER_CTRL_NH, cyc);
+    arc_timer_stop(BOARD_OS_TIMER_ID);
+    arc_timer_start(BOARD_OS_TIMER_ID, TIMER_CTRL_IE | TIMER_CTRL_NH, cyc);
 
 
     int_handler_install(BOARD_OS_TIMER_INTNO, (INT_HANDLER_T)rt_hw_timer_isr);
     int_handler_install(BOARD_OS_TIMER_INTNO, (INT_HANDLER_T)rt_hw_timer_isr);
     int_pri_set(BOARD_OS_TIMER_INTNO, INT_PRI_MIN + 1); /* currently, firq(INT_PRI_MIN) not supported*/
     int_pri_set(BOARD_OS_TIMER_INTNO, INT_PRI_MIN + 1); /* currently, firq(INT_PRI_MIN) not supported*/