??? 01/23/06 18:18 Read: times |
#108113 - VALIDATE_BUFFER Responding to: ???'s previous message |
I can find "CALL VALIDATE_BUFFER" at the end of your ZLP routine, but cannot on the descriptor routine. Do you call VALIDATE_BUFFER after each packet is sent to buffer?
SEND_ZERO_LENGTH_PACKET:
CALL SELECT_CONTROL_IN_ENDPOINT CALL WRITE_BUFFER MOV DYTA,#0 CALL USB_DATA_WRITE CALL VALIDATE_BUFFER ;; surely, here it is RET WRITE_18_BYTE_DESCRIPTORS:
... CJNE A,#38H,SAVING1 ;; <----------- add "CALL VALIDATE_BUFFER" here RET SECOND_8_BYTES: ... CJNE A,#40H,SAVING2 ;; <----------- add "CALL VALIDATE_BUFFER" here RET THIRD_2_BYTES: ... CJNE A,#42H,SAVING3 ;; <----------- add "CALL VALIDATE_BUFFER" here ;; CALL SEND_ZERO_LENGTH_PACKET <--- delete this line RET Mehdi said:
But it seems it is readable.Isn't it? Ummm... a little more effort is needed. Replace 'magic' number to named constant. MOV DYTA,#8 is rewritten to MAX_PACKET_SIZE EQU 8 MOV DYTA, #MAX_PACKET_SIZE Tsuneo |