📄 enchid.lst
字号:
0000 CPHA: equ 04h
0000 SCK_SELECT1: equ 02h
0000 SCK_SELECT0: equ 01h
0000
0000 ; Clock Configuration Register 0xF8 bit assignments
0000 EXT_DELAY: equ 80h
0000 WAKEUP_ADJUST2: equ 40h
0000 WAKEUP_ADJUST1: equ 20h
0000 WAKEUP_ADJUST0: equ 10h
0000 LVR_ENABLE: equ 08h
0000 INTERNAL_CLK: equ 02h
0000 EXTERNAL_CLK: equ 01h
0000
0000 ; USB register mode encoding
0000 DISABLE: equ 00h
0000 NAK_IN_OUT: equ 01h
0000 STATUS_OUT_ONLY: equ 02h
0000 STALL_IN_OUT: equ 03h
0000 IGNORE_IN_OUT: equ 04h
0000 ISOCHRONOUS_OUT: equ 05h
0000 STATUS_IN_ONLY: equ 06h
0000 ISOCHRONOUS_IN: equ 07h
0000 NAK_OUT: equ 08h
0000 ACK_OUT: equ 09h
0000 NAK_OUT_STATUS_IN: equ 0Ah
0000 ACK_OUT_NAK_IN: equ 0Bh
0000 NAK_IN: equ 0Ch
0000 ACK_IN: equ 0Dh
0000 NAK_IN_STATUS_OUT: equ 0Eh
0000 ACK_IN_STATUS_OUT: equ 0Fh
0000
0000
0000 SET: equ FFh
0000 CLEAR: equ 00h
0000
0000 ;**********************************************************
0000 ; USB Descriptor and Request constants
0000 ; source p172,,175 USB specification
0000 ;**********************************************************
0000
0000
0000 ; Characterists of bmRequest Value
0000 ;
0000 ; D7 Data xfer direction
0000 ; 0 = Host to device
0000 ; 1 = Device to host
0000 ;
0000 ; D6..5 Type
0000 ; 0 = Standard
0000 ; 1 = Class
0000 ; 2 = Vendor
0000 ; 3 = Reserved
0000 ;
0000 ; D4..0 Recipient
0000 ; 0 = Device
0000 ; 1 = Interface
0000 ; 2 = Endpoint
0000 ; 3 = Other
0000 ; 4..31 = Reserved
0000
0000
0000 ;***** bmRequestType
0000 HOSTTODEVICE: equ 00h
0000 DEVICETOHOST: equ 80h
0000
0000 STANDARD_TYPE: equ 00h
0000 CLASS_TYPE: equ 20h
0000 VENDOR_TYPE: equ 40h
0000 RESERVED_TYPE: equ 60h
0000
0000 DEVICE_RECIPIENT: equ 00h
0000 INTERFACE_RECIPIENT: equ 01h
0000 ENDPOINT_RECIPIENT: equ 02h
0000 OTHER_RECIPIENT: equ 03h
0000
0000 ;***** bRequest
0000 GET_STATUS: equ 00h
0000 CLEAR_FEATURE: equ 01h
0000 SET_FEATURE: equ 03h
0000 SET_ADDRESS: equ 05h
0000 GET_DESCRIPTOR: equ 06h
0000 SET_DESCRIPTOR: equ 07h
0000 GET_CONFIGURATION: equ 08h
0000 SET_CONFIGURATION: equ 09h
0000 GET_INTERFACE: equ 0Ah
0000 SET_INTERFACE: equ 0Bh
0000 SYNCH_FRAME: equ 0Ch
0000
0000 ;***** Descriptor Types
0000 DEVICE: equ 01h
0000 CONFIGURATION: equ 02h
0000 STRING: equ 03h
0000 INTERFACE: equ 04h
0000 ENDPOINT: equ 05h
0000
0000 ;***** Feature Selectors
0000 DEVICE_REMOTE_WAKEUP: equ 01h
0000 ENDPOINT_STALL: equ 00h
0000
0000 ;***** HID Class Request Types
0000 GET_REPORT: equ 01h
0000 GET_IDLE: equ 02h
0000 GET_PROTOCOL: equ 03h
0000 SET_REPORT: equ 09h
0000 SET_IDLE: equ 0Ah
0000 SET_PROTOCOL: equ 0Bh
0000
0000 ep1_dmabuff: equ F0h
0000 ep1_dmabuff0: equ ep1_dmabuff+0
0000 ep1_dmabuff1: equ ep1_dmabuff+1
0000 ep1_dmabuff2: equ ep1_dmabuff+2
0000 ep1_dmabuff3: equ ep1_dmabuff+3
0000 ep1_dmabuff4: equ ep1_dmabuff+4
0000 ep1_dmabuff5: equ ep1_dmabuff+5
0000 ep1_dmabuff6: equ ep1_dmabuff+6
0000 ep1_dmabuff7: equ ep1_dmabuff+7
0000
0000 ep0_dmabuff: equ F8h
0000 ep0_dmabuff0: equ ep0_dmabuff+0
0000 ep0_dmabuff1: equ ep0_dmabuff+1
0000 ep0_dmabuff2: equ ep0_dmabuff+2
0000 ep0_dmabuff3: equ ep0_dmabuff+3
0000 ep0_dmabuff4: equ ep0_dmabuff+4
0000 ep0_dmabuff5: equ ep0_dmabuff+5
0000 ep0_dmabuff6: equ ep0_dmabuff+6
0000 ep0_dmabuff7: equ ep0_dmabuff+7
0000
0000 bmRequestType: equ ep0_dmabuff0
0000 bRequest: equ ep0_dmabuff1
0000 wValuelo: equ ep0_dmabuff2
0000 wValuehi: equ ep0_dmabuff3
0000 wIndexlo: equ ep0_dmabuff4
0000 wIndexhi: equ ep0_dmabuff5
0000 wLengthlo: equ ep0_dmabuff6
0000 wLengthhi: equ ep0_dmabuff7
0000
0000
0000 ; DATA MEMORY VARIABLES
0000 ;
0000 suspend_count: equ 20h ; counter for suspend/resume
0000 ep1_data_toggle: equ 21h ; data toggle for INs on endpoint one
0000 ep0_data_toggle: equ 22h ; data toggle for INs on endpoint zero
0000 data_start: equ 23h ; address of request response data, as an offset
0000 data_count: equ 24h ; number of bytes to send back to the host
0000 maximum_data_count: equ 25h ; request response size
0000 ep0_in_machine: equ 26h
0000 ep0_in_flag: equ 27h
0000 configuration: equ 28h
0000 ep1_stall: equ 29h
0000 idle: equ 2Ah
0000 protocol: equ 2Bh
0000 temp: equ 2Ch ; temporary register
0000 event_machine: equ 2Dh
0000 pending_data: equ 2Eh
0000 int_temp: equ 2Fh
0000 idle_timer: equ 30h
0000 idle_prescaler: equ 31h
0000 logo_index: equ 32h
0000 ep0_transtype: equ 33h
0000
0000 data_byte_0: equ 34h
0000 data_byte_1: equ 35h
0000
0000 ; STATE MACHINE CONSTANTS
0000 ;EP0 IN TRANSACTIONS
0000 EP0_IN_IDLE: equ 00h
0000 CONTROL_READ_DATA: equ 02h
0000 NO_DATA_STATUS: equ 04h
0000 EP0_IN_STALL: equ 06h
0000
0000 ; FLAG CONSTANTS
0000 ;EP0 NO-DATA CONTROL FLAGS
0000 ADDRESS_CHANGE_PENDING: equ 00h
0000 NO_CHANGE_PENDING: equ 02h
0000
0000 ; RESPONSE SIZES
0000 DEVICE_STATUS_LENGTH: equ 2
0000 DEVICE_CONFIG_LENGTH: equ 1
0000 ENDPOINT_STALL_LENGTH: equ 2
0000 INTERFACE_STATUS_LENGTH: equ 2
0000 INTERFACE_ALTERNATE_LENGTH: equ 1
0000 INTERFACE_PROTOCOL_LENGTH: equ 1
0000
0000 NO_EVENT_PENDING: equ 00h
0000 EVENT_PENDING: equ 02h
0000
0000 ;***** TRANSACTION TYPES
0000
0000 TRANS_NONE: equ 00h
0000 TRANS_CONTROL_READ: equ 02h
0000 TRANS_CONTROL_WRITE: equ 04h
0000 TRANS_NO_DATA_CONTROL: equ 06h
0000
0000 ;Additional notes:
0000 ;ep0_mode is the Endpoint 0 mode register (12h).
0000
0000
0000 ;*************** interrupt vector table ****************
0000
0000 ORG 00h
0000
0000 80 1B [05] jmp reset ; reset vector
0002
0002 80 75 [05] jmp bus_reset ; bus reset interrupt
0004
0004 80 1A [05] jmp error ; 128us interrupt
0006
0006 80 86 [05] jmp 1ms_timer ; 1.024ms interrupt
0008
0008 80 BB [05] jmp endpoint0 ; endpoint 0 interrupt
000A
000A 83 BC [05] jmp endpoint1 ; endpoint 1 interrupt
000C
000C 80 1A [05] jmp error ; endpoint 2 interrupt
000E
000E 80 1A [05] jmp error ; reserved
0010
0010 80 1A [05] jmp error ; Capture timer A interrupt Vector
0012
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -