Even if endpoint addresses are configurable by each platform,
it would be better to make the default configuration compatible
with a larger board range.
e.g. STM32 OTG FS device has only four endpoints (0x84 is out).
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Introducing CMake is an important step in a larger effort to make
Zephyr easy to use for application developers working on different
platforms with different development environment needs.
Simplified, this change retains Kconfig as-is, and replaces all
Makefiles with CMakeLists.txt. The DSL-like Make language that KBuild
offers is replaced by a set of CMake extentions. These extentions have
either provided simple one-to-one translations of KBuild features or
introduced new concepts that replace KBuild concepts.
This is a breaking change for existing test infrastructure and build
scripts that are maintained out-of-tree. But for FW itself, no porting
should be necessary.
For users that just want to continue their work with minimal
disruption the following should suffice:
Install CMake 3.8.2+
Port any out-of-tree Makefiles to CMake.
Learn the absolute minimum about the new command line interface:
$ cd samples/hello_world
$ mkdir build && cd build
$ cmake -DBOARD=nrf52_pca10040 ..
$ cd build
$ make
PR: zephyrproject-rtos#4692
docs: http://docs.zephyrproject.org/getting_started/getting_started.html
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
Sometimes we need to select Endpoint addresses manually to get it
working with certain USB controllers having limit for endpoints. In
this case default values break endpoint limit check. The proper
solution would be automatic endpoint allocation.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Add support for selecting Endpoint numbers and move it under USB
Device Networking menu.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
conf member represents the configuration state of the device.
Change its type from u8 to bool and clean related functions.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
netusb endpoint config is specific to the function (ECM, RNDIS, EEM..).
Move this config to the function interface.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Move class_handler and send_pkt to netusb function interface.
This makes netusb 'function' agnostic.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Today, we support/use only one USB configuration descriptor.
Moreover I assume multi-config support should be managed at
usb core level and not by each class driver.
Let's track one netusb function per netusb instance for now.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
In a case we get packet without fragments return -ENODATA.
The bug was discovered by Coverity.
Fixes#4637
Coverity-CID: 178334
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Use documentation defined values for virtual devices MAC addresses in
Zephyr and Host OS.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Ethernet emulation device allows to use networking interface for
interaction with USB endpoints.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Vendor ID and Product ID should be assigned on build time by
respective process.
For sanity check we assign some random values which are only used for
build tests and should not be used for real products.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This patch adds composite support for USB class drivers.
It acts as a relay between the usb_device stack and
class or function drivers.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Add common device descriptor for USB class devices.
The common descriptor allows easy configuration of Manufacturer,
Product, SerialNumber strings and PID/VID.
It also allows future support for composite devices.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Composite multifunction USB devices should be able to know about
configuration change, implement it through existing callback.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Sometime it is observed on the Arduino 101 that when we write more than
4 bytes into TX USB Endpoint, first 4 bytes are getting repeated
(frequency of occurrence ~1/3000).
This patch does following :-
1. In sample application "cdc_acm", it adds capability to
handle partial transfer data incase data is transferred partially
if exceeds maximum data transfer size.
2. It restricts write of more than 4 bytes into TX USB Endpoint.
This is work around to avoid issue occarance.
Jira: ZEP-2074
Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The highest endpoint number supported by the STM32F4xx USB device
controller is 3. Change the cdc_acm driver to use endpoint 2
instead of endpoint 4 so that it will work with this platform.
Change-Id: I4a3cd08f546a7fe01558528de0990156f642d93b
Signed-off-by: Christer Weinigel <christer@weinigel.se>
Convert code to use u{8,16,32,64}_t and s{8,16,32,64}_t instead of C99
integer types.
Jira: ZEP-2051
Change-Id: Icbf9e542b23208890a3a32358447d44cdc274ef1
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Fix doxygen comment typos used to generate API docs
Change-Id: I3efff6f5fa26f87d1e658d6336fef01ce45f5bb0
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Replace the existing Apache 2.0 boilerplate header with an SPDX tag
throughout the zephyr code tree. This patch was generated via a
script run over the master branch.
Also updated doc/porting/application.rst that had a dependency on
line numbers in a literal include.
Manually updated subsys/logging/sys_log.c that had a malformed
header in the original file. Also cleanup several cases that already
had a SPDX tag and we either got a duplicate or missed updating.
Jira: ZEP-1457
Change-Id: I6131a1d4ee0e58f5b938300c2d2fc77d2e69572c
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>