This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
大家好
我遇到了一些问题。 我使用 TMS320F2837xD 和 v190版本的固件。 我需要在大容量器件上创建6个或更多端点。 指示 USB 库和 USB 控制器 支持多达16个端点的输入和相同的输出 。 但是 文件 usb.c 中的函数_USBIndexWrite 或_USBIndexRead 包含"assert" 、允许 我们 仅创建 4个端点。 我高亮显示它。
\\param ui32Endpoint 是此写入的目标端点索引。
_USBIndexWrite (uint32_t ui32Base、uint32_t ui32Endpoint、
uint32_t ui32IndexedReg、uint32_t ui32Value、uint32_t ui32Size)
{
uint32_t ui32Index;
//
//检查参数。
//
断言(ui32Base == USB0_BASE);
Assert ((ui32Endpoint == 0)||(ui32Endpoint == 1)||(ui32Endpoint == 2)||
(ui32Endpoint == 3));
assert ((ui32Size = 1)||(ui32Size = 2));
//
//保存旧索引以防它被使用。
//
ui32Index = HWREGB (ui32Base + USB_O_EPIDX);
//
//设置索引。
//
HWREGB (ui32Base + USB_O_EPIDX)= ui32Endpoint;
有人能评论一下吗? 那么、我是否删除了该限制? 或者是否 需要考虑一下?
谢谢你。
Andrii
大家好
我已经对文件 usb.c 进行了更多的调查、并发现了其他端点数量限制
限值为7个一般点 、在上一个示例中为4个点。 因此、我 不知道哪个点数是有效的。
USBEndpointStatus (uint32_t ui32Base、uint32_t ui32Endpoint)
{
uint32_t ui32Status;
//
//检查参数。
//
断言(ui32Base == USB0_BASE);
Assert ((ui32Endpoint == USB_EP_0)||(ui32Endpoint ==USB_EP_1)||
(ui32Endpoint =USB_EP_2)||(ui32Endpoint =USB_EP_3)||
(ui32Endpoint =USB_EP_4)||(ui32Endpoint =USB_EP_5)||
(ui32Endpoint =USB_EP_6)||(ui32Endpoint =USB_EP_7));
USBHostEndpointStatusClear (uint32_t ui32Base、uint32_t ui32Endpoint、
uint32_t ui32Flags)
{
//
//检查参数。
//
断言(ui32Base == USB0_BASE);
Assert ((ui32Endpoint == USB_EP_0)||(ui32Endpoint ==USB_EP_1)||
(ui32Endpoint =USB_EP_2)||(ui32Endpoint =USB_EP_3)||
(ui32Endpoint =USB_EP_4)||(ui32Endpoint =USB_EP_5)||
(ui32Endpoint =USB_EP_6)||(ui32Endpoint =USB_EP_7));
USBHostEndpointDataToggle (uint32_t ui32Base、uint32_t ui32Endpoint、
bool bDataToggle、uint32_t ui32Flags)
{
uint32_t ui32DataToggle;
//
//检查参数。
//
断言(ui32Base == USB0_BASE);
Assert ((ui32Endpoint == USB_EP_0)||(ui32Endpoint ==USB_EP_1)||
(ui32Endpoint =USB_EP_2)||(ui32Endpoint =USB_EP_3)||
(ui32Endpoint =USB_EP_4)||(ui32Endpoint =USB_EP_5)||
(ui32Endpoint =USB_EP_6)||(ui32Endpoint =USB_EP_7));