Add testing for fragmented buffers to the net_buf test.
Change-Id: Id6c541b86c30ac94931a7086ebb6f1312fbc34f7
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Freeing the fragment list by recursively calling net_buf_unref() is
elegant but dangerous. Since we have fairly small stack sizes it'd be
possible to overflow the stack if the user creates a very long list of
fragments (empirical tests showed that some 21 fragments is enough to
kill a 2k stack). Instead, use a while-loop for freeing up the
fragments, thereby guaranteeing a fixed upper bound for net_buf_unref()
stack usage.
Change-Id: Ibfe794fa717d1cddc84365c7b7b9cff4024edbf6
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Introduce support buffer fragment chains that are linked together.
This is done with the help of a flag while the buffer is inside a FIFO
(indicating that the next fragment follows it in the same FIFO) and
with the help of a "next" pointer while the buffer is outside of a
FIFO.
In order to do proper "marshaling" a new net_buf_put() API needs to be
always used when inserting a buffer into a FIFO. Respectively, the
net_buf_get() and net_buf_get_timeout() functions are extended to
support getting buffers from arbitrary FIFOs and reassemble the
fragment chain based on the flags that the received buffers contain.
The insertion of a fragment chain using net_buf_put() into a FIFO is
done atomically with the help of irq_lock/unlock since FIFOs support
multiple writers, however since there's ever only a single reader per
FIFO similar locking is not necessary there.
Change-Id: I0ec579f63ea8d063f50e3f1f4c2e80ec399622d7
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This makes debugging easier when HCI monitor is not used.
Change-Id: I0f4480266fd745163f2fd789bedc3bf8f2a3ceb4
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
When using a custom destroy callback it's the responsibility of the
callback of placing the buffer back in the free pool.
Change-Id: I5ff99c32bcb31ccc5eb0fad544d86b0c830e7051
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
If you pass arduino_101_factory, it expects a directory with that name,
but really the directory arduino_101 contains the factory config.
Change-Id: I12ce11c0e32a9d50998b52c2e2c16780b6ce00da
Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
address was passed to QMSi port read function, even though
value is needed.
Change-Id: I6b923fdc56114936fb4a0c55c923d6b37884e07c
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
Include nrf.h instead of directly using the specific header
required. This will be useful in the future when additional
Nordic ICs are supported.
JIRA: ZEP-377
Change-Id: I7a7257b0aaa5fa0a0d202322c366efbdd1d84458
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Translate CONFIG_SOC_SERIES_NRF52X to NRF52, which is the macro
expected by the Nordic MDK headers.
JIRA: ZEP-377
Change-Id: Ic846e4cddf8146ae9d96bc98d4b12311552dc4f6
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Update to version 8.6.0 and include nrf.h and the additional
files it requires for nRF52. This is so drivers targetting the
nRF Family can include nrf.h directly instead of *nrf5*.h
Origin: Nordic MDK 8.6.0
URL: http://www.nordicsemi.com/eng/Products/Bluetooth-Smart-Bluetooth-low-energy/nRF52832
Maintained-by: External
JIRA: ZEP-377
Change-Id: I71ad9828e1cf95e4d6ef09182a24f00e7d9f01ad
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
More commits have ended up in the tree with incomplete author
information. Add entries for these to .mailmap so at least
git shortlog shows them correctly.
Before:
3 Aceves
3 ktseng
1 bitpathe
1 cacu
After:
19 Gerardo Aceves
3 Kuo-Lang Tseng
1 Bit Pathe
9 Carles Cufi
Change-Id: I793f1fb0f5aee25ee189d2102ef88ee24ac348d6
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Update the prj.conf file, as the driver and Kconfig options for the BMP280
sensor were renamed to BME280 the following commit:
310ed1e sensor: add support for BME280
Change-Id: If3d81d90c269883aa51ff04a12f8fd1aa444a592
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
Add support for using the MyNewt Bluetooth firmware with the
environmental sensing sample.
Change-Id: I7e5050bc9d1f0edb0df007dd3db4f7e6abd60136
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
Similar to '==' but compiles the RHS into a regular expression
and attempts to match whatever is in the environment against it.
Change-Id: I7a03452ef88d067b62661d14dc6f42273de436fa
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Do not use the QMSI specfic define, use the one define in the
i2c API instead.
Change-Id: I979673e35060d041cb97f4de178069e2bdfd2c7b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
BT_DEV_ENABLE flag value must be preserved after HCI reset is complete
to not allow calling bt_enable more then once.
Change-Id: I77bf6111d4fc2a209e0c5a56717decba156068a6
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
Print commands names when matched instead of first creating
completion string in buffer. Common part of commands names
can only be reduced when matching further commands so only
first match needs to be kept for altering command line.
Change-Id: I5a9d2eb171ef4d31da9cbe6e93b577457b13c5a2
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
I see in the TOP makefile that if FLASH_SCRIPT is undefined,
it outputs the message "Flashing not supported with this board".
This behavior is wanted currently as this board does not
have a memory mapped FLASH device. It has a SPI-FLASH and
there are different instructions for putting an image on to the board.
Change-Id: I07dcdd9a7fd8346b846ee0fe1312d22f9ffaa13e
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
Use the more explicit net_buf_get_timeout() call where it makes sense
(e.g. where we always want to wait or never want to wait).
Change-Id: Id1eabe0ad2f9fa79f7be39e51fefa5161f9cc550
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
With this API it's possible for the caller to force specific behavior
when it comes to waiting (or not waiting) on the FIFO.
Change-Id: Ib66e2f767c26c82abf1ba3b80bd15aec2383542e
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Tinycrypt is maintained at github and thus should be treated as an
external library and hosted under ext/.
Change-Id: I4c4a3bcdacf01d4922919e5ea1f9dec21a19cd37
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The driver for the HTS221 sensor was added with the wrong type stated in
the Kconfig file, as it is a temperature and humidity sensor and not a
magnetometer.
Change-Id: Icc50c9b7ccc491b1c22e13d00607123a45338b11
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
Marketing is telling me to switch URLs for the EM Starter Kit
board story.
Change-Id: I342849d1085330eb9e5e88f08374bb5889695702
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
There are a few problems with the code being repaired here.
1. A seti was used to re-enable all interrupts, even though the
thread being switched to may have had certain interrupt priorities masked.
2. saved status32 already has SC bit if thats wanted, so its ok to just
restore status32 as-is w/o needing to and off anything.
3. the code is difficult to write using kflag and seti because as you
restore registers, there aren't any to use. But we can exploit a
trick where we pretend an interrupt has occured by setting a bit in
AUX_IRQ_ACT, and then use RTIE instruction to restore status32
atomically with branching to return address. Something about the way
this code was written was causing stack corruptings and crashes in an
application that uses a high rate of both FIRQ and Regular interrupts.
Change-Id: Ia7166d51f0e750c07832ab115b7151ce37ee0278
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
Add driver for LSM6DS0 accelerometer, gyroscope and temperature sensor.
Change-Id: Ic04fa8d0bbf935e7f04ed7981554d8095ceb5ccf
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
The Bluetooth logs use format specifiers available with printf but not
with printk. Selecting STDOUT_CONSOLE enables printf support, which
makes the logs readable again.
Change-Id: I3e86f0bcf31688148a340eba6cdf33e81c64393d
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Check that callback is defined before call, fixes issue in
on_nble_sm_status_evt calling cancel callback.
Change-Id: Ie2f49ed6e441f4260dacd16120e09f892c1fd528
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This replaces use of delayed fiber with nano_delayed_work which uses the
system workqueue fiber and stack.
Change-Id: Ie127fc5eb6f38b38df072154a702d4efc34ed9f4
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This add CONFIG_BLUETOOTH_DEBUG_LOG which depends on SYS_LOG since the
later can actually use either CONFIG_PRINTK or CONFIG_STDOUT_CONSOLE.
Change-Id: Ib2974d1331f6c91d119a218ec95e8bf01069377b
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This will allow the driver to be safe from fibers and task
Jira: ZEP-411
Change-Id: I714f22c8df7002c45bed981c493e11af91c70d93
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
It is now safe to introduce the callback since nano_timer_init now
calls _nano_timeout_init which does takes care of initializing all
the fields properly.
Change-Id: I5735eeebef233a0a541ec8b2a354b65da98082fc
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
With the introduction of _nano_timeout_init it prefered to call it
to initialize the _nano_timeout fields properly.
Change-Id: I83e9c63f9bb2903c508264d1199d2c687c330ec8
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>