summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-09-11make hid_mouse driver generic HID driverAmir Hammad8-365/+648
+ keyboard support + SET_REPORT commands - usually leds on keyboards (WIP) - missing parsing of HID report descriptor Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11Switch to cmake build systemAmir Hammad19-381/+1012
* use tinyprintf * ability to configure project via ccmake Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-08core: adjust search for the device driverAmir Hammad1-28/+29
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-08make usbh_packet->data of union typeAmir Hammad7-17/+20
out: const void * in: void * Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-08usbh_core refactorAmir Hammad2-83/+118
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-01fix bmRequestType field - use of definesAmir Hammad4-18/+18
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-08-30hub: fix commented out code and commentsAmir Hammad1-14/+2
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-08-23core: make endpoint_type of enum USBH_ENDPOINT_TYPEAmir Hammad1-1/+1
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-08-23remove not needed carriage returns in printfAmir Hammad3-3/+3
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-07-30usbh_core: logs: DEVICE DESCRIPTOR EOLAmir Hammad1-1/+1
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-07-30lld: stm32f4: fix logsAmir Hammad1-2/+2
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-07-30add option to pass data to control writesAmir Hammad7-32/+60
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-07-25Fix broken demo after reworkAmir Hammad1-2/+2
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-07-09Adjust documentation to fit doxygenAmir Hammad7-14/+27
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-07-09Add doxyfileAmir Hammad4-1/+2413
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-07-08rename usbh_hubbed.* to usbh_core.*Amir Hammad12-14/+14
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-07-08lld: stm32f4: adjust reporting of the unahandled block of codeAmir Hammad1-1/+1
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-07-08rename usbh_driver to usbh_low_level_driverAmir Hammad3-11/+11
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-07-08documentation: add some basic documentation accross the headersAmir Hammad7-20/+171
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-07-08refactor: use enum instead of #define: USBH_ENDPOINT_TYPE and USBH_SPEEDAmir Hammad7-30/+33
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-06-25Embed information about compilation with the debug functions into make outputAmir Hammad2-29/+2
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-06-25Don't compile usart_helpers.o when USART_DEBUG is not definedAmir Hammad2-2/+6
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-06-25let the user build an array of lld driversAmir Hammad3-13/+10
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-06-25move USE_STM32f4_USBH_DRIVER_HS/FS from config.mk to usbh_config.hAmir Hammad4-8/+8
Leave the behaviour as before: Default: FullSpeed Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-06-20add todo: clean-up makefilesAmir Hammad1-1/+2
* organize files properly into directories * avoid the need for make clean Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-06-20Merged usb midi code into current libusbmasterAmir Hammad6-0/+522
+ merge fixes Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-08-26lld/stm32f4: Send correct amount of dataAmir Hammad1-2/+15
+ added logging output of data that is going to be sent. Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-08-26Device driver/gp_xbox:Use correct endpoint type:INTERRUPTAmir Hammad1-1/+1
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-08-26lld/stm32f4: fix bug, setting wrong eptyp fieldAmir Hammad1-3/+8
it was always 0 - control transfer... Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-08-26Make: Compile also *.cpp filesAmir Hammad1-2/+4
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-08-26usbh_hubbed: set packet_size_max0 field also when DT_DEVICE returns OKAmir Hammad1-0/+1
packet_size_max0 was set only if it was 8. It was not working for 16 or 32. Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-08-26Device driver/mouse: use correct endpoint type: INTERRUPTAmir Hammad1-1/+1
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-07-29hub: Empty packet readings after SET_ and CLEAR_ commandsAmir Hammad2-9/+25
* fixed typo/bug: "hub->state += 2" must have been "hub->state = 2" to issue empty read Now, after each SET_ or CLEAR_ command, empty read is issued. + removed forward declaration of event() - cleaning Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-07-13gp_xbox: Do not allow unitialized driver to be loadedAmir Hammad1-2/+2
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-07-13mouse: Do not allow unitialized driver to be loadedAmir Hammad1-1/+9
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-07-13hub: Do not allow unitialized driver to be loadedAmir Hammad1-1/+8
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-07-13Global logging: use \n for a new line instead \r\n in LOG_PRINTFAmir Hammad7-66/+66
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-07-13usbh_hubbed: When in unknown state, print ErrorAmir Hammad1-0/+4
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-07-13usbh_hubbed: cleaning newlines after break; in switchAmir Hammad1-0/+2
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-07-13hub: Fix forgotten breakAmir Hammad1-0/+5
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-04-15demo: timer: BUGFIX: TIM6 prescalerAmir Hammad1-1/+1
TIM6 has clock running at 84MHz instead of 168MHz, so set the prescaler accordingly. Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-04-08Device drivers: Refactor: Remove prefixes of static functions and variablesAmir Hammad3-31/+31
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-04-08Device drivers: Refactor: Move driver declaration to the end of fileAmir Hammad3-72/+57
forward declarations are not needed Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-04-08lld: stm32f4: refactor: Remove prefixes of static functions and variablesAmir Hammad1-19/+19
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-04-08lld: stm32f4: Move driver definitions to the end of fileAmir Hammad1-47/+38
This way, we don't need forward declarations Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-04-07usbh_hubbed: device_register: Don't check for USB_DT_DEVICE twiceAmir Hammad1-9/+0
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-04-06LLD: stm32f4: change type of i to signed integerAmir Hammad1-2/+3
this was causing infinite loop, when size of the data was not multiple of 4. Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-04-06Refactor device drivers: don't use automatic castsAmir Hammad3-16/+16
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-04-05usbh_hubbed: reorder items in _usbh_dev_driver structAmir Hammad1-1/+1
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-04-05use stdbool.h to define bool typeAmir Hammad1-7/+1
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>