Harald Welte
27165205dc
USB_Demo: Add f_usb_claim_interface() convenience function
2019-01-30 22:01:23 +01:00
Harald Welte
374ff37ba4
USB_Demo: Extend tr_UsbXfer_compl() beyond CONTROL transfers
2019-01-30 22:01:02 +01:00
Harald Welte
f17bf44a4b
CCID_Templates: Fix dwLength value in send templates
...
The length value describes the length *after* the header, so for
most short requests, it's zero.
2019-01-30 22:00:01 +01:00
Harald Welte
dd9ab09c8b
USB_Demo: Use ts_USB_claim_interface() rather than open-coding it
2019-01-30 21:58:58 +01:00
Harald Welte
03ce3a894b
USB_Demo: Use g_dev_hdl and avoid hard-coded 42
2019-01-30 21:58:32 +01:00
Harald Welte
82a2797994
USB_Demo: Don't use hard-coded req_hdl but dynamically allocate it
2019-01-30 21:57:38 +01:00
Harald Welte
f6559dbdb6
use local variables in outgoing_send() to avoid starnge printf values
2019-01-30 21:26:25 +01:00
Harald Welte
00d2616a2c
declare {enc,dec}_CCID_ClassDescriptor
...
This allows test cases to decode the relevant descriptor
2019-01-28 17:08:16 +01:00
Harald Welte
1a706759c0
CCID_Types: avoid multi-byte bitfield records
...
For some reason I cannot get them correctly deoded ,see my post at
https://www.eclipse.org/forums/index.php/t/1097288/
2019-01-28 17:07:20 +01:00
Harald Welte
4126bfb255
Extend 'USB_StandardDescriptor' with binary 'other'
...
This means that USB_StandardDescriptor can now als odecode descriptors
it doesn't know: It simply stores them as octetstring and continues
with the next descriptor.
2019-01-28 17:06:22 +01:00
Harald Welte
e1331dd954
add 'usb' to function names; export some important functions
2019-01-28 17:05:48 +01:00
Harald Welte
353435925f
fixup uint8_t mess
2019-01-25 22:46:42 +01:00
Harald Welte
1d76a5012a
USB_Demo: major rewrite + test extension
2019-01-25 22:37:56 +01:00
Harald Welte
768b609c77
demo: Factor-out opening the USB device into f_init()
2019-01-25 19:39:51 +01:00
Harald Welte
fbb5d48be5
demo: Turn vendor/product ID into modulepars
2019-01-25 19:29:53 +01:00
Harald Welte
9acc209aa1
remove dependency on Osmocom_Types.ttcn
...
... we were only using the uint8_t definition, so let's copy that
one to USB_Types.
2019-01-25 19:24:58 +01:00
Harald Welte
96501d0be6
Add new CCID_Templates module containing USB-CCID related templates
2019-01-14 22:46:34 +01:00
Harald Welte
0405802fc5
CCID_Types: Fix typo
2019-01-14 22:46:21 +01:00
Harald Welte
5a35beb80b
CCID_TypeS: Use little-endian 16/32bit integer types
2019-01-14 22:46:01 +01:00
Harald Welte
296b3d3825
Add Eclipse Public License as license text for this project
...
As the USB port for Eclipse TITAN is likely something that might
eventually be interesting to the TITAN project for inclusion, I
thought it's a good idea to use the same license as upstream.
I'd of course prefer if there was a stronger copyleft license
used in this context, but well, it's not my project :/
2019-01-13 23:39:07 +01:00
Harald Welte
b4d84ddc3f
demo: WIP code for demonstrating/testing the USB TestPort
2019-01-13 23:30:45 +01:00
Harald Welte
afed7910bf
Add CCID_Types containing definitions relevant to USB CCID
2019-01-13 23:30:15 +01:00
Harald Welte
8bdc776047
fix typo in record member name (USB_EpAttribs.Usage_Tyype)
2019-01-13 23:29:12 +01:00
Harald Welte
0a5c701271
Fix USB Device Request Code name for '0'
2019-01-13 23:28:49 +01:00
Harald Welte
287d764a7a
New USB_Templates.ttcn with templates for USB control requests
2019-01-13 23:28:26 +01:00
Harald Welte
8739776233
Define 'record of' USB_StandardDescriptor
...
This is quite handy for decoding e.g. a configuration descriptor, which
is typically concatenated with interface descriptors, endpoint
descriptors, etc.
2019-01-13 23:05:58 +01:00
Harald Welte
66858d15a7
Remove 'actual_length' parameter of USB_tranfer_compl
...
We can simply cut the returned data octet string to the actual length
instead. In this case, we must also adjust for the control pipe header
in case of CONTROL IN transfers.
2019-01-13 23:04:48 +01:00
Harald Welte
a362722b96
USB_Types: USB_Feature_Selector + USB_DeviceRequest definitions
2019-01-13 22:41:36 +01:00
Harald Welte
542f8cb128
USB_PT: Populate the USB_trasnfer_compl.transfer_hdl
...
... only this way the user can know which trasnfer has just completed.
2019-01-13 22:40:51 +01:00
Harald Welte
057787c56f
USB_PT: Populate the USB_transfer_compl.status field
2019-01-13 22:39:08 +01:00
Harald Welte
5b160f6e2e
USB_PT: Fix handling of buffer size for Control Read transfers
...
A control read transfer (bmAttributes & 0x80) consists of an 8 byte
header (setup phase) followed by a data phase containing the retunned
data. So we have to add the wLength contents of the header to the
length of the buffer allocated for the transfer.
2019-01-13 22:37:03 +01:00
Harald Welte
d95f149d24
New USB_Types.ttcn containing coding of USB standard descriptors
2019-01-13 13:25:14 +01:00
Harald Welte
e9be974c5c
Add README.md file
2019-01-08 16:22:02 +01:00
Harald Welte
b57baadfd4
USB_PortTypes: Add receive and send templates
2019-01-08 16:21:41 +01:00
Harald Welte
cdd33ebe7e
WIP: TITAN TestPort for accessing USB devices from a USB host
2019-01-08 14:16:12 +01:00