Hardware Reference
In-Depth Information
movff TABLAT,PREINC0
tblrd *+ ;skip higher byte of descriptor's packet length
; compare descriptor length with the requested packet length (wLength)
movff wLengthLOW,WREG
cpfslt DescriptorPointer
bra insert_wlength
bra insert_descriptorLength
insert_wlength
movff wLengthLOW,DescriptorPointer
bra insert_packet_length
insert_descriptorLength
nop
nop
insert_packet_length
; set the byte counter to requested packet length
movlw 0x05
movwf
FSR0L
movlw 0x04
movwf FSR0H
movff DescriptorPointer,WREG
movff WREG,INDF0
movlw controlINlow
movwf FSR0L
movlw controlINhigh
movwf FSR0H
IN_Descriptor_next_byte
tblrd *+
movff TABLAT,POSTINC0
decfsz DescriptorPointer,F
bra IN_Descriptor_next_byte
; set DATA1 packet and return ownership to SIE
movlw 0x04
movwf
FSR0L
movlw 0x04
movwf FSR0H
movlw 0xC0
movff WREG,INDF0
return
Danach folgt gegebenenfalls die Anpassung von Daten, die zunächst nur als Platz-
halter eingetragen wurden.
Der Device Descriptor kann mit der USBIO Demo Application ausgelesen werden,
indem auf der Registerkarte „Descriptors“ das Feld „Get Device Descriptor“ ange-
klickt wird.
Search WWH ::




Custom Search