小编Sha*_*han的帖子

USB设备枚举失败:"设备描述符读取/ 64,错误-32"

我正在使用ST微控制器开发一个ttyACM设备,并且使用相同的代码,我的主机有时可以成功地枚举它(下面),但有时它只是转储下面的消息.错误-32是什么意思?

[未能注册]

usb 1-2.1: new full speed USB device number 62 using ehci_hcd
usb 1-2.1: device descriptor read/64, error -32
usb 1-2.1: device descriptor read/64, error -32
usb 1-2.1: new full speed USB device number 63 using ehci_hcd
usb 1-2.1: device descriptor read/64, error -32
usb 1-2.1: device descriptor read/64, error -32
usb 1-2.1: new full speed USB device number 64 using ehci_hcd
usb 1-2.1: device not accepting address 64, error -32
usb 1-2.1: new full speed USB device number …
Run Code Online (Sandbox Code Playgroud)

linux usb microcontroller linux-kernel embedded-linux

8
推荐指数
1
解决办法
2万
查看次数

C错误:左值作为一元'&'操作数

我有代码错误但不确定我的转换和引用有什么问题.

BOOL xMBPortSerialPutByte( CHAR ucByte )
{
    CDC_Send_DATA(&((unsigned char)ucByte), 1);   // code error here
    xMBPortEventPost(EV_FRAME_SENT);
    return TRUE;
}
Run Code Online (Sandbox Code Playgroud)

CDC_Send_DATA定义如下:

uint32_t CDC_Send_DATA (uint8_t *ptrBuffer, uint8_t Send_length);
Run Code Online (Sandbox Code Playgroud)

这是错误消息:

  port/portserial.c:139:19: error: lvalue required as unary '&' operand
Run Code Online (Sandbox Code Playgroud)

希望有人能提供帮助.谢谢!

c lvalue

5
推荐指数
1
解决办法
3万
查看次数

标签 统计

c ×1

embedded-linux ×1

linux ×1

linux-kernel ×1

lvalue ×1

microcontroller ×1

usb ×1