OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [h8300/] [aki3068net/] [v2_0/] [src/] [delay_us.S] - Blame information for rev 174

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
;;delay_us
2
 
3
#include 
4
 
5
#include 
6
#include 
7
#include 
8
 
9
#define DELAY_COUNT (CYGHWR_HAL_H8300_PROCESSOR_SPEED/1000000)*16/8
10
 
11
//      .file   "delay_us.S"
12
        .h8300h
13
        .text
14
 
15
        .global CYG_LABEL_DEFN(hal_delay_us)
16
CYG_LABEL_DEFN(hal_delay_us):
17
        mov.b   #0,r1l
18
        mov.b   r1l,@CYGARC_8TCNT2:8
19
        mov.b   r1l,@CYGARC_8TCSR2:8
20
        mov.b   #DELAY_COUNT+1,r1l
21
        mov.b   r1l,@CYGARC_TCORA2:8
22
        mov.b   #0x09,r1l
23
        mov.b   r1l,@CYGARC_8TCR2:8
24
        mov.b   #0,r2h
25
        sub.w   e1,e1
26
1:
27
        mov.l   er0,er0
28
        ble     3f
29
2:
30
        btst    #6,@CYGARC_8TCSR2:8
31
        beq     2b
32
        bclr    #6,@CYGARC_8TCSR2:8
33
        dec.l   #1,er0
34
        bra     1b
35
3:
36
        mov.b   #0,r0l
37
        mov.b   r0l,@CYGARC_8TCR2
38
        rts
39
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.