imx6ul:how to get the data from usb_control_msg?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imx6ul:how to get the data from usb_control_msg?

1,927件の閲覧回数
半醒的狐狸
Contributor I

hi

on pc:when i use the usb_control_msg,

usb_control_msg(dev, 0x80,0x06, 768, 0, tmp,32,10000);

in the isr_setup_packet_handler(kernel-source\drivers\usb\chipidea\udc.c)  i can get the :

__u8 request = 0x80,

__u8 requesttype = 0x06,

__u16 value = 768,

__u16 index = 0,

__u16 size = 32

by struct usb_ctrlrequest req;

but i don't know how to get the data(tmp) i  have send by usb_control_msg.

thanks!

ラベル(2)
0 件の賞賛
返信
3 返答(返信)

1,295件の閲覧回数
CarlosCasillas
NXP Employee
NXP Employee

Hi,

Could you please specify which BSP are you using? Are you using any of the existing USB Classes or are you defining a custom USB Device?

Best regards!

/Carlos

0 件の賞賛
返信

1,295件の閲覧回数
半醒的狐狸
Contributor I

hi
the information is that:

U-Boot 2015.04-imx_v2015.04_3.14.38_6ul_ga+g5d63276 (Aug 18 2015 - 21:32:01)

CPU:   Freescale i.MX6UL rev1.0 at 396 MHz
CPU:   Temperature 43 C
Reset cause: WDOG
Board: MX6UL 14x14 EVK
I2C:   ready
DRAM:  512 MiB

when boot up
i run this:modprobe g_serial  use_acm=0
and connect pc whith micusb.
on the pc ,i used ilbusb by Qt.
when connect the usb .i run usb_control_msg(dev, 0x80,0x06, 768, 0, tmp,32,10000);
i have analyzed the code and found that:
when i run usb_control_msg on pc .
i can get the struct usb_ctrlrequest in isr_setup_packet_handler(kernel-source\drivers\usb\chipidea\udc.c)
in the struct usb_ctrlrequest i can found the :
__u8 request = 0x80,
__u8 requesttype = 0x06,
__u16 value = 768,
__u16 index = 0,
__u16 size = 32

but i don't know hwo to get the tmp that i have send by usb_control_msg on pc.

Best regards!

0 件の賞賛
返信

1,295件の閲覧回数
CarlosCasillas
NXP Employee
NXP Employee

Hi,

You could refer to the following links, they may provide useful information related to your issue:

[PATCH 1/4] usb: chipidea: udc: refine isr_tr_complete_handler

usb - How does libusb access kernel stuff? - Unix & Linux Stack Exchange

Linux/drivers/usb/chipidea/udc.c - Linux Cross Reference - Free Electrons

Hope this will be useful for you.

Best regards!

/Carlos

0 件の賞賛
返信