Commit graph

33 commits

Author SHA1 Message Date
Amir Hammad
0432429aa6 move USE_STM32f4_USBH_DRIVER_HS/FS from config.mk to usbh_config.h
Leave the behaviour as before: Default: FullSpeed

Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-06-25 10:09:54 +02:00
Amir Hammad
4bf0db8f7b add todo: clean-up makefiles
* organize files properly into directories
* avoid the need for make clean

Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-06-20 22:42:15 +02:00
Amir Hammad
2963113e8e Merged usb midi code into current libusbmaster
+ merge fixes

Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-06-20 22:34:32 +02:00
Amir Hammad
4cbbb39624 lld/stm32f4: Send correct amount of data
+ added logging output of data that is going to be sent.

Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-08-26 08:00:40 +02:00
Amir Hammad
631a614c81 Device driver/gp_xbox:Use correct endpoint type:INTERRUPT
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-08-26 07:53:00 +02:00
Amir Hammad
4abcb07a75 lld/stm32f4: fix bug, setting wrong eptyp field
it was always 0 - control transfer...

Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-08-26 07:46:00 +02:00
Amir Hammad
9f0651caf9 Make: Compile also *.cpp files
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-08-26 07:46:00 +02:00
Amir Hammad
b45e10a391 usbh_hubbed: set packet_size_max0 field also when DT_DEVICE returns OK
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-26 07:46:00 +02:00
Amir Hammad
eb80e43818 Device driver/mouse: use correct endpoint type: INTERRUPT
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-08-26 07:46:00 +02:00
Amir Hammad
1566e7012f hub: Empty packet readings after SET_ and CLEAR_ commands
* 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-29 18:18:44 +02:00
Amir Hammad
09c861c975 gp_xbox: Do not allow unitialized driver to be loaded
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-07-13 16:18:03 +02:00
Amir Hammad
f8658f9411 mouse: Do not allow unitialized driver to be loaded
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-07-13 16:17:28 +02:00
Amir Hammad
3003006216 hub: Do not allow unitialized driver to be loaded
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-07-13 16:16:39 +02:00
Amir Hammad
33856ce17c Global logging: use \n for a new line instead \r\n in LOG_PRINTF
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-07-13 14:54:15 +02:00
Amir Hammad
54f3b37a71 usbh_hubbed: When in unknown state, print Error
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-07-13 14:54:11 +02:00
Amir Hammad
0c04dcd6ef usbh_hubbed: cleaning newlines after break; in switch
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-07-13 14:54:09 +02:00
Amir Hammad
99f24e9389 hub: Fix forgotten break
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-07-13 14:53:56 +02:00
Amir Hammad
4b23cb4850 demo: timer: BUGFIX: TIM6 prescaler
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-15 20:26:09 +02:00
Amir Hammad
187d01e3b2 Device drivers: Refactor: Remove prefixes of static functions and variables
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-04-08 08:08:55 +02:00
Amir Hammad
6625cda9f3 Device drivers: Refactor: Move driver declaration to the end of file
forward declarations are not needed

Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-04-08 08:08:48 +02:00
Amir Hammad
ba197f8007 lld: stm32f4: refactor: Remove prefixes of static functions and variables
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-04-08 08:08:34 +02:00
Amir Hammad
7503fd901a lld: stm32f4: Move driver definitions to the end of file
This way, we don't need forward declarations

Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-04-08 08:08:09 +02:00
Amir Hammad
5622fb0fda usbh_hubbed: device_register: Don't check for USB_DT_DEVICE twice
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-04-07 19:17:54 +02:00
Amir Hammad
0827b6982b LLD: stm32f4: change type of i to signed integer
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-06 19:53:03 +02:00
Amir Hammad
f86aacc59c Refactor device drivers: don't use automatic casts
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-04-06 19:52:48 +02:00
Amir Hammad
e31939e22f usbh_hubbed: reorder items in _usbh_dev_driver struct
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-04-05 13:27:44 +02:00
Amir Hammad
efa0baa458 use stdbool.h to define bool type
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-04-05 12:14:47 +02:00
Amir Hammad
0da537ec69 Device driver/hid_mouse: Bugfix enum STATES
fixing after enum STATES refactor.

Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-04-05 11:52:38 +02:00
Amir Hammad
ae3449a302 demo: More precise timing, using TIM6
Overflows in 6.5536 seconds

Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-04-01 19:08:53 +02:00
Amir Hammad
e35c1e9fc6 poll(): refactor every poll argument t_us and tflp -> time_curr_us
added comment to usbh_hubbed.h

Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-04-01 18:29:32 +02:00
Amir Hammad
e9c2632a19 lld: stm32f4: poll(): fix return value
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-04-01 18:23:59 +02:00
Amir Hammad
c6aa4d99c2 demo: rcc_peripheral_enable_clock->rcc_periph_clock_enable
Instead of 2 argument call, use function with one argument.
It is more clear, and safer for inexperienced users with libopencm3.

Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-04-01 18:05:00 +02:00
Amir Hammad
7acc6fe474 libusbhost: Open source USB host stack for embedded devices
First public version, date: 1.4.2015

Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2015-04-01 16:22:05 +02:00