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

📄 uart_1.lis

📁 陀螺仪程序
💻 LIS
📖 第 1 页 / 共 5 页
字号:
 0004           UART_1_TX_INT_MASK:                           equ 04h
 00E1           UART_1_TX_INT_REG:                            equ 0e1h  ;TX interrupt address
 0008           UART_1_RX_INT_MASK:                           equ 08h  ;mask value for global int reg bit for RX instance
 00E1           UART_1_RX_INT_REG:                            equ 0e1h  ;RX interrupt address
 0000           
 0001           UART_1_RXBUF_ENABLE:                        equ   1
 0000           
 0000           ; Interrupt control masks
 0001           UART_1_ENABLE_RX_INT:                          equ  0x01
 0000           UART_1_DISABLE_RX_INT:                         equ  0x00
 0002           UART_1_ENABLE_TX_INT:                          equ  0x02
 0000           UART_1_DISABLE_TX_INT:                         equ  0x00
 0000           
 0000           UART_1_INT_MODE_TX_REG_EMPTY:                equ 0x00
 0001           UART_1_INT_MODE_TX_COMPLETE:                 equ 0x01
 0000           
 0000           UART_1_RX_IGNORE_BELOW:                      equ  0h
 0010           UART_1_RX_BUFFER_SIZE:                       equ  10h
 000D           UART_1_CMD_TERM:                             equ  dh
 0020           UART_1_DELIMITER:                            equ  20h
 0000           
 0000           ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 0000           ;       WARNING WARNING WARNING
 0000           ; The following equates are for backwards
 0000           ; compatibility only and should not be used
 0000           ; for new designs.
 0000           ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 0000           
 0000           ;------------------------------------
 0000           ;  Parity masks
 0000           ;------------------------------------
 0000           UART_PARITY_NONE:       equ   00h
 0002           UART_PARITY_EVEN:       equ   02h
 0006           UART_PARITY_ODD:        equ   06h
 0000           
 0000           ;------------------------------------
 0000           ;  TX Status Register masks
 0000           ;------------------------------------
 0020           UART_TX_COMPLETE:       equ   20h
 0010           UART_TX_BUFFER_EMPTY:   equ   10h
 0000           
 0000           ;------------------------------------
 0000           ;  RX Status Register masks
 0000           ;------------------------------------
 0010           UART_RX_ACTIVE:         equ   10h
 0008           UART_RX_COMPLETE:       equ   08h
 0080           UART_RX_PARITY_ERROR:   equ   80h
 0040           UART_RX_OVERRUN_ERROR:  equ   40h
 0020           UART_RX_FRAMING_ERROR:  equ   20h
 00E0           UART_RX_NO_ERROR:       equ   E0h
 0000           ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 0000           ;             END WARNING
 0000           ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 0000           
 0000           
 0000           
 0000           ;------------------------------------
 0000           ;  Parity masks
 0000           ;------------------------------------
 0000           UART_1_PARITY_NONE:                     equ   00h
 0002           UART_1_PARITY_EVEN:                     equ   02h
 0006           UART_1_PARITY_ODD:                      equ   06h
 0000           
 0000           ;------------------------------------
 0000           ;  TX Status Register masks
 0000           ;------------------------------------
 0020           UART_1_TX_COMPLETE:                     equ   20h
 0010           UART_1_TX_BUFFER_EMPTY:                 equ   10h
 0000           
 0000           ;------------------------------------
 0000           ;  RX Status Register masks
 0000           ;------------------------------------
 0010           UART_1_RX_ACTIVE:                       equ   10h
 0008           UART_1_RX_COMPLETE:                     equ   08h
 0008           UART_1_RX_REG_FULL:                     equ   08h
 0080           UART_1_RX_PARITY_ERROR:                 equ   80h
 0040           UART_1_RX_OVERRUN_ERROR:                equ   40h
 0020           UART_1_RX_FRAMING_ERROR:                equ   20h
 00E0           UART_1_RX_ERROR:                        equ   E0h
 0001           UART_1_RX_ENABLE:                       equ   01h
 0000           
 00F0           UART_1_RX_BUF_ERROR:                    equ   F0h  ; Mask for any Rx that may occur.
 0010           UART_1_RX_BUF_OVERRUN:                  equ   10h  ; This indicates the software buffer has
 0000                                                                   ; been over run.
 0001           UART_1_RX_BUF_CMDTERM:                  equ   01h  ; Command terminator has been received.
 0000           
 0001           UART_1_RX_NO_DATA:                      equ   01h
 00E0           UART_1_RX_NO_ERROR:                     equ   E0h
 0000           
 0000           
 0000           ;--------------------------------------------------
 0000           ; Registers Address Constants for UART_1
 0000           ;--------------------------------------------------
 0000           ;---------------------------------
 0000           ;  Registers used by TX
 0000           ;---------------------------------
 002B           UART_1_TX_CONTROL_REG:  equ 2bh            ; Control register
 0028           UART_1_TX_SHIFT_REG:    equ 28h               ; TX Shift Register register
 0029           UART_1_TX_BUFFER_REG:   equ 29h               ; TX Buffer Register
 0028           UART_1_TX_FUNC_REG: equ 28h             ; Function register
 0029           UART_1_TX_INPUT_REG:    equ 29h            ; Input register
 002A           UART_1_TX_OUTPUT_REG:   equ 2ah           ; Output register
 0000           
 0000           ;---------------------------------
 0000           ;  Registers used by RX
 0000           ;---------------------------------
 002F           UART_1_RX_CONTROL_REG:  equ 2fh            ; Control register
 002C           UART_1_RX_SHIFT_REG:    equ 2ch               ; RX Shift Register register
 002E           UART_1_RX_BUFFER_REG:   equ 2eh               ; RX Buffer Register
 002C           UART_1_RX_FUNC_REG: equ 2ch             ; Function register
 002D           UART_1_RX_INPUT_REG:    equ 2dh            ; Input register
 002E           UART_1_RX_OUTPUT_REG:   equ 2eh           ; Output register
 0000           
 0000           ; end of file UART_1.inc
 0000           
 0000           ;-----------------------------------------------
 0000           ;  Global Symbols
 0000           ;-----------------------------------------------
 0000           ;-------------------------------------------------------------------
 0000           ;  Declare the functions global for both assembler and C compiler.
 0000           ;
 0000           ;  Note that there are two names for each API. First name is
 0000           ;  assembler reference. Name with underscore is name refence for
 0000           ;  C compiler.  Calling function in C source code does not require
 0000           ;  the underscore.
 0000           ;-------------------------------------------------------------------
                export  UART_1_SetTxIntMode
                export _UART_1_SetTxIntMode
                export  UART_1_EnableInt
                export _UART_1_EnableInt
                export  UART_1_DisableInt
                export _UART_1_DisableInt
                
                export  UART_1_Start
                export _UART_1_Start
                export  UART_1_Stop
                export _UART_1_Stop
                export  UART_1_SendData
                export _UART_1_SendData
                export  UART_1_bReadTxStatus
                export _UART_1_bReadTxStatus
                export  UART_1_bReadRxData
                export _UART_1_bReadRxData
                export  UART_1_bReadRxStatus
                export _UART_1_bReadRxStatus
                
                export  UART_1_IntCntl
                export _UART_1_IntCntl
                
                export  UART_1_TxIntMode
                export _UART_1_TxIntMode
                
                export  UART_1_PutSHexByte
                export _UART_1_PutSHexByte
                export  UART_1_PutSHexInt
                export _UART_1_PutSHexInt
                
                export  UART_1_CPutString
                export _UART_1_CPutString
                export  UART_1_PutString
                export _UART_1_PutString
                export  UART_1_PutChar
                export _UART_1_PutChar
                export  UART_1_Write
                export _UART_1_Write
                export  UART_1_CWrite
                export _UART_1_CWrite
                
                export  UART_1_cGetChar
                export _UART_1_cGetChar
                export  UART_1_cReadChar
                export _UART_1_cReadChar
                export  UART_1_iReadChar
                export _UART_1_iReadChar
                export  UART_1_PutCRLF
                export _UART_1_PutCRLF
                
                IF (UART_1_RXBUF_ENABLE)
                export  UART_1_CmdReset
                export _UART_1_CmdReset
                export  UART_1_bCmdCheck
                export _UART_1_bCmdCheck
                export  UART_1_bCmdLength
                export _UART_1_bCmdLength
                export  UART_1_bErrCheck
                export _UART_1_bErrCheck
                
                export  UART_1_szGetParam
                export _UART_1_szGetParam
                export  UART_1_szGetRestOfParams
                export _UART_1_szGetRestOfParams
                ENDIF
                
                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
                ; WARNING WARNING WARNING
                ; The following exports are for backwards compatibility only and should
                ; not be used for new designs. They may be eliminated in a future release.
                ; Their status is "NO FURTHER MAINTENANCE". 
                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
       

⌨️ 快捷键说明

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