⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 i2c.lst

📁 演示了如何开发WINDOES下I/O口驱动
💻 LST
📖 第 1 页 / 共 5 页
字号:
A51 MACRO ASSEMBLER  I2C                                                                    22/07/99 12:36:44 PAGE     1


DOS MACRO ASSEMBLER A51 V5.28m
OBJECT MODULE PLACED IN I2C.OBJ
ASSEMBLER INVOKED BY: C:\ANCHOR\KEIL2K\BIN\A51.EXE I2C.A51 RB(0) DB EP

LOC  OBJ            LINE     SOURCE

                       1     NAME    I2Cbridge
                       2     
                       3     $INCLUDE(../Declare.A51)
                =1     4     ; This module declares the variables and constants used in the examples
                =1     5     ; It is common to all of the examples
                =1     6     ;
                =1     7     ; Declare Special Function Registers used
  00A8          =1     8     EI              DATA    0A8H
  00E8          =1     9     EIE             DATA    0E8H    ; EZ-USB specific
  0091          =1    10     EXIF            DATA    091H    ; EZ-USB specific
  00D8          =1    11     EICON           DATA    0D8H    ; EZ-USB specific
  0092          =1    12     PageReg         DATA    092H    ; EZ-USB specific, used with MOVX @Ri
  0086          =1    13     DPS             DATA    086H    ; EZ-USB specific, used with dual data pointers
                =1    14     ;
                =1    15     ; "External" memory locations used, EZ-USB specific
                =1    16     ; Note that most of these variables are in Page 7FH
  7FE8          =1    17     SETUPDAT        EQU     07FE8H
  7FD4          =1    18     SUDPTR          EQU     07FD4H
  7FB4          =1    19     EP0Control      EQU     07FB4H
  7F00          =1    20     EP0InBuffer     EQU     07F00H
  7EC0          =1    21     EP0OutBuffer    EQU     07EC0H          ; Not in Page 7FH
  7E80          =1    22     EP1InBuffer     EQU     07E80H          ; Not in Page 7FH
  7FB5          =1    23     IN0ByteCount    EQU     07FB5H
  7FC5          =1    24     Out0ByteCount   EQU     07FC5H
  7FB7          =1    25     IN1ByteCount    EQU     07FB7H
  7FAC          =1    26     IN07IEN         EQU     07FACH
  7FA9          =1    27     IN07IRQ         EQU     07FA9H
  7FAD          =1    28     OUT07IEN        EQU     07FADH
  7FAA          =1    29     OUT07IRQ        EQU     07FAAH
  7FAE          =1    30     USBIEN          EQU     07FAEH
  7FAB          =1    31     USBIRQ          EQU     07FABH
  7FD6          =1    32     USBControl      EQU     07FD6H
  7FA6          =1    33     I2CData         EQU     07FA6H
  7FA5          =1    34     I2CControl      EQU     07FA5H
  7F99          =1    35     PortA_PINS      EQU     07F99H
  7F9A          =1    36     PortB_PINS      EQU     07F9AH
  7F93          =1    37     PortA_Config    EQU     07F93H
  7F94          =1    38     PortB_Config    EQU     07F94H
  7F96          =1    39     PortA_OUT       EQU     07F96H
  7F9C          =1    40     PortA_OE        EQU     07F9CH
  7F9D          =1    41     PortB_OE        EQU     07F9DH
                =1    42     ;
                =1    43     ; Byte Variables
                =1    44                     
----            =1    45                     DSEG    AT 20H
0020            =1    46     FLAGS:          DS      1       ; This register is bit-addressable
                =1    47     ; Bit Variables
  0000          =1    48     Configured      EQU     FLAGS.0 ; Is this device configured
  0001          =1    49     STALL           EQU     FLAGS.1 ; Need to STALL endpoint 0
  0002          =1    50     SendData        EQU     FLAGS.2 ; Need to send data to PC Host
  0003          =1    51     IsDescriptor    EQU     FLAGS.3 ; Enable a shortcut reply
                =1    52     ;
0021            =1    53     MonitorSpace:   DS      1FH     ; Used by Dscope
0040            =1    54     Temp:           DS      1       ; A temporary working register
0041            =1    55     Idle_Time:      DS      1       ; The time the PC host wants us to wait
0042            =1    56     Expired_Time:   DS      1       ; A downcounter for timed Reports
0043            =1    57     ReplyBuffer:    DS      3       ; First byte is Count
                =1    58     ;
A51 MACRO ASSEMBLER  I2C                                                                    22/07/99 12:36:44 PAGE     2

                =1    59     ; Declare the specific variables used by each of the examples
  0046          =1    60     Overlay         EQU     $
0046            =1    61     Old_Buttons:    DS      1       ; Used by BAL: stores current button position
0047            =1    62     LEDstrobe:      DS      1       ; Used by BAL: strobe one LED on at a time
0048            =1    63     LEDvalue:       DS      1       ; Used by BAL: stores current LED value
0049            =1    64     Msec_Counter:   DS      1       ; Used by BAL: counts up to 4 msec
                =1    65     
0046            =1    66                     ORG Overlay     ; Overlay the variables (only one set in use at any one tim
                             e)
0046            =1    67     I2CDataByte:    DS      1       ; Used by I2C: keep a local copy of data read from I2C bus
                =1    68     
0046            =1    69                     ORG Overlay
0046            =1    70     LightValues:    DS      6       ; Used by LP: local buffer for light brightness
                =1    71     
0046            =1    72                     ORG Overlay
0046            =1    73     LimitValues:    DS      12      ; Used by Temps: local buffer for limits
                =1    74     
0046            =1    75                     ORG Overlay
0046            =1    76     LEDBuffer:      DS      42      ; Used by RB: local buffer for reader board
                =1    77     ;
                      78     $INCLUDE(../Vectors.A51)
                =1    79     ; This module is common to all of the examples.
                =1    80     ; It contains all of the interrupt vector declarations and
                =1    81     ; the first level interrupt servicing (register save, call subroutine,
                =1    82     ; clear interrupt source, restore registers, return)
                =1    83     ; Suspend and Resume are handled totally in this module
                =1    84     ;
                =1    85     ; A Reset sends us to Program space location 0
----            =1    86             CSEG AT 0               ; Code space
                =1    87             USING 0                 ; Reset forces Register Bank 0
0000 020360     =1    88             LJMP    Reset
                =1    89     ;
                =1    90     ; The interrupt vector table is also located here
                =1    91     ; EZ-USB has two levels of USB interrupts:
                =1    92     ; 1-the main level is described in this table (at ORG 43H)
                =1    93     ; 2-there are 21 sources of USB interrupts and these are described in USB_ISR
                =1    94     ; This means that two levels of acknowledgement and clearing will be required   
                =1    95     ;       LJMP    INT0_ISR        ; Features not used are commented out
                =1    96     ;       ORG     0BH
                =1    97     ;       LJMP    Timer0_ISR
                =1    98     ;       ORG     13H
                =1    99     ;       LJMP    INT1_ISR
                =1   100     ;       ORG     1BH
                =1   101     ;       LJMP    Timer1_ISR
                =1   102     ;       ORG     23H
                =1   103     ;       LJMP    UART0_ISR
                =1   104     ;       ORG     2BH
                =1   105     ;       LJMP    Timer2_ISR
                =1   106     ;       ORG     33H
                =1   107     ;       LJMP    WakeUp_ISR
                =1   108     ;       ORG     3BH
                =1   109     ;       LJMP    UART1_ISR
0043            =1   110             ORG     43H
0043 020100     =1   111             LJMP    USB_ISR         ; Auto Vector will replace byte 45H
                =1   112     ;       ORG     4BH
                =1   113     ;       LJMP    I2C_ISR
                =1   114     ;       ORG     53H
                =1   115     ;       LJMP    INT4_ISR
                =1   116     ;       ORG     5BH
                =1   117     ;       LJMP    INT5_ISR
                =1   118     ;       ORG     63H
                =1   119     ;       LJMP    INT6_ISR
                =1   120     
00E0            =1   121             ORG     0E0H            ; Keep out of the way of dScope monitor
                =1   122                                     ; If you are not using dScope then this memory hole
                =1   123                                     ; may be used for useful routines.
A51 MACRO ASSEMBLER  I2C                                                                    22/07/99 12:36:44 PAGE     3

0100            =1   124             ORG     100H    
0100 02013C     =1   125     USB_ISR:LJMP    SUDAV_ISR
0103 00         =1   126             DB      0               ; Pad entries to 4 bytes
0104 020158     =1   127             LJMP    SOF_ISR
0107 00         =1   128             DB      0
0108 020118     =1   129             LJMP    SUTOK_ISR
010B 00         =1   130             DB      0
010C 020129     =1   131             LJMP    Suspend_ISR
010F 00         =1   132             DB      0
0110 020120     =1   133             LJMP    USBReset_ISR
0113 00         =1   134             DB      0
0114 020118     =1   135             LJMP    Reserved
0117 00         =1   136             DB      0
                =1   137     ;       LJMP    EP0In_ISR       ; Endpoint Interrupts are not used in these examples
                =1   138     ;       DB      0               ; Comment out features not used
                =1   139     ;       LJMP    EP0Out_ISR
                =1   140     ;       DB      0
                =1   141     ;       LJMP    EP1In_ISR
                =1   142     ;       DB      0
                =1   143     ;       LJMP    EP1Out_ISR
                =1   144     ;       DB      0
                =1   145     ;       LJMP    EP2In_ISR
                =1   146     ;       DB      0
                =1   147     ;       LJMP    EP2Out_ISR
                =1   148     ;       DB      0
                =1   149     ;       LJMP    EP3In_ISR
                =1   150     ;       DB      0
                =1   151     ;       LJMP    EP3Out_ISR
                =1   152     ;       DB      0
                =1   153     ;       LJMP    EP4In_ISR
                =1   154     ;       DB      0
                =1   155     ;       LJMP    EP4Out_ISR
                =1   156     ;       DB      0
                =1   157     ;       LJMP    EP5In_ISR
                =1   158     ;       DB      0
                =1   159     ;       LJMP    EP5Out_ISR
                =1   160     ;       DB      0
                =1   161     ;       LJMP    EP6In_ISR
                =1   162     ;       DB      0
                =1   163     ;       LJMP    EP6Out_ISR
                =1   164     ;       DB      0
                =1   165     ;       LJMP    EP7In_ISR
                =1   166     ;       DB      0
                =1   167     ;       LJMP    EP7Out_ISR              
                =1   168     ; End of Interrupt Vector tables
                =1   169     
                =1   170     ; When a feature is used insert the required interrupt processing here
                =1   171     ; The example use only used Endpoints 0 and 1 and also SOF for timing
0118            =1   172     Reserved:
0118            =1   173     INT0_ISR:
0118            =1   174     Timer0_ISR:
0118            =1   175     INT1_ISR:
0118            =1   176     Timer1_ISR:
0118            =1   177     UART0_ISR:
0118            =1   178     Timer2_ISR:
0118            =1   179     UART1_ISR:
0118            =1   180     I2C_ISR:
0118            =1   181     INT4_ISR:
0118            =1   182     INT5_ISR:
0118            =1   183     INT6_ISR:
0118            =1   184     SUTOK_ISR:
0118            =1   185     EP0In_ISR:

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -