📄 ram.h
字号:
;IMPORTANT!!!!!!!!!!!!
;This is a BETA version of Firmware that has not been
;fully tested. PLEASE keep this in mind and use this
;firmware as REFERENCE.
;========================================
;
; Ram Variable Declarations
;
;========================================
bottom_of_ram: equ 00h
timer_sync: equ 20h
timer_msb: equ 21h
suspend_counter: equ 22h
interrupt_mask: equ 23h
task_number: equ 24h
new_task: equ 25h
loop_counter: equ 26h
endp0_data_toggle: equ 27h
data_count: equ 28h
data_start: equ 29h
configuration_status: equ 2ah
;endpoint_stall: equ 2bh
protocol_status: equ 2ch
remote_wakeup_status: equ 2dh
tasktimer: equ 2eh
timer_error: equ 2fh
ep1_data_toggle: equ 30h
new_buttons: equ 31h
temp: equ 32h
old_x: equ 33h
new_x: equ 34h
old_y: equ 35h
new_y: equ 36h
Buttons_debounce: equ 37h
;========================================
;
; FIFO Declarations
;
;========================================
EP0_FIFO: equ F8h ; control endpoint 0 fifo
EP1_FIFO: equ F0h ; data endpoint 1 fifo
EP2_FIFO: equ E8h ; data endpoint 2 fifo
bmRequestType: equ EP0_FIFO
bRequest: equ EP0_FIFO + 1
wValue: equ EP0_FIFO + 2 ; default wValue (8-bits)
wValueHi: equ EP0_FIFO + 3
wIndex: equ EP0_FIFO + 4 ; default wIndex (8-bits)
wIndexHi: equ EP0_FIFO + 5
wLength: equ EP0_FIFO + 6 ; default wLength (8-bits)
wLengthHi: equ EP0_FIFO + 7
top_of_ram: equ FFh
;========================================
;
; Constant Declarations
;
;========================================
EP1_REPORT_LENGTH: equ 03h
; application specific gier masks
ENUMERATE_MASK: equ (1MS_IE+USB_PS2_IE) ; enable 1MS interrupt and also USB interrupts
; re-enable also EP0
ENUMERATED_MASK: equ (GPIO_IE+128USEC_IE+1MS_IE+USB_PS2_IE) ; enable all interrupts for enumerated
; also enable EP0 and EP1 done on each IPRET
SUSPEND_MASK: equ 00h
;========================================
;
; USB Constant Declarations
;
;========================================
; values for bmRequestType
HOST_TO_DEVICE: equ 00h
HOST_TO_INTERFACE: equ 01h
HOST_TO_ENDPOINT: equ 02h
DEVICE_TO_HOST: equ 80h
INTERFACE_TO_HOST: equ 81h
ENDPOINT_TO_HOST: equ 82h
CLASS: equ 20h
VENDOR: equ 40h
; other EP0 constants
EP1_STALLED: equ 0 ; recipient endpoint
REMOTE_WAKEUP: equ 1 ; recipient device
DISABLE_REMOTE_WAKEUP: equ 0 ; bit[1] = 0
ENABLE_REMOTE_WAKEUP: equ 2 ; bit[1] = 1
SUSPEND_TIME: equ 08h ; my 3650 won't handle a value of 3ms
ACKIN: equ 0Fh
ACKOUT: equ 0Bh
Buttons_port: equ P1_data
LEDs_port: equ P0_data
;========================================
;
; Application Specific aliases
;
;========================================
button_port: equ P0_data
Dpad_port: equ P1_data
DPAD_BITS: equ 0fh
Y_BITS: equ 03h
BUTTON_BITS: equ ffh
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -