亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? js50.asm

?? USB大全電子版全部資料3~包含源碼、協議等
?? ASM
?? 第 1 頁 / 共 4 頁
字號:
;***********************************************************************

;				Cypress Semiconductor

; 			Joystick Demonstration Design Kit Firmware 

;

; Features :

; Four Fire Buttons

; Four Hat Buttons

; X, Y, Z movement

; Throttle

; Passes Chapter 9 and Hidview Tests 

; Includes Suspend/Resume Feature

;

; This firmware file is for demonstration purposes only.  

; Cypress Semiconductor will not assume any liability for its use.

; 

;=======================================================================

; 1/20/98	wmh	v5.0 Minor changes in One_msec_ISR

;=======================================================================

; 12/10/97	wmh	v4.9 Minor changes in One_msec_ISR, main and Reset
; Watchdog timer reset in main.

;=======================================================================

; 10/27/97	wmh	v4.8	Change in One_msec_ISR

; Code Naks whenever the joystick is not moved.

; Code also Naks after enumeration for a period approx. 230msec

; This solves blue screen problem when the power is turned off then on

;=======================================================================

; 10/13/97	wmh	v4.6	Change in USB_EP0_ISR

; SetConfiguration request was changed so as to enable endpoint 1

; GetReport is stalled

; GetReportDescriptor sends HID Report Descriptor

;=======================================================================

; 9/8/97	wmh 	v4.5 	Joystick Jitter Solved

; Jitter Solution added to GPIO_ISR 

;=======================================================================

; 8/13/97	wmh 	v4.3 	Report Descriptor Change

; Solves unusual jump in joystick movement

;=======================================================================

; 8/11/97	wmh 	v4.2	ipret change

; changed ret to ipret whenever needed in all subroutines

;=======================================================================

; 8/8/97	wmh	v4.0	One_msec and GPIO ISR changes

; Changes to prevent Endpoint_1 from interrupting capacitor charging

; to prevent jitter effect

;========================================================================

; 8/8/97	wmh 	v3.9	change in Report Descriptor

; Logical and Physical Min and Max have been changed to 3 bytes if > 127

; Other changes were also done

;========================================================================

; 7/3/97	wmh	v3.7 add features

; Suspend/Resume features have been added

; Main work done in the One_mSec_ISR

;========================================================================

; 6/30/97	wmh	v3.6 add features

; changes to allow the code to pass chapter 9 and hidview tests have been

; done.  That meant major rework of the endpoint zero interrupt service

; routine (USB_EP0_ISR).

;=======================================================

; rev 3.5	4/17/97 gwg

; Changed the interrupt mask from a constant to a variable.

; This allows us to enable only the one msec timer and

; EP0 during enumeration.

;

; Tim Williams found a problem with the hat buttons.  I

; forgot the buttons were in the upper nibble.

;=======================================================

; rev 3.4	4/15/97 gwg	664 bytes

; 1. The endpoint one ISR only toggles the Data 0/1 bit

;    now.

; 2. Every four msec, the one msec ISR writes to the

;    USB_EP1_TX_Config register to enable response to IN

;    packets from the host.

; 3. Write measured data directly into the endpoint one 

;    dma buffer.

; 4. Code compatible with revision 2 and 3 silicon.

;=======================================================

; rev 3.3       4/11/97 gwg

; modified for IPRET instruction in an effort to improve

; the runtime.

;=======================================================

; rev 3.2       4/11/97 gwg

; Tim Williams found a bug in the GPIO_ISR that prevented

; the code from working in the chip.  There was not enough

; time allowed to discharge the timing capacitors before

; interrupts were enabled.

;=======================================================

; rev 3.1       4/8/97  gwg

; Replaced Send_Buffer macro with a subroutine.

;=======================================================

; rev 3.0       4/8/97  gwg

; reworked the code to support the hat buttons and up to

; four analog channels.  The analog channels are sampled

; one per msec.  With a channel sample rate of 250 hz, 

; each channel should have a bandwidth of 125 hz - good.

; 

; The buttons are sampled in the main loop at a much

; higher rate.  

;

; The Send_Buffer macro remains a code size problem as

; the result to date is 40 bytes over 2 kilobytes.

;=======================================================

; rev 2.1       3/29/97 gwg

; reworked the code to eliminate string indices in the

; descriptors.  We don't have any strings.  Also fixed

; an error in the HID length (114 => 116 bytes)

;=======================================================

; drastic rework of js63fa.asm on 3/25 by gwg

;*******************************************************

;  This version of code supports the joystick function

;  and four buttons.

;*******************************************************

; 1. Eliminated the "scaling" feature that tried to 

;    ensure the joystick returned full-range readings.

; 2. Converted the analog measurement sections into two

;    subroutines.

; 3. Fixed several interrupt enable and stack problems

;    with the USB interrupt service routines.

; 4. Initialized the part to work correctly in a joystick:

;       - program pullup registers

;       - program Isink registers

; 5. Enabled the one msec interrupt handler to clear the

;    watchdog.

; 6. Patched the USB EP0 ISR to set the BadOuts bit to

;    accomodate changes in the chip definition.

; 7. Rewrote the USB interrupt handlers for better flow

;    and to remove redundant load instructions.

; 8. Commented the code to describe how it works. 

;*******************************************************

;               Suggested Changes

;-------------------------------------------------------

; 1. Convert the Send_Buffer macro to a subroutine to

;    reduce the code size.  The current version is 2 KB

;    plus 22 bytes.

; 2. Add hat support as either:

;       - third analog channel (software only)

;       - four buttons (rework hardware)

; 3. Add throttle support as another analog channel.

;    Consolidate the measure subroutines into one routine

;    that can process a selectable channel.

;*******************************************************

;               Suggestions for the Assembler

;-------------------------------------------------------

; 1. The assembler should be able to assign variable

;    addresses automatically.  One method is the concept

;    of segments: "data" and "code".  An ORG directive

;    would include a parameter to indicate which type of

;    segment was intended.  Then DB, DW, etc. would

;    allocate variable space and automatically assign 

;    the addresses.

; 2. We need a linker that allows us to write modular

;    code and link modules together.   

; 3. Conditional assembly directives would be useful to

;    write common code to support multiple parts.

;*******************************************************



;**************** assembler directives ***************** 



label:          XPAGEON



; I/O ports

Port0_Data:            equ     00h      ; GPIO data port 0

Port1_Data:            equ     01h      ; GPIO data port 1

Port0_Interrupt:       equ     04h      ; Interrupt enable for port 0

Port1_Interrupt:       equ     05h      ; Interrupt enable for port 1

Port0_Pullup:          equ     08h      ; Pullup resistor control for port 0

Port1_Pullup:          equ     09h      ; Pullup resistor control for port 1



; USB ports

USB_EP0_TX_Config:      equ     10h     ; USB EP0 transmit configuration

USB_EP1_TX_Config:      equ     11h     ; USB EP1 transmit configuration

USB_Device_Address:     equ     12h     ; USB device address assigned by host

USB_Status_Control:     equ     13h     ; USB status and control register

USB_EP0_RX_Status:      equ     14h     ; USB EP0 receive status



; control ports

Global_Interrupt:       equ     20h     ; Global interrupt enable

Watchdog:               equ     21h     ; clear watchdog Timer

Timer:                  equ     23h     ; free-running Timer



; GPIO Isink registers

Port0_Isink:            equ     30h

Port0_Isink0:           equ     30h

Port0_Isink1:           equ     31h

Port0_Isink2:           equ     32h

Port0_Isink3:           equ     33h

Port0_Isink4:           equ     34h

Port0_Isink5:           equ     35h

Port0_Isink6:           equ     36h

Port0_Isink7:           equ     37h



Port1_Isink:            equ     38h

Port1_Isink0:           equ     38h

Port1_Isink1:           equ     39h

Port1_Isink2:           equ     3Ah

Port1_Isink3:           equ     3Bh



; control port

Status_Control:         equ     FFh



; constants - gwg

BUTTON_MASK:            equ     0Fh     ; button bits

HAT_MASK:               equ     F0h     ; hat bits

FORWARD:                equ     1       ; hat forward

RIGHT:                  equ     3       ; hat right

BACK:                   equ     5       ; hat back

LEFT:                   equ     7       ; hat left

;**********  Register constants  ************************************

; Processor Status and Control

RunBit:			equ	 1h	; CPU Run bit

USBReset:			equ	20h	; USB Bus Reset bit

WatchDogReset:		equ	40h	; Watchdog Reset bit



; interrupt masks

TIMER_ONLY:			equ	 4h	; one msec timer



ENUMERATE_MASK:		equ	0Ch	; one msec timer 	

						; USB EP0 interrupt



RUNTIME_MASK:		equ     5Ch     	; one msec timer

							; USB EP0 interrupt

							; USB EP1 interrupt

							; GPIO interrupt

; USB EP1 transmit configuration

DataToggle:			equ	40h	; Data 0/1 bit



;========================================================================

; constant declarations

;========================================================================

; from USB Spec v1.0 from page 175

;------------------------------------------------------------------------

; standard request codes

get_status:             equ   0

clear_feature:          equ   1

set_feature:            equ   3

set_address:            equ   5

get_descriptor:         equ   6

set_descriptor:         equ   7

get_configuration:      equ   8

set_configuration:      equ   9

get_interface:          equ  10 

set_interface:          equ  11 

synch_frame:            equ  12



; standard descriptor types

device:         	equ  1

configuration:  	equ  2

string:         	equ  3

interface:      	equ  4

endpoint:       	equ  5



; standard feature selectors

endpoint_stalled:       equ  0		; recipient endpoint

device_remote_wakeup:   equ  1		; recipient device

 

;========================================================================

; from HID Class v1.0 Draft #4

;------------------------------------------------------------------------

; class specific descriptor types from section 7.1 Standard Requests

HID:                    equ  21h

report:                 equ  22h

physical:               equ  23h

  

; class specific request codes from section 7.2 Class Specific Requests

get_report:             equ   1

get_idle:               equ   2

get_protocol:           equ   3

set_report:             equ   9

set_idle:               equ  10

set_protocol:           equ  11



;========================================================================

; USB packet constants (debug purposes)

;------------------------------------------------------------------------

setup:          	equ  B4h

in:             	equ  96h

out:            	equ  87h

data0:          	equ  C3h

data1:          	equ  D2h

ack:            	equ  4Bh

nak:            	equ  5Ah



DISABLE_REMOTE_WAKEUP:  equ   0         ; bit[1] = 0

ENABLE_REMOTE_WAKEUP:   equ   2         ; bit[1] = 1



;========================================================================

; data variable assignments

;========================================================================



; control endpoint 0 fifo

endpoint_0:             equ  70h	; control endpoint



; definitions for SETUP packets

bmRequestType:          equ  70h

bRequest:               equ  71h

wValue:                 equ  72h        ; default wValue (8-bits)

wValueHi:               equ  73h

wIndex:                 equ  74h        ; default wIndex (8-bits)

wIndexHi:               equ  75h

wLength:                equ  76h        ; default wLength (8-bits)

wLengthHi:              equ  77h

 



; data memory variables

;------------------------------------------------------------------------

; To support the USB specification.

remote_wakeup_status:   equ  30h       	; remote wakeup request

							; zero is disabled

							; two is enabled

configuration_status:   equ  31h        	; configuration status

							; zero is unconfigured

							; one is configured

;idle_status:           equ  33h        	; support SetIdle and GetIdle

protocol_status:      	equ  34h        	; zero is boot protocol

							; one is report protocol

suspend_counter:		equ 35h		; contains number of idle bus msecs 

jitter_temp:		equ 36h	

loop_temp:			equ 37h

start_send:			equ 38h

X_Value_old:                equ  39h        

Y_Value_old:                equ  40h        

Z_Value_old:                equ  41h        

hat_bits_old:               equ  42h        

button_bits_old:            equ  43h        

Throttle_old:               equ  44h        



	

;------------------------------------------------------------------------



; variable allocations

temp:                   equ  25h

start_time:             equ  21h

testbit:                equ  22h

interrupt_mask:		equ  20h

endp0_data_toggle: 	equ  23h

loop_counter:		equ  24h

data_start:			equ  27h

data_count:			equ  28h

endpoint_stall:		equ  29h



; interrupt endpoint 1 fifo

endpoint_1:             equ  78h

X_Value:                equ  78h        ; Port 1 bit 0

Y_Value:                equ  79h        ; Port 1 bit 1

Z_Value:                equ  7Ah        ; Port 1 bit 3

hat_bits:               equ  7Bh        ; Port 0 bits 7:4

button_bits:            equ  7Ch        ; Port 0 bits 3:0

Throttle:               equ  7Dh        ; Port 1 bit 2



;*************** interrupt vector table ****************

; begin execution here after a reset

org  00h                ; Reset vector

jmp  Reset



org  02h                ; 128us interrupt

jmp  DoNothing_ISR



org  04h                ; 1024ms interrupt 

jmp  One_mSec_ISR



org  06h                ; endpoint 0 interrupt 

jmp  USB_EP0_ISR



org  08h                ; endpoint 1 interrupt 

jmp  USB_EP1_ISR



org  0Ah                ; reserved interrupt 

jmp  Reset



org  0Ch                ; general purpose I/O interrupt 

jmp  GPIO_ISR           ; not used



org  0Eh                ; Wakeup_ISR or resume interrupt 

jmp  DoNothing_ISR      ; not used





ORG  10h

;************************************************************************

; The 128 uSec, Cext, is not used by the joystick
 code.
; If this interrupt occurs, the software should do nothing

; except re-enable the interrupts.

DoNothing_ISR:

	push A                  ; save accumulator on stack

	mov A,[interrupt_mask]

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色成人在线视频| 中文字幕第一页久久| 久久久天堂av| 日韩成人免费看| 99精品国产视频| 久久综合久久综合九色| 日韩一区在线播放| 久久99国产精品久久| 欧美日韩一级片网站| 中文字幕一区二区三区四区不卡| 蜜桃免费网站一区二区三区| 在线视频观看一区| 中文字幕乱码亚洲精品一区| 精品一区二区日韩| 欧美一区二区精美| 亚洲高清一区二区三区| 91性感美女视频| 国产欧美一区二区三区在线看蜜臀 | 99久久国产免费看| 精品国产欧美一区二区| 五月激情六月综合| 欧美图区在线视频| 亚洲人吸女人奶水| 91亚洲精品久久久蜜桃| 中文字幕亚洲一区二区av在线| 国产成人无遮挡在线视频| 日韩欧美一区在线| 奇米色777欧美一区二区| 欧美裸体一区二区三区| 一区二区三区四区中文字幕| 91麻豆123| 亚洲另类一区二区| 日本高清不卡在线观看| 久久精品国产一区二区三区免费看| 欧美日韩精品欧美日韩精品一 | 久久色视频免费观看| 蜜臀精品久久久久久蜜臀| 欧美精品 国产精品| 亚洲国产精品综合小说图片区| 91成人在线观看喷潮| 亚洲大片精品永久免费| 欧美亚洲尤物久久| 日本色综合中文字幕| 日韩美女一区二区三区四区| 精品一二三四在线| 九九视频精品免费| 欧美日韩精品一二三区| 日本在线不卡一区| 日韩精品专区在线影院重磅| 国内外成人在线| 国产欧美精品一区二区三区四区| 国产91丝袜在线18| 一区二区三区国产精品| 欧美精品久久一区| 国产精品综合av一区二区国产馆| 欧美极品另类videosde| 一本到不卡免费一区二区| 亚洲成人激情综合网| 日韩午夜激情电影| 大胆亚洲人体视频| 亚洲线精品一区二区三区八戒| 欧美一区二区免费观在线| 国产乱码精品一品二品| 亚洲欧美日韩中文播放| 国产夜色精品一区二区av| 成人黄色免费短视频| 亚洲综合999| 2020国产精品自拍| 在线视频国产一区| 国产伦理精品不卡| 一区二区三区四区av| 日韩欧美成人一区二区| 91影院在线免费观看| 蜜桃av一区二区| 伊人色综合久久天天| 日韩亚洲电影在线| 色哟哟一区二区在线观看| 国产主播一区二区| 亚洲成人午夜电影| 亚洲国产成人午夜在线一区| 欧美精品 日韩| 91女神在线视频| 国产精品原创巨作av| 午夜精品久久久久久久久久| 中文字幕二三区不卡| 日韩免费看网站| 欧美视频自拍偷拍| 成人动漫在线一区| 国产在线播精品第三| 午夜精品福利久久久| 亚洲欧洲日韩综合一区二区| 欧美大片拔萝卜| 欧美日韩国产123区| 色呦呦网站一区| 成人av在线看| 国产99一区视频免费| 青青青伊人色综合久久| 亚洲国产乱码最新视频| 亚洲视频免费在线| 国产精品色哟哟| 久久久久97国产精华液好用吗| 日韩一区二区三区免费观看| 欧美日韩综合一区| 欧美在线色视频| 精品国产网站在线观看| 欧美一级高清大全免费观看| 欧美日韩精品系列| 欧美三级日韩三级| 欧美伊人久久久久久久久影院| 99国产精品久| 99久久精品费精品国产一区二区| 国产成人av一区二区三区在线 | 国产精品电影院| 国产午夜精品一区二区三区嫩草| 精品国产一区二区三区忘忧草 | 秋霞影院一区二区| 日本麻豆一区二区三区视频| 日韩国产一区二| 视频在线观看一区二区三区| 香蕉成人啪国产精品视频综合网| 一区二区高清免费观看影视大全 | 久久九九国产精品| 久久久精品综合| 国产精品伦一区二区三级视频| 国产精品色噜噜| 亚洲欧美日韩一区二区| 中文字幕一区二区三区视频| 日韩理论片网站| 一区二区三区四区亚洲| 香港成人在线视频| 欧美bbbbb| 狠狠色丁香久久婷婷综合_中| 国产乱淫av一区二区三区| 成人亚洲精品久久久久软件| 91丨九色丨蝌蚪富婆spa| 欧美性极品少妇| 日韩欧美在线一区二区三区| 国产亚洲欧美色| 一区二区三区丝袜| 麻豆精品精品国产自在97香蕉| 精品一区中文字幕| 成人黄色国产精品网站大全在线免费观看| 大白屁股一区二区视频| 日本高清视频一区二区| 91精品国产色综合久久| 国产调教视频一区| 亚洲人成亚洲人成在线观看图片| 日韩高清中文字幕一区| 国产精品一区二区三区99| 色婷婷av一区| 精品免费国产二区三区 | 亚洲靠逼com| 热久久免费视频| 成人动漫一区二区在线| 制服丝袜亚洲精品中文字幕| 中文字幕va一区二区三区| 亚洲v中文字幕| 成人午夜电影久久影院| 欧美精品色综合| 国产精品免费视频网站| 蜜桃av一区二区在线观看| 成人av先锋影音| 国产欧美日本一区视频| 日韩精品成人一区二区三区| 国产成人亚洲精品狼色在线 | 亚洲二区在线视频| 国产精品一区二区不卡| 欧美日韩精品系列| 1000部国产精品成人观看| 免费欧美高清视频| 在线看国产一区二区| 国产午夜精品一区二区三区视频 | 亚洲天堂福利av| 激情欧美日韩一区二区| 精品视频免费看| 国产精品国产自产拍在线| 久久国产综合精品| 欧美麻豆精品久久久久久| 自拍偷自拍亚洲精品播放| 国产在线视频不卡二| 欧美另类高清zo欧美| 亚洲欧美日韩人成在线播放| 国产精品1024| 精品99一区二区三区| 三级久久三级久久| 色综合视频一区二区三区高清| 国产蜜臀av在线一区二区三区| 青青青伊人色综合久久| 欧美丰满高潮xxxx喷水动漫| 一区二区三区在线免费观看| 97久久精品人人做人人爽| 久久精品在线观看| 国产在线精品一区二区| 久久综合九色综合久久久精品综合| 婷婷成人激情在线网| 欧美高清视频www夜色资源网| 亚洲成人手机在线| 精品视频在线视频| 午夜精品久久久| 欧美精品高清视频|