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

📄 optical.s

📁 Cypress cy7c63318 鼠标开发板的源代码
💻 S
字号:
	.module optical.c
	.area data(ram, con, rel)
_opticalSensorON::
	.blkb 1
	.area idata
	.byte 0
	.area data(ram, con, rel)
	.dbfile ./optical.c
	.dbsym e opticalSensorON _opticalSensorON c
	.area text(rom, con, rel)
	.dbfile ./optical.c
	.dbfunc e optical_init _optical_init fV
;        prod_id -> X+1
;    status_data -> X+0
_optical_init::
	.dbline -1
	push X
	mov X,SP
	add SP,2
	.dbline 138
	.dbline 143
	push X
	xcall _SPIM_Start
	pop X
	.dbline 148
	mov A,0
	push A
	mov A,10
	push A
	xcall _timer_delay_msec
	add SP,-2
	.dbline 151
	mov A,-128
	push A
	mov A,64
	push A
	xcall _adns_write
	.dbline 155
	mov A,0
	push A
	mov A,100
	push A
	xcall _timer_delay_msec
	add SP,-4
	.dbline 157
	mov A,32
	push A
	mov A,64
	push A
	xcall _adns_write
	.dbline 158
	mov [_opticalSensorON],1
	.dbline 161
	mov A,65
	push A
	xcall _adns_read
	add SP,-3
	mov [X+0],A
	.dbline 162
	mov A,[X+0]
	and A,-32
	mov [X+1],A
	.dbline 164
	cmp [X+1],64
	jz L2
	.dbline 165
	mov [_opticalSensorON],0
L2:
	.dbline -2
	.dbline 167
; //--------------------------------------------------------------------------
; //
; // Filename optical.c
; //
; // Description:
; //
; /// \file
; /// This module implements an interface or reading mouse movement with an
; /// Agilent optical chip.
; //
; //--------------------------------------------------------------------------
; // $Archive: /WiredUSB/Wired USB Kits/CY4623 - Mouse RDK/DocSrc/CD_Root/Firmware/CY4623/optical.c $
; // $Modtime: 9/01/05 2:54p $
; // $Revision: 7 $
; //--------------------------------------------------------------------------
; //
; // Copyright 2003-2005, Cypress Semiconductor Corporation.
; //
; // This software is owned by Cypress Semiconductor Corporation (Cypress)
; // and is protected by and subject to worldwide patent protection (United
; // States and foreign), United States copyright laws and international
; // treaty provisions. Cypress hereby grants to licensee a personal,
; // non-exclusive, non-transferable license to copy, use, modify, create
; // derivative works of, and compile the Cypress Source Code and derivative
; // works for the sole purpose of creating custom software in support of
; // licensee product to be used only in conjunction with a Cypress integrated
; // circuit as specified in the applicable agreement. Any reproduction,
; // modification, translation, compilation, or representation of this
; // software except as specified above is prohibited without the express
; // written permission of Cypress.
; //
; // Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
; // WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
; // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
; // Cypress reserves the right to make changes without further notice to the
; // materials described herein. Cypress does not assume any liability arising
; // out of the application or use of any product or circuit described herein.
; // Cypress does not authorize its products for use as critical components in
; // life-support systems where a malfunction or failure may reasonably be
; // expected to result in significant injury to the user. The inclusion of
; // Cypress

⌨️ 快捷键说明

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