📄 usbfs_1_descr.lis
字号:
0000 or F, FLAG_XIO_MASK
0000 macro M8C_EnableGInt
0000 or F, FLAG_GLOBAL_IE
0000 macro M8C_DisableGInt
0000 and F, ~FLAG_GLOBAL_IE
0000 macro M8C_DisableIntMask
0000 and reg[@0], ~@1 ; disable specified interrupt enable bit
0000 macro M8C_EnableIntMask
0000 or reg[@0], @1 ; enable specified interrupt enable bit
0000 macro M8C_ClearIntFlag
0000 mov reg[@0], ~@1 ; clear specified interrupt enable bit
0000 macro M8C_EnableWatchDog
0000 and reg[CPU_SCR0], ~CPU_SCR0_PORS_MASK
0000 macro M8C_ClearWDT
0000 mov reg[RES_WDT], 00h
0000 macro M8C_ClearWDTAndSleep
0000 mov reg[RES_WDT], 38h
0000 macro M8C_Stall
0000 or reg[ASY_CR], ASY_CR_SYNCEN
0000 macro M8C_Unstall
0000 and reg[ASY_CR], ~ASY_CR_SYNCEN
0000 macro M8C_Sleep
0000 or reg[CPU_SCR0], CPU_SCR0_SLEEP_MASK
0000 ; The next instruction to be executed depends on the state of the
0000 ; various interrupt enable bits. If some interrupts are enabled
0000 ; and the global interrupts are disabled, the next instruction will
0000 ; be the one that follows the invocation of this macro. If global
0000 ; interrupts are also enabled then the next instruction will be
0000 ; from the interrupt vector table. If no interrupts are enabled
0000 ; then the CPU sleeps forever.
0000 macro M8C_Stop
0000 ; In general, you probably don't want to do this, but here's how:
0000 or reg[CPU_SCR0], CPU_SCR0_STOP_MASK
0000 ; Next instruction to be executed is located in the interrupt
0000 ; vector table entry for Power-On Reset.
0000 macro M8C_Reset
0000 ; Restore CPU to the power-on reset state.
0000 mov A, 0
0000 SSC
0000 ; Next non-supervisor instruction will be at interrupt vector 0.
0000 macro Suspend_CodeCompressor
0000 or F, 0
0000 macro Resume_CodeCompressor
0000 add SP, 0
00DF USBFS_1_INT_REG: equ 0xDF
0001 USBFS_1_INT_RESET_MASK: equ 0x01
0002 USBFS_1_INT_SOF_MASK: equ 0x02
0004 USBFS_1_INT_EP0_MASK: equ 0x04
0008 USBFS_1_INT_EP1_MASK: equ 0x08
0010 USBFS_1_INT_EP2_MASK: equ 0x10
0020 USBFS_1_INT_EP3_MASK: equ 0x20
0040 USBFS_1_INT_EP4_MASK: equ 0x40
0080 USBFS_1_INT_WAKEUP_MASK: equ 0x80
0000
0000 ;--------------------------------------------------
0000 ; Constants for USBFS_1 API's.
0000 ;--------------------------------------------------
0000 USBFS_1_bNumStringDescrs: EQU 0x0
0000
0005 USB_NUM_ENDPOINTS: EQU 5
0004 USB_MAX_EP_NUMBER: EQU (USB_NUM_ENDPOINTS - 1)
0000
0002 USB_3V_OPERATION: EQU 0x02
0003 USB_5V_OPERATION: EQU 0x03
0000
0000 ;--------------------------------------------------
0000 ; Registers for USBFS_1 API's.
0000 ;--------------------------------------------------
0000
004A USBFS_1_ADDR: EQU 0x4a
004B USBFS_1_USBIO_CR0: EQU 0x4b
004C USBFS_1_USBIO_CR1: EQU 0x4c
00C1 USBFS_1_USB_CR1: EQU 0xc1
0000
0056 USBFS_1_EP0MODE: EQU 0x56
0057 USBFS_1_EP0CNT: EQU 0x57
0058 USBFS_1_EP0DATA: EQU 0x58
00C4 USBFS_1_EP1MODE: EQU 0xc4
004F USBFS_1_EP1CNT0: EQU 0x4f
004E USBFS_1_EP1CNT1: EQU 0x4e
00C5 USBFS_1_EP2MODE: EQU 0xc5
0051 USBFS_1_EP2CNT0: EQU 0x51
0050 USBFS_1_EP2CNT1: EQU 0x50
00C6 USBFS_1_EP3MODE: EQU 0xc6
0053 USBFS_1_EP3CNT0: EQU 0x53
0052 USBFS_1_EP3CNT1: EQU 0x52
00C7 USBFS_1_EP4MODE: EQU 0xc7
0055 USBFS_1_EP4CNT0: EQU 0x55
0054 USBFS_1_EP4CNT1: EQU 0x54
0000
0000 ;--------------------------------------------------
0000 ; Endpoint 0 offsets (Table 9-2)
0000 ;--------------------------------------------------
0000 bmRequestType: EQU 0
0001 bRequest: EQU 1
0002 wValue: EQU 2
0003 wValueHi: EQU 3
0002 wValueLo: EQU 2
0004 wIndex: EQU 4
0005 wIndexHi: EQU 5
0004 wIndexLo: EQU 4
0006 wLength: EQU 6
0007 wLengthHi: EQU 7
0006 wLengthLo: EQU 6
0000
0000 ;--------------------------------------------------
0000 ; Request Types (Table 9-4)
0000 ;--------------------------------------------------
0000 USB_GET_STATUS: EQU 0x00
0001 USB_CLEAR_FEATURE: EQU 0x01
0003 USB_SET_FEATURE: EQU 0x03
0005 USB_SET_ADDRESS: EQU 0x05
0006 USB_GET_DESCRIPTOR: EQU 0x06
0007 USB_SET_DESCRIPTOR: EQU 0x07
0008 USB_GET_CONFIGURATION: EQU 0x08
0009 USB_SET_CONFIGURATION: EQU 0x09
000A USB_GET_INTERFACE: EQU 0x0A
000B USB_SET_INTERFACE: EQU 0x0B
000C USB_SYNCH_FRAME: EQU 0x0C
0000
0000 ;--------------------------------------------------
0000 ; Descriptor Types (Table 9-5)
0000 ;--------------------------------------------------
0001 DESCR_TYPE_DEVICE: EQU 1
0002 DESCR_TYPE_CONFIG: EQU 2
0003 DESCR_TYPE_STRING: EQU 3
0004 DESCR_TYPE_INTERFACE: EQU 4
0005 DESCR_TYPE_ENDPOINT: EQU 5
0006 DESCR_TYPE_DEVICE_QUALIFIER: EQU 6
0007 DESCR_TYPE_OTHER_SPEED: EQU 7
0008 DESCR_TYPE_INTERFACE_POWER: EQU 8
0000
0000 ;--------------------------------------------------
0000 ; Feature Selectors (Table 9-6)
0000 ;--------------------------------------------------
0001 USB_DEVICE_REMOTE_WAKEUP: EQU 0x01
0000 USB_ENDPOINT_HALT: EQU 0x00
0002 USB_TEST_MODE: EQU 0x02
0000
0000 ;--------------------------------------------------
0000 ; USB Device Status (Figure 9-4)
0000 ;--------------------------------------------------
0000 USB_DEVICE_STATUS_BUS_POWERED: EQU 0x00
0001 USB_DEVICE_STATUS_SELF_POWERED: EQU 0x01
0002 USB_DEVICE_STATUS_REMOTE_WAKEUP: EQU 0x02
0000
0000 ;--------------------------------------------------
0000 ; USB Endpoint Status (Figure 9-4)
0000 ;--------------------------------------------------
0001 USB_ENDPOINT_STATUS_HALT: EQU 0x01
0000
0000 ;--------------------------------------------------
0000 ; USB Endpoint Directions
0000 ;--------------------------------------------------
0080 USB_DIR_IN: EQU 0x80
0000 USB_DIR_OUT: EQU 0x00
007F USB_DIR_UNUSED: EQU 0x7F
0000
0000 ;--------------------------------------------------
0000 ; USB Endpoint Address Symbols
0000 ;--------------------------------------------------
0000 EP0: EQU 0x00
0001 EP1: EQU 0x01
0002 EP2: EQU 0x02
0003 EP3: EQU 0x03
0004 EP4: EQU 0x04
0000
0000 ;--------------------------------------------------
0000 ; Control Endpoint States--These act as JACC jump values
0000 ;--------------------------------------------------
0000 USB_TRANS_STATE_IDLE: EQU 0x00 ;
0002 USB_TRANS_STATE_CONTROL_READ: EQU 0x02 ;
0004 USB_TRANS_STATE_CONTROL_WRITE: EQU 0x04 ;
0006 USB_TRANS_STATE_NO_DATA_CONTROL: EQU 0x06 ;
0000
0000 ;--------------------------------------------------
0000 ; Control Write flag values to indicate pending data changes
0000 ;--------------------------------------------------
0001 USB_ADDRESS_CHANGE_PENDING: EQU 0x01
0000
0000
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -