Commit Graph

12 Commits

Author SHA1 Message Date
Anas Nashif 89ead817b7 usb: do not assert on a variable we do not have
Jira: ZEP-967
Change-Id: I98ef740bb72f8779079ba2ae469b1079c292840d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-24 08:12:35 -04:00
Andrei Emeltchenko 03b5412849 usb: Allow to register and handle vendor specific commands
At the moment we cannot handle vendor specific commands resulting in
error with following message:
...
[DBG] usb_handle_request: No handler for reqtype 2
[DBG] usb_handle_control_transfer: usb_handle_request failed
...

Change-Id: Ic899300e0c420c58ac3f86ecf5f5ec45955bd46f
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-09-12 00:43:31 +00:00
Andrei Emeltchenko 4ea0ab9ac0 usb: Fix compile error with debug enabled
...
usb_device.c:265:27: error: expected ')' before 'chunk'
    SYS_LOG_DBG(chunk > 0 ? "?" : "");
                           ^
...

Change-Id: I7d9f583c8591c7f86389c26338d70422e422fe4b
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-08-10 15:27:36 +00:00
Andrei Emeltchenko 953165cda1 usb: Fix incorrect macro assignment
We should prepend CONFIG with macro name, otherwise it is not possible
to enable debug.

Change-Id: I9a4ec4da7607c6bc9894eecc42fe7c4556b62c6b
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-08-10 15:27:36 +00:00
Jithu Joseph 93f8009eb6 usb/cdc_acm : Unsupported functions return error code
Poll functions were not implemented for the cdc_acm
USB uart since the underlying USB device controller
always uses interrupts.
We return -ENOTSUP and 0 rather than leaving unimplemented.

Jira: ZEP-595

Change-Id: I02d9e693694d03296da3c815cdda53f151e06f6d
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2016-08-05 20:39:10 +00:00
Genaro Saucedo Tejada 31994e0645 sys_log: replace old debug macros at USB stack
USB stack is now using new system log macros, updated the Kconfig
variable to be a level rather than a bool and the .conf files at
samples.

JIRA: ZEP-311

Change-Id: I873ee0f12b81a364307cdac27a2e058a43d4c9ea
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-07-31 21:02:25 +00:00
Genaro Saucedo Tejada eaebd1774b sys_log: replace USB CDC ACM Device Class Driver debug macros
USB CDC ACM Device Class driver is now using new system log macros
also updated the Kconfig variable to be a level rather than a bool.

JIRA: ZEP-311

Change-Id: I7093255f34ab514b030882ef4f54c955e7e848ec
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-07-31 18:13:27 +00:00
Kumar Gala 85ce09ca4b usb: Fix typo in comment
CONFIG_UART_LINE_CTR should be CONFIG_UART_LINE_CTRL

Change-Id: Ie3c9b1f5f77633cc352803c2e2daed46a6fcd9a5
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-07-28 07:20:12 -05:00
Adrian Bradianu 273c87b33e usb: cdc acm: Change Bulk Out handler to read data per 32-bit words
Quark SE USB controller is always storing data in the FIFOs per
32-bit words. Change Bulk Out handler to read data per 32-bit words.

Change-Id: I871278a754895edc5c7a395797b6dab0904bcdf6
Signed-off-by: Adrian Bradianu <adrian.bradianu@windriver.com>
2016-07-08 18:22:19 +00:00
Adrian Bradianu ab2c18b0ad usb: Move LOW_BYTE and HIGH_BYTE to samples code
Move LOW_BYTE and HIGH_BYTE macros from usb_common.h to
samples code.

Change-Id: I26296bde8c5b3991b3bfab71272c861b5360ce97
Signed-off-by: Adrian Bradianu <adrian.bradianu@windriver.com>
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
2016-06-30 17:51:58 +00:00
Adrian Bradianu 3d8b28b358 usb: Add CDC ACM and DFU class examples
CDC ACM sample class driver implements a virtual UART port.
SET_LINE_CODING, GET_LINE_CODING and SET_CONTROL_LINE_STATE
class requests are supported.

DFU class example does not perform an actual firmware upgrade,
instead it allows the user to upload a file at a predetermined flash
address or to download the content from that flash address.

Change-Id: I702e6727db15ef360d110a70a979c1e4bd4ee1bb
Signed-off-by: Adrian Bradianu <adrian.bradianu@windriver.com>
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2016-06-30 17:51:57 +00:00
Adrian Bradianu 7a16ade6d1 usb: Add USB device core layer
USB Device core layer is a hardware independent interface between USB
device controller driver and USB device class drivers or customer
applications. It's a port of the LPCUSB device stack.

Change-Id: I9371ffab7034d20953fec0525e72fbe9e094c931
Signed-off-by: Adrian Bradianu <adrian.bradianu@windriver.com>
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2016-06-30 17:51:56 +00:00