summaryrefslogtreecommitdiff
path: root/src/usbh_driver_ac_midi.c
diff options
context:
space:
mode:
authorAmir Hammad <amir.hammad@hotmail.com>2016-09-01 16:07:48 +0200
committerAmir Hammad <amir.hammad@hotmail.com>2016-09-08 07:54:06 +0200
commit28ccd32608bb3daf0f8137eb1521f382f69d120d (patch)
treebdceb5b111d479ee29a5cfd016348feeb61c57f2 /src/usbh_driver_ac_midi.c
parent4aa69b4eaf44757aa71997e4a59f0889ea6e23f4 (diff)
downloadsecure-hid-28ccd32608bb3daf0f8137eb1521f382f69d120d.tar.gz
secure-hid-28ccd32608bb3daf0f8137eb1521f382f69d120d.tar.bz2
secure-hid-28ccd32608bb3daf0f8137eb1521f382f69d120d.zip
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>
Diffstat (limited to 'src/usbh_driver_ac_midi.c')
0 files changed, 0 insertions, 0 deletions