CursorDemoInit ;;;; Initialize USB for mouse peripheral
pagesel SoftDetachUSB
call SoftDetachUSB ; Detach from bus and reattach
pagesel Main ; with mouse report rescriptor.
ConfiguredUSB
banksel BUFFER
........
........
........
ConfiguredUSB macro
local enumloop
banksel USWSTAT
enumloop
clrwdt ; clear the watch dog timer.
movlw 0x03
andwf USWSTAT,w ; save lower 2 bits of USWSTAT
xorlw CONFIG_STATE ; compare with configured state
btfss STATUS,Z ; are we configured?
goto enumloop ; nope, keep waiting ...
endm
这段程序怎么理解,ConfiguredUSB macro这段宏在这里是怎么运作的?还有local 和macro在这里具体的作用是什么
?
一周热门 更多>