The device_get_binding() no longer returns pointers
to device struct when driver_api is NULL. Therefore,
there is no need to check for driver_api being NULL
in the serial driver wrapper functions.
Change-Id: I018a409324d7c1ae83c699a3ebf30f2f2abfb3b3
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This changes the behavior of device_get_binding() so that
it returns NULL if driver_api is not set. This provides
a way for driver to state that it has not been initialized
properly, and prevents app from using it since no reference
to the device struct will be returned.
This implements the idea specified in [1]. The idea is to
reuse an existing resource by piggy-backing onto driver_api,
thus avoiding an extra "device state" variable in the device
struct. This differs from the code specified in the mailing
list by checking driver_api for NULL first. This avoids
the unnecessary strcmp() if driver_api is NULL.
[1] https://lists.zephyrproject.org/archives/list/devel@lists.zephyrproject.org/message/MZB5PYBSRHV3NIEHJYXYQVLTPFIIHPB3/
Change-Id: I978b1a6683cd56c8a72532d6368c47e67515c82d
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This moves the assignment of driver_api to just before
the init function returns. This is in preparation to
make device_get_binding() return NULL if driver
initialization fails.
Change-Id: I69590c463b84877d250c63d4460b7e254b79c8b3
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This moves the assignment of driver_api to just before
the init function returns. This is in preparation to
make device_get_binding() return NULL if driver
initialization fails.
Change-Id: Ibf08cb107885da7c1037c6e7d207530e1a4708f8
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This moves the assignment of driver_api to just before
the init function returns. This is in preparation to
make device_get_binding() return NULL if driver
initialization fails.
Change-Id: Ia0c7a0014eb28624cbf363f994d6149f1aa5aadd
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Demonstrate the use of SPI flash driver API on Arduino 101 board.
This is a re-submit of a previous merged patch which was reverted
because merge sequence was incorrect (the test app got merged
before the driver).
Origin: Original
Change-Id: I3fce61488ed7d48f400c12448f1c7a01c555661c
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
Add read multiple attributes request and response. Update RPC version
to niko-0412.
Change-Id: I5dfd99a1b8af866b69eae230ad24304eafccab4d
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Fixes a problem where the nanokernel FIFO state information could get
out of sync due to a timeout.
The nanokernel FIFO structure nano_fifo now maintains two separate
queues: one for waiting fibers and the other for posted data. This
permits the safe and independent querying of the queues as needed
when getting and/or putting data from/on the nanokernel FIFO.
Change-Id: Ifbcb5004558b06fc55cad2a955f5be20e716b392
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Moves up and consolidate the BREDR specific code to skip certain forward
declaration and to prepare for possibility to initiate authentication
using start_security() routine.
Change-Id: Ic32d7d1376173d47b0eb0481eff37c6e56f995d4
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
This reverts commit 3d08d16780.
The Read Response only contains a Characteristic Value that is less than or
equal to (ATT_MTU – 1) octets in length so, condition
(length < bt_att_get_mtu(conn)) is always true, and the full Characteristic
Value will not be read.
Change-Id: I63280e65b4ff5b830295aa9aadebe2758b626912
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
There is no need to have separate configs as init sample is now
used for different build configuration tests.
Change-Id: I917692f8a8e96345afc561dd04bdcf08cdfa5de7
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
Refines pairing method holder name to be more generic in connection object
representing applied method during authentication process.
Change-Id: Ia6f51788912974fbbda26b760d187c0f7e24bb0b
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Now that the incoming ACL & HCI event pools can be defined externally
to hci_core.c there should be convenience macros to know what's the
minimum required buffer size for these pools.
Change-Id: I6f2a7322a3d77e1304e9d925767a1fd3471c76c7
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
So far the assumption has been that the host stack manages all
incoming and outgoing buffers. For the incoming buffers (from the
controller) this has required hci_core.c to manage its own pools and
do the host flow control. This setup makes perfect sense for an
architecture where the controller resides remotely on a different CPU
& address space (i.e. the "traditional" HCI transport case).
When the stack runs on a system where the controller resides in the
same address space this setup doesn't work that well. In such a
scenario the incoming buffers are ideally created as low down in the
stack as possible (i.e. below HCI), which means that the current
hci_core.c cannot be responsible for managing their pools.
To allow for both types of architectures this patch introduces a new
BLUETOOTH_HOST_BUFFERS Kconfig option that can be selected to say that
host-side management is desired, or deselected to say that the
controller (residing in the same address space) takes care of managing
the incoming buffers.
So far the incoming buffer types were identified by hci_core.c by
looking at their "free pool" pointers, however as soon as the pools
are allowed to be somewhere else this doesn't work. To solve this we
now require a minimum user data size for all Bluetooth buffers and use
that to store the buffer type.
Change-Id: I14bc32007e3e3f17c654f71f79b520650028d7ce
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This reverts commit 5680396aaa.
The network timers do not trigger with this patch so this needs
to be reverted for time being.
Change-Id: If653e3ecaae1ebddabe26227af876ff6b592675b
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This information will be used to construct the fixed channel mask in
the L2CAP information response.
Change-Id: I66244ca2d5e40b3d204f5115c4bddad578f3ea64
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The same l2cap_recv function is now used for BR/EDR as well so remove
LE references from the logs.
Change-Id: I841ceea2eee72ee099be922eb00c1f6a3a16a787
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Makes room for L2CAP signal channel transport and start listening
on signalling CID.
Change-Id: I152973a9a9e672f0b4f66b06055e305561123f34
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Applies L2CAP CID valid values based on link type and proper limitations
according to BT Core L2CAP spec principles.
Change-Id: Ifa0719cf593d1d22977da59fb8a6c0ed9c3a176b
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Makes possible to initiate L2CAP signalling handling on set connection
based on connection transport type.
Change-Id: I114dc3e4408f428301628520a569a2b087c325b8
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Makes available to register fixed L2CAP signalling channel on
dedicated channels list.
Change-Id: I9a90a64dac40b34799353ff261ba570541347084
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Renames routine to be clear to be used to register LE L2CAP fixed
channel only. The routine operates on le_channels list object that also
was renamed to reflect the connection type. Updates all calls to
the procedure in the stack.
Change-Id: I01348b8186a0f537532f6a7b9dc59586827b204b
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Link with libm.a before libc.a, as libc.a can contain
references used by libm.a.
Change-Id: I5cde8f2e323f59ecae452a8a868a5d54942e9f39
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
The ordering of the list of platforms is in priority order,
as the sanitycheck --platform-limit option chooses the first
N platforms in this list when doing a run. Move arduino_101 to
second position. qemu_x86_iamcu is still top priority as it
can execute code as part of the tests.
Change-Id: I989d91c66a0a741ce8eebe6279ee4512c33eb5e9
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Add the last path information in the testcase root to the
test name, so that there is much less of chance of name
collisions and the reports come out with the same names
as before.
Change-Id: I75ed6ee96251058dd2547e57be31db3c2517a497
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Create a new top-level section in the primer that includes sensor
drivers and the synchronous call API.
Change-Id: I0c1b734ec56abc20724ff682caba618ab0965230
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
A recent tree change moved testcases to both the tests/ and
samples/ directory. The default testcase root was just made
the root of the Zephyr tree, which could lead to potentially
long scan times as every single directory in-tree was checked.
For example, it could be very time-consuming to scan everything
under the sanity-out/ dir if -n is used and --all was used in
a previous run.
Now we allow multiple testcase roots to be supplied on the
command line, and by default only scan under tests/ and
samples/.
Change-Id: I8dac747835b87801474e08c236913e04db64f87b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This adds the ability for sanitycheck to use arbitrary report file
for size comparison. This is useful when optimizing binary size.
For example, a report can be generated with master head, and used
as base for comparison.
Change-Id: Id8c61146c498ba62c4cc77a9ef7d390c0fb11487
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The D2000 CRB is similar to the Arduino 101 (at least as GPIO is
concerned). Add support for using the GPIO controller without QMSI
libraries.
Change-Id: I001da05c9a9d5771b2ec678a9d4a91c44db05289
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
Currently there's no support for the H:5 driver on Arduino 101, so the
defaults set in defconfig should only be limited to the H:4 UART
driver.
Change-Id: I805d81c33701d179ffe26f4aed3fe2fb70d60d7b
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
SDK version 0.7.5 has fixed ZEP-62. It is no longer necessary to use
-O0 in order to get correct readings from sensors.
Change-Id: Ia8ac2f55453b7dfdda71fe2f41863cbd0b366739
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
If an external PCIe card inserted into Galileo board, the
devices I/O addresses may differ from the preconfigured ones.
For this reason PCI enumeration needs to be enabled.
Change-Id: I54b5ef9149f9eda0a390909a433b0e13a3dd7ecd
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
Device drivers may use task_sleep() routine during the initialization.
As device driver initialization is carried by idle task, it can not
be sheduled out as any other task. Idle task goes into a wait loop
instead.
In order to invoke task_sleep() device drivers must enable
CONFIG_NANO_TIMEOUTS option.
Change-Id: Ib73a2ad1f3c0bda44c24f2417e102bfaa3a13a15
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
Not only SECONDARY, but also the following ones:
- NANOKERNEL
- MICROKERNEL
- APPLICATION
Change-Id: Id41fa572c830727166101fa3c6254398857b31c7
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Instead of running nm/objdump and parsing the results one testcase
at a time, do these in parallel to speed up sanity check a bit.
The sanitycheck now requires at least Python 3.2 to run because of
the usage of concurrent.futures.
This reduces build time (--all -b) from 4:30 to 3:08 on 24C/48T
Xeon-E5.
Change-Id: I8e7c1efb2f473c7f2b65658f8ed9a101ed091eea
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
CoAP observe notifications are originated from server, those
are not replies. So create a new buffer and copy remote address
and port number from obs list. Set udp_conn to null as this is
new buffer. Reason for setting the udp_conn to null is that there
is a chance that buffer might already have udp_conn set due to
reusing same buffers.
Change-Id: I3c7eada987cf539d77ea162b6f5901791cfa6ee0
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Need to use the network buffer when sending CoAP serial message
because the message was constructed to net_buf
Change-Id: I74c54178707edf2d8451ce5ac719d63f99661332
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
After removing extra header from IP packet, only uip_len is
updated not ip_buf_len. uip_len parameter is set to zero
at some point after handover to net_core. From net_core
only ip_buf_len holds the actual length. So update ip_buf_len
after removing extra header.
Change-Id: I2cc03ed1125df5216a0fa6e94eebfeee0a343481
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
User can activate debugging in coap observe and well-known by
setting CONFIG_NETWORK_IP_STACK_DEBUG_COAP_OBSERVE and
CONFIG_NETWORK_IP_STACK_DEBUG_COAP_WELL_KNOWN option in config file.
Change-Id: Id63824c88df1a84586518eaec8a8a929ae04b717
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
User can activate debugging in simple UDP and UDP packet by
setting CONFIG_NETWORK_IP_STACK_DEBUG_SIMPLE_UDP and
CONFIG_NETWORK_IP_STACK_DEBUG_UDP_PACKET option in config file.
Change-Id: I581d4b33204f26119c5b194cb367adad8c6505c2
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>