joyous
驱动牛犊
驱动牛犊
  • 注册日期2004-07-28
  • 最后登录2005-12-21
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:1056回复:2

求救:如何确定CY7C63001传送给主机数据大小

楼主#
更多 发布于:2004-08-18 11:44
各位大侠: 我现在用CY7C63001的断点1的中断传输送一批数据给主机,由于一次只能传送8B数据,但是我现在的问题是一次最多只能传送6B,送7B的时候主机就死掉了。我在HID IN REPORT报告中设置 :    
     db 09h, 03h     ;               usage - vendor defined
     db 09h, 04h     ;               usage - vendor defined
     db 15h, 80h     ;               Logical Minimum (-128)
     db 25h, 7Fh     ;               Logical Maximum (127)
     db 35h, 00h     ;               Physical Minimum (0)
     db 45h, FFh;                    Physical Maximum (255)
;    db 66h, 00h, 00h;               Unit (None (2 bytes))
     db 75h, 08h     ;               Report Size (8)  (bits)
     db 95h, 07h     ;               Report Count (2)  (fields)
     db 81h, 02h     ;               Input (Data, Variable, Absolute)  
     在断点1的中断中如下:
SB_EP1_ISR:
     push A
;Toggle the data 0/1 bit so it's correct for the next transaction.
     iord USB_EP1_TX_Config  
     xor A,40h
;The interrupt clears the EnableRespondToIN bit (bit 7) in the TX Config.
;Set this bit to 1 so data will go out on the next poll.
;This will ensure that a ReadFile API call in a Windows application
;won't hang, waiting for the device to send something.
     or A, 97h
     iowr USB_EP1_TX_Config
;Enable interrupts and return.
     mov A, [interrupt_mask]
     ipret Global_Interrupt
  另外:我在1MS中断程序中讲数据从RAM复制到断点1的FIFO中。
有那位大侠能告诉我那里出了问题,提示一下可能的原因也可以,多谢了。
use_id
驱动中牛
驱动中牛
  • 注册日期2002-03-11
  • 最后登录2006-01-07
  • 粉丝0
  • 关注0
  • 积分2分
  • 威望1点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2004-08-18 14:11
只看这个不够.

还有 EndPoint 定义, 如:

ENDPOINT_DESCRIPTOR
db 07h ; descriptor length (7 bytes)
db 05h ; descriptor type (ENDPOINT)
db 81h ; endpoint address (IN endpoint, endpoint 1)
db 03h ; endpoint attributes (interrupt)
db 01h,00h ; maximum packet size (1 bytes)    这里只是定义了一个字节.
db 10h ; polling interval (16ms)
joyous
驱动牛犊
驱动牛犊
  • 注册日期2004-07-28
  • 最后登录2005-12-21
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2004-08-18 14:37
多谢楼上的兄弟
游客

返回顶部