diff options
Diffstat (limited to 'c/src/lib/libbsp/mips/jmr3904/clock/clockdrv.c')
-rw-r--r-- | c/src/lib/libbsp/mips/jmr3904/clock/clockdrv.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/c/src/lib/libbsp/mips/jmr3904/clock/clockdrv.c b/c/src/lib/libbsp/mips/jmr3904/clock/clockdrv.c index b603ab3115..d564b0831e 100644 --- a/c/src/lib/libbsp/mips/jmr3904/clock/clockdrv.c +++ b/c/src/lib/libbsp/mips/jmr3904/clock/clockdrv.c @@ -1,9 +1,9 @@ /* * Instantiate the clock driver shell. * - * The tx3904 simulator in gdb counts instructions. + * The TX3904 simulator in gdb counts instructions. * - * COPYRIGHT (c) 1989-2006. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -21,8 +21,6 @@ #define CLOCK_VECTOR TX3904_IRQ_TMR0 -#define Clock_driver_support_at_tick() - /* * 5000 clicks per tick ISR is HIGHLY arbitrary */ @@ -30,8 +28,12 @@ #define CLICKS 5000 #define Clock_driver_support_install_isr( _new, _old ) \ do { \ - uint32_t _clicks = CLICKS; \ _old = set_vector( _new, CLOCK_VECTOR, 1 ); \ + } while(0) + +#define Clock_driver_support_initialize_hardware() \ + do { \ + uint32_t _clicks = CLICKS; \ TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_CCDR, 0x3 ); \ TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_CPRA, _clicks ); \ TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_TISR, 0x00 ); \ @@ -40,7 +42,7 @@ *((volatile uint32_t*) 0xFFFFC01C) = 0x00000700; \ } while(0) -#define Clock_driver_support_initialize_hardware() +#define Clock_driver_support_at_tick() #define Clock_driver_support_shutdown_hardware() |