Commit graph

14 commits

Author SHA1 Message Date
Amir Hammad
c9869466dd remove detection of hang
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:47 +02:00
Amir Hammad
2c23090d49 core: use new control wrapper to set configuration to device
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:47 +02:00
Amir Hammad
7c4ae8d7aa core: use new control wrapper to read device descriptor
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:47 +02:00
Amir Hammad
d4c74c55c3 core: use new control wrapper to set device's address
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:47 +02:00
Amir Hammad
c4e6f3b55b core: add helper state machine for control read/write
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:47 +02:00
Amir Hammad
58fec7a17c Drop need for the set configuration request in dev drivers
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:47 +02:00
Amir Hammad
a75535e52b core: Simplify device removes
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:47 +02:00
Amir Hammad
28ccd32608 core: adjust search for the device driver
in finding compatibility there are 3 steps how to find
out whether the provided device driver supports currently
inserted device.

1. compare fields in the driver info structure
If there is a match (all CHECK_PARTIAL_COMPATIBILITY() macros return true),
we proceed to step 2.
If all device drivers are searched, but none is compatible ->
that means no device driver is available for currently inserted device.

2. try to call driver's init function.
If it return non-null pointer to data we may proceed to the step 3.
Otherwise, we continue in the loop handling step 1.

3. call analyze descriptor for all descriptors. When it returns true,
it means success and that the driver supports current device. From now on
poll function is allowed to be called.
If all descriptors were provided to the analyze_descriptor method and
it still returns false, it means device driver is not initialized and
should not be used with this device.

Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-08 07:54:06 +02:00
Amir Hammad
4aa69b4eaf make usbh_packet->data of union type
out: const void *
in: void *

Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-08 07:54:06 +02:00
Amir Hammad
e0fbb799bd usbh_core refactor
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-08 07:54:06 +02:00
Amir Hammad
3493c1c087 fix bmRequestType field - use of defines
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-01 10:36:36 +02:00
Amir Hammad
64969f1935 usbh_core: logs: DEVICE DESCRIPTOR EOL
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-07-30 14:12:23 +02:00
Amir Hammad
3e95b389c3 add option to pass data to control writes
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-07-30 12:24:20 +02:00
Amir Hammad
4f3a3905c9 rename usbh_hubbed.* to usbh_core.*
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-07-08 23:53:42 +02:00
Renamed from src/usbh_hubbed.c (Browse further)