Commit Graph

22 Commits

Author SHA1 Message Date
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 353435925f fixup uint8_t mess 2019-01-25 22:46:42 +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 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 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