Уважаемые коллеги!
Реализовал CDC ACM устройство на at91rm9200. Драйвер благополучно ставится. Порт в терминальноы программе открывается, обмен данными происходит. Монитор последовательного порта отображает состояние линии. CTS не активно. Для его активации посылаю NetworkConnection notification через INT endpoint (0ха1, 0х0, 0х1, 0х0, 0х0, 0х0, 0х0, 0х0). Данные через этот endpoint уходят, но ровным счетом ничего не происходит.
Мой Conf Descriptor:
static USB_CONFIG1 UsbConfiguration1 = // alternate configuration (FD Virtual COM Port)
{
{
sizeof(USB_CONFIGURATION_DESCRIPTOR),
USB_CONFIGURATION_DESCRIPTOR_TYPE,
sizeof(USB_CONFIG1), // size of UsbConfiguration in bytes
0x02, // number of interfaces
0x01, // number of THIS configuration
0x00, // index of config. string
USB_CONFIG_SELF_POWERED | USB_CONFIG_BUS_POWERED, // self powered
0x00 // max. power
},
// CDC ACM Comm Interface - Interface 0
{
sizeof(USB_INTERFACE_DESCRIPTOR),
USB_INTERFACE_DESCRIPTOR_TYPE,
0, // interface number, OK
0, // alternate settings
1, // number of (non 0) EPs
CDC_INTERFACE_COMMUNICATION, // interface class : 0x02
CDC_ABSTRACT_CONTROL_MODEL, // interface subclass : 0x02
0x01, // interface protocol
0 // index of intf. string
},
// Header Functional Descriptor
{
sizeof(HEADER_FUNCTIONAL_DESCRIPTOR), // bFunction Length
CS_INTERFACE_DESCRIPTOR_TYPE, // bDescriptor type: CS_INTERFACE : 0x24
HEADER_FD, // bDescriptor subtype: Header Func Desc : 0x00
0x0110, // bcdCDC:1.1
},
// Call Management Functional Descriptor
{
sizeof(CM_FUNCTIONAL_DESCRIPTOR), // bFunctionLength
CS_INTERFACE_DESCRIPTOR_TYPE, // bDescriptor Type: CS_INTERFACE : 0x24
CM_FD, // bDescriptor Subtype: Call Management Func Desc : 0x01
0x03, // bmCapabilities: D1 + D0
0x01 // bDataInterface: Data Class Interface 1
},
// ACM Functional Descriptor
{
sizeof(ACM_FUNCTIONAL_DESCRIPTOR), // bFunctionLength
CS_INTERFACE_DESCRIPTOR_TYPE, // bDescriptor Type: CS_INTERFACE : 0x24
ACM_FD, // bDescriptor Subtype: ACM Func Desc : 0x02
0x0f // Every notification/request except NetworkConnection supported
},
// The capabilities that this configuration
// supports. (A bit value of zero means that the
// request is not supported.)
// D7..D4: RESERVED (Reset to zero)
// D3: 1 - Device supports the notification
// Network_Connection.
// D2: 1 - Device supports the request
// Send_Break
// D1: 1 - Device supports the request
// combination of Set_Line_Coding,
// Set_Control_Line_State,
// Get_Line_Coding, and the
// notification Serial_State.
// D0: 1 - Device supports the request
// combination of
// Set_Comm_Feature,
// Clear_Comm_Feature, and
// Get_Comm_Feature.
// The previous bits, in combination, identify
// which requests/notifications are supported by
// a Communication Class interface with the
// SubClass code of Abstract Control Model.
// Union Functional Descriptor
{
sizeof(UNION_FUNCTIONAL_DESCRIPTOR), // bFunctionLength
CS_INTERFACE_DESCRIPTOR_TYPE, // bDescriptorType: CS_INTERFACE : 0x24
UNION_FD, // bDescriptor Subtype: Union Func Desc : 0x06
0x00, // bMasterInterface: Communication Class Interface
0x01 // bSlaveInterface0: Data Class Interface
},
// Notification ENDPOINT_DESCRIPTOR
{
sizeof(USB_ENDPOINT_DESCRIPTOR),
USB_ENDPOINT_DESCRIPTOR_TYPE,
0x83, // EP-Nummer, 8.Bit gibt Richtung an //! 0x83
USB_ENDPOINT_TYPE_INTERRUPT,
EP1_PACKET_SIZE,
0x10 // Endpoint polled every 10ms
},
// CDC ACM Data Interface - Interface 1
{
sizeof( USB_INTERFACE_DESCRIPTOR ),
USB_INTERFACE_DESCRIPTOR_TYPE,
1, // interface number, OK
0, // alternate settings
2, // number of (non 0) EPs
0x0A, // interface class (CDC ACM Data)
0x00, // interface subclass
0x00, // interface protocol
0 // index of intf. string
},
// ENDPOINT_DESCRIPTOR
// ENDPOINT_DESCRIPTOR
{
sizeof(USB_ENDPOINT_DESCRIPTOR),
USB_ENDPOINT_DESCRIPTOR_TYPE,
0x84, // ep5 bulk in
USB_ENDPOINT_TYPE_BULK,
EP2_PACKET_SIZE,
0x00 // interval
},
{
sizeof(USB_ENDPOINT_DESCRIPTOR),
USB_ENDPOINT_DESCRIPTOR_TYPE,
0x05, // ep4 bulk out
USB_ENDPOINT_TYPE_BULK,
EP2_PACKET_SIZE,
0x00 // interval
},
};
Нет ли каких идей на сей счет?