📄 optical.lis
字号:
.module optical.c
.area data(ram, con, rel)
0000 _opticalSensorON::
0000 .blkb 1
.area idata
0000 00 .byte 0
.area data(ram, con, rel)
0000 .dbfile ./optical.c
0000 .dbsym e opticalSensorON _opticalSensorON c
.area text(rom, con, rel)
0000 .dbfile ./optical.c
0000 .dbfunc e optical_init _optical_init fV
0000 ; prod_id -> X+1
0000 ; status_data -> X+0
0000 _optical_init::
0000 .dbline -1
0000 10 push X
0001 4F mov X,SP
0002 3802 add SP,2
0004 .dbline 138
0004 .dbline 143
0004 10 push X
0005 7C0000 xcall _SPIM_Start
0008 20 pop X
0009 .dbline 148
0009 5000 mov A,0
000B 08 push A
000C 500A mov A,10
000E 08 push A
000F 7C0000 xcall _timer_delay_msec
0012 38FE add SP,-2
0014 .dbline 151
0014 5080 mov A,-128
0016 08 push A
0017 5040 mov A,64
0019 08 push A
001A 9149 xcall _adns_write
001C .dbline 155
001C 5000 mov A,0
001E 08 push A
001F 5064 mov A,100
0021 08 push A
0022 7C0000 xcall _timer_delay_msec
0025 38FC add SP,-4
0027 .dbline 157
0027 5020 mov A,32
0029 08 push A
002A 5040 mov A,64
002C 08 push A
002D 9136 xcall _adns_write
002F .dbline 158
002F 550001 mov [_opticalSensorON],1
0032 .dbline 161
0032 5041 mov A,65
0034 08 push A
0035 90F7 xcall _adns_read
0037 38FD add SP,-3
0039 5400 mov [X+0],A
003B .dbline 162
003B 5200 mov A,[X+0]
003D 21E0 and A,-32
003F 5401 mov [X+1],A
0041 .dbline 164
0041 3D0140 cmp [X+1],64
0044 A004 jz L2
0046 .dbline 165
0046 550000 mov [_opticalSensorON],0
0049 L2:
0049 .dbline -2
0049 .dbline 167
0049 ; //--------------------------------------------------------------------------
0049 ; //
0049 ; // Filename optical.c
0049 ; //
0049 ; // Description:
0049 ; //
0049 ; /// \file
0049 ; /// This module implements an interface or reading mouse movement with an
0049 ; /// Agilent optical chip.
0049 ; //
0049 ; //--------------------------------------------------------------------------
0049 ; // $Archive: /WiredUSB/Wired USB Kits/CY4623 - Mouse RDK/DocSrc/CD_Root/Firmware/CY4623/optical.c $
0049 ; // $Modtime: 9/01/05 2:54p $
0049 ; // $Revision: 7 $
0049 ; //--------------------------------------------------------------------------
0049 ; //
0049 ; // Copyright 2003-2005, Cypress Semiconductor Corporation.
0049 ; //
0049 ; // This software is owned by Cypress Semiconductor Corporation (Cypress)
0049 ; // and is protected by and subject to worldwide patent protection (United
0049 ; // States and foreign), United States copyright laws and international
0049 ; // treaty provisions. Cypress hereby grants to licensee a personal,
0049 ; // non-exclusive, non-transferable license to copy, use, modify, create
0049 ; // derivative works of, and compile the Cypress Source Code and derivative
0049 ; // works for the sole purpose of creating custom software in support of
0049 ; // licensee product to be used only in conjunction with a Cypress integrated
0049 ; // circuit as specified in the applicable agreement. Any reproduction,
0049 ; // modification, translation, compilation, or representation of this
0049 ; // software except as specified above is prohibited without the express
0049 ; // written permission of Cypress.
0049 ; //
0049 ; // Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
0049 ; // WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
0049 ; // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
0049 ; // Cypress reserves the right to make changes without further notice to the
0049 ; // materials described herein. Cypress does not assume any liability arising
0049 ; // out of the application or use of any product or circuit described herein.
0049 ; // Cypress does not authorize its products for use as critical components in
0049 ; // life-support systems where a malfunction or failure may reasonably be
0049 ; // expected to result in significant injury to the user. The inclusion of
0049 ; // Cypress
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -