Freescale Semiconductor Microcontrollers User Manual Page 314

  • Download
  • Add to my manuals
  • Print
  • Page
    / 892
  • Table of contents
  • TROUBLESHOOTING
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 313
HC08 Full Chip Simulation
Configuration Procedure
314
Microcontrollers Debugger Manual
ldhx #0 ; clear H:X pointer
lda wValueH ; check which descriptor is wanted
cbeqa #$1,GETDEVDESC ; is it device descriptor?
cbeqa #$2,GETCONDESC ; is it configuration descriptor?
cbeqa #$21,GETHIDDESC ; is it for HID descriptor?
cbeqa #$22,GETREPDESC ; is it for Report descriptor?
jmp GETDESC_STALL ; else go stall
GETDEVDESC:
lda Dev_Desc,x ; take device descriptor information
sta UE0D0,x ; store in USB endpoint 0 data buffer
incx
cpx #8 ; all descriptors more than 8 bytes
bne GETDEVDESC
ldhx #DDesc_End ; store end location of the descriptor
sthx descendptr
ldhx #Dev_Desc ; store pointer to next byte in
; descriptor
bra GETDESC_END
GETCONDESC:
lda Con_Desc,x ; take configuration descriptor
; information
sta UE0D0,x ; store in USB endpoint 0 data buffer
incx
cpx #8 ; all descriptors more than 8 bytes
bne GETCONDESC
ldhx #E2Desc_End ; store end location of the descriptor
sthx descendptr
ldhx #Con_Desc ; store pointer to next byte in
; descriptor
bra GETDESC_END
GETHIDDESC:
lda HID_Desc,x ; take HID descriptor information
sta UE0D0,x ; store in USB endpoint 0 data buffer
incx
cpx #8 ; all descriptors more than 8 bytes
bne GETHIDDESC
ldhx #HDesc_End ; store end location of the descriptor
sthx descendptr
ldhx #HID_Desc ; store pointer to next byte in descriptor
bra GETDESC_END
GETREPDESC:
lda REP_Desc,x ; take report descriptor information
sta UE0D0,x ; store in USB endpoint 0 data buffer
incx
Page view 313
1 2 ... 309 310 311 312 313 314 315 316 317 318 319 ... 891 892

Comments to this Manuals

No comments