如何设置HID Report Descriptor里的数据啊?

[复制链接]
7400|14
 楼主| nishuidegou 发表于 2009-12-17 12:24 | 显示全部楼层 |阅读模式
我想试着用usb suite里的CyBulk程序从电脑上传输一些字符然后显示到lcd上
编译程序的时候老是出现
!ERROR file 'usbfs_descr.o': undefined symbol 'USBFS_D0_C1_INTERFACE_LOOKUP'
的错误。

HID Report Descriptor该如何设置呢?
请高人指点!
jxin 发表于 2009-12-17 15:37 | 显示全部楼层
出现这个错误就是因为没有配置USB Wizard, 怎么配置在USBFS User Module 里有讲
 楼主| nishuidegou 发表于 2009-12-17 16:06 | 显示全部楼层
本帖最后由 nishuidegou 于 2009-12-17 16:26 编辑

HID Report Descriptor该如何设置怎么找不到啊

要是我想做那么一个在lcd上显示的话该怎么配置USBFS才好啊

我试着写了几个但usb suite 都找不到呢
谢谢
jxin 发表于 2009-12-17 17:28 | 显示全部楼层
lobby 发表于 2009-12-17 20:30 | 显示全部楼层
学习了。
 楼主| nishuidegou 发表于 2009-12-18 10:52 | 显示全部楼层

能帮我看下这个对么

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
 楼主| nishuidegou 发表于 2009-12-18 10:55 | 显示全部楼层
我写的代码也顺便帮我看看哪有问题吧!多谢
  1. #include         // part specific constants and macros
  2. #include "PSoCAPI.h"    // PSoC API definitions for all User Modules
  3. extern BYTE UsbResetFlag;

  4. void main(void)
  5. {

  6.    BYTE str[8];//used to save data from pc
  7.    BYTE EpState;//used to save the endpoint state
  8.    WORD Size;//used to save the size of the data from pc
  9.    
  10.    M8C_EnableGInt;
  11.    USBFS_Start(0,USB_5V_OPERATION);//start usb with 5
  12.    while(1)
  13.    {
  14.    if(UsbResetFlag)
  15.    {
  16.    while(!USBFS_bGetConfiguration());// Wait for the USB device to enumerate
  17.    
  18.    USBFS_EnableOutEP(1);
  19.    
  20.    EpState=USBFS_bGetEPState(1);//Gets the Endpoint state for the specified endpoint
  21.    
  22.    while(!USBFS_bGetEPAckState(1));//Determines whether or not an ACK transaction occurred
  23.                                    //on this endpoint by reading the ACK bit
  24.                                    //in the control register of the endpoint
  25.    Size=USBFS_wGetEPCount(1);//This functions returns the value of the endpoint count register
  26.    
  27.    USBFS_bReadOutEP(1,str,8);//Moves the specified number of bytes from endpoint RAM to data RAM
  28.    
  29.    LCD_Start();//display the state and the data
  30.    LCD_Position(0,1);
  31.    LCD_PrHexByte(EpState);
  32.    LCD_Position(0,6);
  33.    LCD_PrHexByte(Size);
  34.    LCD_Position(1,1);
  35.    LCD_PrString(str);
  36.    UsbResetFlag = 0;
  37.    }
  38.    }
jxin 发表于 2009-12-18 18:41 | 显示全部楼层
要看你USB Wizard 中device attributes的配置情况, 你上边的图看不见吧
 楼主| nishuidegou 发表于 2009-12-18 21:40 | 显示全部楼层
本帖最后由 nishuidegou 于 2009-12-18 21:45 编辑

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
 楼主| nishuidegou 发表于 2009-12-18 21:45 | 显示全部楼层
帮忙请看下,谢谢
love_life 发表于 2009-12-19 00:59 | 显示全部楼层
jxin 发表于 2009-12-22 15:01 | 显示全部楼层
9楼这样的配置至少不应该出现1楼所述的错误,如果HID Class Descriptor中HID Report的usb_lcd的descriptor配置正确的话,应该可以正确编译的。
 楼主| nishuidegou 发表于 2009-12-24 22:43 | 显示全部楼层
改了改可是还是无法从PC上接收数据显示到LCD上
jxin 发表于 2009-12-28 11:10 | 显示全部楼层
如何改的? 显示的结果是什么啊
贾君鹏子 发表于 2009-12-28 23:03 | 显示全部楼层
图太小了,都看不见
您需要登录后才可以回帖 登录 | 注册

本版积分规则

4

主题

16

帖子

1

粉丝
快速回复 在线客服 返回列表 返回顶部