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

📄 lpnonstreaming.lst

📁 Cypress公司开发的2.4G无线键盘鼠标及其Bridge源代码
💻 LST
📖 第 1 页 / 共 5 页
字号:


HI-TECH Software Macro Assembler (PSoC MCU) V9.60PL4
                                                                                                           Thu Jul 17 10:42:59 2008


     1                          ;--------------------------------------------------------------------------
     2                          ;
     3                          ;  Filename:     lpRadio.inc
     4                          ;
     5                          ;  Description:  Include file which defines the macros for the LP radio 
     6                          ;                driver.
     7                          ;
     8                          ;--------------------------------------------------------------------------
     9                          ; WirelessUSB LP Radio Driver Version 1.2
    10                          ;--------------------------------------------------------------------------
    11                          ;
    12                          ; Copyright 2005-2006, Cypress Semiconductor Corporation.
    13                          ;
    14                          ; This software is owned by Cypress Semiconductor Corporation (Cypress)
    15                          ; and is protected by and subject to worldwide patent protection (United
    16                          ; States and foreign), United States copyright laws and international
    17                          ; treaty provisions. Cypress hereby grants to licensee a personal,
    18                          ; non-exclusive, non-transferable license to copy, use, modify, create
    19                          ; derivative works of, and compile the Cypress Source Code and derivative
    20                          ; works for the sole purpose of creating custom software in support of
    21                          ; licensee product to be used only in conjunction with a Cypress integrated
    22                          ; circuit as specified in the applicable agreement. Any reproduction,
    23                          ; modification, translation, compilation, or representation of this
    24                          ; software except as specified above is prohibited without the express
    25                          ; written permission of Cypress.
    26                          ;
    27                          ; Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
    28                          ; WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    29                          ; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
    30                          ; Cypress reserves the right to make changes without further notice to the
    31                          ; materials described herein. Cypress does not assume any liability arising
    32                          ; out of the application or use of any product or circuit described herein.
    33                          ; Cypress does not authorize its products for use as critical components in
    34                          ; life-support systems where a malfunction or failure may reasonably be
    35                          ; expected to result in significant injury to the user. The inclusion of
    36                          ; Cypress' product in a life-support systems application implies that the
    37                          ; manufacturer assumes all risk of such use and in doing so indemnifies
    38                          ; Cypress against all charges.
    39                          ;
    40                          ; Use may be limited by and subject to the applicable Cypress software
    41                          ; license agreement.
    42                          ;
    43                          ;--------------------------------------------------------------------------
    44                          
    45                          
    46                          ;-----------------------------------------------------------------------------
    47                          ;
    48                          ; LP_SPI selects whether a PSOC or EnCoReII/PRoC-LP SPI module is used
    49                          ;
    50                          ;-----------------------------------------------------------------------------
    51                                                  
    52  0000                    LP_SPI:       EQU     1    ; 1 = PSoC SPI
    53                          ;LP_SPI:      EQU     0    ; 0 = enCoRe II or PRoC-LP SPI
    54                          
    55                          
    56                          
    57                          ;-----------------------------------------------------------------------------
    58                          ;
    59                          ; THREE_WIRE_SPI selects whether 3 or 4 wire SPI interface is used
    60                          ;
    61                          ;-----------------------------------------------------------------------------
    62  0000                    THREE_WIRE_SPI: EQU     0
    63                          
    64                          
    65                          ;-----------------------------------------------------------------------------
    66                          ;
    67                          ; MUXED_IRQ selects whether MOSI is multiplexed with Radio's IRQ output
    68                          ;
    69                          ;-----------------------------------------------------------------------------
    70  0000                    MUXED_IRQ:      EQU     0
    71                          
    72                          IF (MUXED_IRQ)
    73                          LP_IRQ_MASK:    EQU     SPIM_Radio_MOSI_MASK
    74                          ENDIF
    75                          
    76                          
    77                          ;-----------------------------------------------------------------------------
    78                          ;
    79                          ; PORT_SHADOW_ENABLE - For Radio SPI Slave Select control (for PSoC Express)
    80                          ;
    81                          ; Some IO Drive Modes may cause side effects on the other 7-bits of the port
    82                          ; containing the LP_nSS bit.  Using "PORT_SHADOW_ENABLE" prevents this problem
    83                          ; (via a RAM Shadow Register), but results in a larger and slower driver.  
    84                          ; See PSoC Technical Reference Manual, Section B.6.1.1 "Digital IO".
    85                          ;
    86                          ; PORT_SHADOW_ENABLE locates an 8-bit Port_0_Data_SHADE variable on Page 0
    87                          ;  (the same page as the Radio Driver variables).
    88                          ;-----------------------------------------------------------------------------
    89  0000                    PORT_SHADOW_ENABLE:     EQU     0       ; 0 = OR/AND direct to nSS port
    90                          ;PORT_SHADOW_ENABLE:    EQU     1       ; 1 = OR/AND to RAM, write RAM to port
    91                          
    92                          
    93                          ;-----------------------------------------------------------------------------
    94                          ;
    95                          ; NOTES ON THE PSoC LARGE MEMORY MODEL (LMM) .vs. SMALL MEMORY MODEL (SMM)
    96                          ;
    97                          ; The file <memory.inc> indicates whether LMM or SMM is used.
    98                          ; LMM is available for devices with more than 256 Bytes of RAM and the 
    99                          ;  (Project,Settings,Compiler,Enable paging) box is checked in PSoC Designer.
   100                          ;  Checking the Enable paging box sets SYSTEM_LARGE_MEMORY_MODEL: equ 1
   101                          ;  in <memory.inc>.
   102                          ;
   103                          ; When using the Small Memory Model, the macros in <memory.inc> reduce to
   104                          ;  nothing, and the resulting LMM paging overhead in Radio Driver disappears.
   105                          ;
   106                          ; Using the LMM imposes certain assumptions on the user's application.  See
   107                          ;  Cypress AN2218 for details, a "summary" is below, but please obtain and 
   108                          ;  understand AN2218 before proceeding.
   109                          ;
   110                          ; 1) All internal radio driver variables are placed on Page 0.
   111                          ; 2) Rx and Tx bulk data buffers may be placed on any Page.
   112                          ; 3) Radio driver exit w/Page Mode bits UNCHANGED or set to NATIVE_PAGING
   113                          ; 4) Radio driver exits with only STK_PP preserved, except for ISR exit.
   114                          ;
   115                          ; This is consistent with the ImageCraft compiler, however calls from 
   116                          ;  assembly need to handle possible loss of Page Pointers and Page Mode 
   117                          ;  changes to NATIVE_PAGING.
   118                          ;
   119                          ;-----------------------------------------------------------------------------
   120                          
   121                          ;=============================================================================
   122                          ;=============================================================================
   123                          ;=============================================================================
   124                          ;
   125                          ;
   126                          ; EVERYTHING beyond this point is NOT NORMALLY CHANGED BY USERS
   127                          ;
   128                          ;
   129                          ;=============================================================================
   130                          ;=============================================================================
   131                          ;=============================================================================
   132                          
   133                            IF (LP_SPI)
   134                            ELSE ; enCoRe2        ; -------------------------------------------------
   135                          LP_IRQ_Data_ADDR:   equ     PRT1DR      ; LP IRQ is on Port1 
   136                          LP_nSS_Data_ADDR:   equ     PRT1DR      ; LP nSS is on Port1 
   137                            ENDIF                 ; -------------------------------------------------
   138                          
   139  0000                    CPU_F:  EQU     0xF7
   140                          
   141                          ; LP SPI Interface definitions:
   142                          ;
   143  0000                    mSPI_ADDRESS:      EQU      03Fh
   144  0000                    bSPI_WRITE:        EQU      080h
   145  0000                    bSPI_AUTO_INC:     EQU      040h
   146                                                                         
   147                          ;
   148                          ; RADIO_STATE definitions:
   149                          ;
   150  0000                    RADIO_IDLE:        EQU  00h
   151  0000                    RADIO_RX:          EQU  80h
   152  0000                    RADIO_TX:          EQU  20h
   153  0000                    RADIO_SOP:         EQU  SOFDET_IRQ
   154  0000                    RADIO_DATA:        EQU  RXB1_IRQ
   155  0000                    RADIO_COMPLETE:    EQU  RXC_IRQ         ; Code assumes these two bits are BOTH
   156  0000                    RADIO_ERROR:       EQU  RXE_IRQ         ;  in the RX_CTRL_ADR register.
   157                          
   158                          //
   159                          // Return value for a RadioAbort completed successfully. Otherwise the return value
   160                          //  is the length of the packet received (without error).
   161                          //
   162  0000                    RADIO_ABORT_SUCCESS: EQU    0xFF
     1                          ;;*****************************************************************************
     2                          ;;*****************************************************************************
     3                          ;;  FILENAME: SPIM_Radio.inc
     4                          ;;   Version: 2.5, Updated on 2006/05/18 at 10:27:31
     5                          ;;  Generated by PSoC Designer ver 4.4  b1884 : 14 Jan, 2007
     6                          ;;
     7                          ;;  DESCRIPTION:
     8                          ;;    Assembler include file of SPIM_Radio instance of SPIM
     9                          ;;    user module.
    10                          ;;-----------------------------------------------------------------------------
    11                          ;;  Copyright (c) Cypress MicroSystems 2000-2003. All Rights Reserved.
    12                          ;;*****************************************************************************
    13                          ;;*****************************************************************************
    14                          

⌨️ 快捷键说明

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