We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello Sir,
I am working on USB host for HID class using LPC2468 controller . I am using USB Hostlite example as a base . I made this code compatible for both full speed and low speed hid device. Now i am trying to create USB Device instance for that i have structure declaration as shown in following code.
struct usb_device_instance { UWORD8 *p_USB_DeviceDescriptor; UWORD8 *p_USB_ConfigDescriptor; UWORD8 *p_USB_StringDescriptor; UWORD8 *p_HID_ReportDescriptor; UWORD8 bUSB_DeviceAddress; /* USB bus address */ UWORD8 bUSB_Configuration; /* current configuration number */ //UWORD16 wUSB_DeviceStatus; /* bits 15-3 = 0; bit(1) = Remote Wakeup; bit(0) = Self Powered */ /* bits 31-16: input endpoints; bits 15-0: output endpoints */ //UWORD32 fg_USB_EndPointMask; /* working endpoints for current configuration */ //UWORD32 fg_USB_EndPointHalt; /* HALTED working endpoints for current configuration */ UWORD8 ep0_bMaxPacketSize; /* maximum packet size declared in Device Descriptor */ UWORD8 bNumConfigurations; UWORD8 bNumInterfaces; /* number of interfaces for current configuration */ UWORD8 bMaxNumInterfaces; /* Maximum number of interfaces for all possible configurations */ UWORD8 bNumStrings; /* number of strings */ UWORD8 bNumReportDescriptors; /* number of report descriptors */ //UWORD8 *p_bEP0Buf; /* working buffer for Control Transfer ep0 */ UWORD8 *p_bAltSetting_perIFC; /* Alternate Setting No. per Interfaces for current configuration */ UWORD8 *p_bHID_Protocol; //UWORD8 *p_bHID_IdleTime; //UWORD8 *p_bHID_IdleCount; UWORD8 bIFCs_ready; struct usb_IFC_instance *p_IFCs; UWORD32 fg_queue_IFCs; /* bits 31-16: IFCs of IN transfer requests; bits 15-0: IFCs of Out (or Feature) transfer requests; */ //CB_USB_Rx_Handler *p_callback_Rx_handler; /* User's handler Function for output and feature reports */ //CB_USB_BufMapping *p_callback_bufMapping; struct HID_repDesc_info *p_subRepDescriptor; /* information block of report descriptors */ UWORD8 *p_head_RIDinfo; UWORD8 wSize_ConfigDescriptor; UWORD8 wSize_StringDescriptor; UWORD8 wSize_ReportDescriptor; };
I am facing a problem when i take a pointer of this type as shown below struct usb_device_instance *p_usbD ;
when I debug through the software i observe that this is taking address 0x00000000. I don,t want to use this address I have already used ram upto 0x4000F8D8. I just want to confirm that can there be a special address like TD buffer has special address 0x7FD00150.
One more thing i want to confirm that in case of mass storage class data comes in Userbuffer . In this case from which buffer we have to check data.
Thanks & Regars R.kumar