Commit graph

42249 commits

Author SHA1 Message Date
Jukka Rissanen
2ec63ec481 net: Add debug configuration for 802.15.4 network driver
User can toggle 802.15.4 network driver debugging from Kconfig.

Change-Id: I63f8e319172bce0561123416d18397468da671bf
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-16 15:25:16 +00:00
Jukka Rissanen
978b880e48 net: Allow user to activate 802.15.4 packet framing debug
User can set CONFIG_NETWORK_IP_STACK_DEBUG_15_4_FRAMING
to get debugs from 802.15.4 packet framing code.

Change-Id: I58155df19b6d63686a96ea410801d45632eb566b
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-16 15:25:06 +00:00
Jukka Rissanen
ffcfe9c44f net: Allow user to activate 802.15.4 MAC layer debugging
User can set CONFIG_NETWORK_IP_STACK_DEBUG_15_4_MAC
to get debugs from 802.15.4 MAC layer code.

Change-Id: Ie385c586caad1602869260146a1ea92d961b73c3
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-16 15:24:53 +00:00
Jukka Rissanen
54c1bd92f9 net: Allow user to activate 6lowpan compression debug
User can set CONFIG_NETWORK_IP_STACK_DEBUG_6LOWPAN_COMPRESSION
to get debugs from generic 6lowpan fragmentation code.
The generic code is shared between 802.15.4 and Bluetooth
bearers.

Change-Id: Iae6dcebe8fb4269e15bac5dcec2b63e79b4abcd3
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-16 15:24:44 +00:00
Jukka Rissanen
b7c6c2198f net: Allow user to activate 802.15.4 6lowpan frag debug
User can set CONFIG_NETWORK_IP_STACK_DEBUG_15_4_6LOWPAN_FRAG
to get debugs from 802.15.4 6lowpan fragmentation code.

Change-Id: I3a199cf9e5696a1017a290d182a0d7176b1c259e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-16 15:24:44 +00:00
Jukka Rissanen
7d805482c3 net: Kconfig debug option for debugging received and sent data
User can activate debugging in network stack when packets are
received and sent by setting CONFIG_NETWORK_IP_STACK_DEBUG_RECV_SEND
option in config file.

Change-Id: I7b45b6f9053664a03aa7dde79e7000b6063ac822
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-16 15:24:44 +00:00
Vlad Lungu
244d5f8d07 net: contiki: Fix net_buf lifecycle
siscslowpan_fragmentation would only free net_buf on failure.
nullmac does not touch the net_buf, this results in all net_buf
being exhausted eventually.
csma always frees the net_buf, so in case of failure there is a double
free with the one from siscslowpan_fragmentation.

Fix:
ref net_buf before every send, unref on every callback and once at the end,
regardless of result. Don't free or ref the net_buf in csma.

Also, replaced some code in fragment() with a call to send_packet()

Change-Id: I4f329810ace07c09cde8f7522a83a1d6681f0906
Signed-off-by: Vlad Lungu <vlad.lungu@windriver.com>
2016-03-16 14:20:56 +00:00
Vlad Lungu
0667c0fe0e net: contiki: move neighbor_list to struct l2_buf
When using the CSMA MAC driver, a new packet can be queued before
all the fragments of the previous one were sent. The transmit_packet_list()
function will start sending the old fragments with the new net_buf context.

Keep a per-context neighbor_list to avoid that

Change-Id: I9d41a923c48f597cc95a8f8c9f67884c5caac02c
Signed-off-by: Vlad Lungu <vlad.lungu@windriver.com>
2016-03-16 14:20:56 +00:00
Vlad Lungu
9be0ad915c net: contiki: Initialize uip_last_tx_status(mbuf) before use
When using the CSMA MAC driver, all send() calls but the last one
return without uip_last_tx_status(mbuf) being updated. If a mbuf
has uip_last_tx_status(mbuf) != MAC_TX_OK and is freed, the next time
it is allocated the first send() call will appear to fail and the packet
will be dropped.

Change-Id: I0fb388714f8071947fa0641fbe03e063550328db
Signed-off-by: Vlad Lungu <vlad.lungu@windriver.com>
2016-03-16 14:20:56 +00:00
Luiz Augusto von Dentz
19387677da Bluetooth: peripheral_esp: Add support for using NBLE driver
This adds support for building and testing peripheral_esp using NBLE
driver.

Change-Id: I962238d526101f8f423491d3023079684ec7d59f
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-03-16 13:27:29 +00:00
Andrei Emeltchenko
69805d0e9a drivers/nble: Implement passkey entry event
Implement on_nble_gap_sm_passkey_display_evt() calling passkey_entry
callback.

Change-Id: Iccad494480bd12b5f5ba51f2f64c3793cdf7ba09
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-16 13:26:58 +00:00
Andrei Emeltchenko
5fbcdf711d drivers/nble: Implement LE stop advertising
Implement bt_le_adv_stop() and handle response.

Change-Id: Id90c98188979dbb8cd54d773149e28cb81013510
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-16 13:26:48 +00:00
Andrei Emeltchenko
19013cf9ab drivers/nble: Implement on_nble_gap_sm_passkey_display_evt()
Implement passkey display event by calling appropriate callback from
bt_auth.

Change-Id: I95dadea454d15e139f3c840addb7a31875fa3171
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-16 13:26:38 +00:00
Andrei Emeltchenko
ad0e8b9195 drivers/nble: Refactor DM configuration
Take into account btauth callbacks for finding out IO capabilities.

Change-Id: Ifc35a1919c7e4d1b5ebaace7f13744f9b977d7e8
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-16 13:26:28 +00:00
Andrei Emeltchenko
8a18406f77 drivers/nble: Implement bt_conn_auth_cb_register()
Implement registering auth callbacks

Change-Id: I09d4f20c25075461fd53fdc08351d5940be22683
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-16 13:26:19 +00:00
Andrei Emeltchenko
998143b29c drivers/nble: Add skeleton for handling SM events
Add skeleton to handle events generated when trying to set security.

Change-Id: If9635690d50dce22a35dd0d05d8cc5046edaafee
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-16 13:26:06 +00:00
Andrei Emeltchenko
5ce49a844a drivers/nble: Implement bt_conn_security()
Implement bt_conn_security() for NBLE. We call
nble_gap_sm_security_req() which shall do all needed job.

Change-Id: I5fdccc2ea3e88266db8f940dc453547d5ea51f59
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-16 13:09:39 +00:00
Andrei Emeltchenko
04293a243e drivers/nble: Fix using UUID for GATT discover
Refactor code to be aligned with upstream Nordic BLE RPC. There UUID
is used only for primary service and characteristics.

Change-Id: I8fa840570c2535a73aaa68793a45013faacc59da
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-16 11:41:09 +00:00
Ravi kumar Veeramally
61372c4ece net: apps: Move Makefile.ipstack to common folder
Makefile.ipstack is more generic to net applications which
communicate through slip or between two qemus. So net apps
common folder is right place for it.

Change-Id: I57ca1eeaff28b853609daf92772361406131aa7e
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-03-16 11:40:17 +00:00
Ravi kumar Veeramally
b19f7fe5f4 net: apps: Add prj_qemu.conf files for dtls apps
Add prj_qemu.conf files for dtls_server and dtls_client. Now
it can be tested between two qemus running 802.15.4 dummy driver.

Change-Id: Id94492f90539025854063662c2f0750a0b9ca845
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-03-16 11:39:06 +00:00
Andrei Emeltchenko
93eabdf4c0 drivers/nble: Return -ENOTCONN when LE connection not exist
Correct error message sent to application using GATT API.

Change-Id: Ibf7f9f8943f7e11fd2cf6eaff7c2fabbcdcadba9
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-16 09:19:44 +00:00
Andrei Emeltchenko
e510913cc4 drivers/nble: Implement bt_gatt_indicate()
Implement bt_gatt_indicate() and response to it
on_nble_gatts_send_ind_rsp().

Change-Id: Ibf427135c6385cb84f9fab4edeb3a21760a8702e
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-16 09:19:30 +00:00
Andrei Emeltchenko
0c294021eb drivers/nble: Implement on_nble_gap_start_advertise_rsp()
Avoid "Not implemented" error messages printing "status 0" instead.

Change-Id: I763bf760c8c088f74778d43e6283cb15a11bb443
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-16 09:19:18 +00:00
Andrei Emeltchenko
398e9267cf drivers/nble: Use hexadecimal format specifier
For printing two octets handle use 0x%04x print format specifier.

Change-Id: Ia654d9f2a639cfb9d63647497b302205efab0869
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-16 09:19:04 +00:00
Andrei Emeltchenko
f506195150 drivers/nble: Correct debug print statement
Change-Id: I1321504345d43282dc2607cc98fa38ed4bd1ce76
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-16 09:18:52 +00:00
Andrei Emeltchenko
0b309f3f73 drivers/nble: Update RPC to Nordic BLE
Update RPC to make it compatible with firmware 0309. Among other
changes mostly related to cleanup there is extra flag octet in
struct nble_discover_params.

Change-Id: Ib4dbe15a6919c251f14888090e2f1d91c150c5f2
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-16 09:18:23 +00:00
Andrei Emeltchenko
f8102960c2 drivers/nble: Implement GATT subscribe
Implement bt_gatt_subscribe() function and handle subscriptions.

Change-Id: Ib6ea63a237413ffc65d8572b14d7912d4c7d2699
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-16 09:17:21 +00:00
Johan Hedberg
8563efc773 Bluetooth: Add definition for vendor event code
Change-Id: I764ba3f85a1aee1b57b882f77b1709004bf466e7
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-03-16 10:08:35 +02:00
Luiz Augusto von Dentz
b50a582ea1 Bluetooth: ATT: Notify if a disconnect happen while a request is pending
If the client is waiting for a response but the link is disconnected it
should be notified as the request may never be complete otherwise.

Change-Id: I1fb83b63d8effb4ef2a8f838566c1e68deae9f2c
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-03-16 07:26:01 +00:00
Daniel Leung
52caf8cfc8 arm/fsl_frdm_k64f: fix kconfig hierarchy
This makes sure the CONFIG_GPIO_K64F_* kconfig options have correct
dependencies. Or else CONFIG_GPIO_K64F can be disabled, but all
the CONFIG_GPIO_K64F_{A,B,C,D,E} are enabled.

Same goes for SPI, FTM and pinmux.

Change-Id: I8d225dea714081b14b19006d61b8f3f6afafa5ee
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-15 21:39:15 -04:00
Daniel Leung
f8405637f7 drivers/gpio_dw: fix kconfig dependencies
The DesignWare GPIO options should really depend on whether
GPIO_DW is enabled.

Change-Id: I98b2964d6a0afdac89dc66a78342076afa6feec5
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-15 21:39:15 -04:00
Daniel Leung
13a591261d drivers/shared_irq: fix kconfig hierarchy
Add a menu to enclose all the shared IRQ kconfig options.

Change-Id: I8083204c53f60022c06e9c683fa9544fdc278f32
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-15 21:39:14 -04:00
Daniel Leung
1268ab9f1d boards: add a menu surrounding board Kconfig
This adds a menu to enclose all board Kconfig. So the board
configs do not appear on the top level out of context in
menuconfig. This also reflects the SoC options where these are
under menus for each architecture.

Change-Id: I76ce2bf1acf7cbd2673ceb2eac71e96cdca2ff35
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-15 21:39:14 -04:00
Daniel Leung
ef83c14c4a arch: move kconfig SoC selection to top level
The SoC selections for each architecture are moved to the top level
in menuconfig and xconfig. This makes it more intuitive to select
architecture -> SoC -> then board, avoiding an additional trip to
go into the architecture menu to select SoC.

Change-Id: I57a78a09adfc4bb12423915b6ad14ceb74381a2b
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-15 21:39:14 -04:00
Daniel Leung
25459c137c arch/x86: limit floating point kconfig options to supported CPUs
It makes no sense to allow enabling support for floating point
registers when the CPU has no FPU.

Change-Id: If51187033fc84957721d87fa6e79ef31124f4b14
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-15 21:39:14 -04:00
Daniel Leung
1eddc97b74 arch/x86: hide CPU family Kconfig options
These options should be selected by individual SoC automatically,
and should not be visible options. Or else it would be possible to
select Quark SoCs and telling Kconfig it is from Atom family (which
is incorrect).

Change-Id: I17a6cf713378333e0e7942aa49b381b5eb9526b5
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-16 01:38:07 +00:00
Daniel Leung
b8b6fb5747 boards: make individual boards dependent on SoC selections
This makes the board selection dependent on SoC selection. For example,
select Atmel SAM3 will only allow "Arduino Due" as board selection.
This disallows incompatible SoC/board combination, like K64F with
Arduino Due.

JIRA: ZEP-106
Change-Id: I675961cf33db5a0058fc68f14c8f16978f9c6b95
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-16 01:38:06 +00:00
Vlad Dogaru
e479839fa1 samples: Add sample app for sx9500 sensor driver
This illustrates the usage of the sensor API, using either triggers or
periodic reads from the driver.

Origin: Original
Change-Id: Ief7451fc4771b9459a2b3b7ed0a33341a7710cc3
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
2016-03-15 18:04:19 -04:00
Vlad Dogaru
447489dc84 sensor: Add sx9500 SAR proximity driver
Support for data-ready and near/far triggers is included.  Datasheet the
sensor available at <http://www.semtech.com/images/datasheet/sx9500_ag.pdf>.

Origin: Original
Change-Id: Idd491a8bad7e119b0ed66e655955228ffdac6e76
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
2016-03-15 18:04:19 -04:00
Vlad Dogaru
49d96d95ab sensor: Add threshold trigger support for MCP9808
The MCP9808 supports threshold triggering.  Add support for this feature
in the driver and the sample application.

If triggering is activated, the driver can create its own fiber or use
the system-wide sensor fiber.

Origin: Original
Change-Id: Ie825a22245cb48cbdffba3049011e4d305975d53
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
2016-03-15 18:04:19 -04:00
Vlad Dogaru
d30b3ca516 samples: Add sample app for MCP9808 sensor
The app simply reads the temperature from the connected MCP9808 sensor.
It forces -O0 compile flags, as the default (-Os) triggers a compiler
bug when converting temperature readings.

Origin: Original
Change-Id: I0654543e3d361a862bdf78b44fdc1430cb6aad51
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
2016-03-15 18:04:19 -04:00
Vlad Dogaru
68be7b7d26 sensor: Add driver for MCP9808 temperature sensor
The driver only supports simple temperature readings.  It does not
support the alarm feature.  Datasheet available at
<http://ww1.microchip.com/downloads/en/DeviceDoc/25095A.pdf>.

Origin: Original
Change-Id: I283e6697fc6947975323d280f5ff0ba625fac5a9
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
2016-03-15 18:04:19 -04:00
Vlad Dogaru
48bdd70a07 Add infrastructure for sensor drivers
Origin: Original
Change-Id: I846b1601f1bdf15ad068b27baefc4b23ffab81e3
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
2016-03-15 19:00:08 +00:00
Vlad Dogaru
d1c7c7b7ef Introduce new sensor API
Sensor drivers expose one or more channels, corresponding to each
individual quantity they can measure.  Such quantities may be different
altogether (e.g. temperature and pressure) or different axes for the
same unit (e.g. three axes of acceleration).  Before reading channels, a
driver must be explicitly instructed to obtain a sample from the device.
This helps accommodate sensors which can only read all channels at once,
and also helps ensure coherence of measurements and optimize I2C/SPI
traffic.

Channels can be read as floating point values or struct sensor_value.
The latter consists of a pair of integers and a type field which
dictates how to interpret said integers.  The most common type is INT
(where the second value is ignored) or INT_PLUS_MICRO, which means the
second value should be multiplied by 1.0e-6 and added to the first.

A sensor driver may support one or more triggers, corresponding to
interrupts or timers.  Registering for a trigger involves supplying the
driver with a callback which is called when a condition is reached.
Examples of trigger types are: data ready, timer expiration, any-motion,
near/far.

Finally, sensors support attributes such as sample frequency,
measurement accuracy or threshold values for triggers.  However, runtime
configuration is discouraged, in the interest of keeping code simple.

Origin: Original
Change-Id: Id290fe544b6f7eccc4b109f3912fca1692e55623
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
2016-03-15 18:59:47 +00:00
Juan Manuel Cruz
57cd459e71 debug: fixes issue on debug tracing for pool struct
Change-Id: I6af44e2388db76b4f6d38f634ae983a0d458871d
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-03-14 22:17:10 +00:00
Anas Nashif
90a1b22f60 qemu_x86_iamcu: remove board and use defconfig from qemu_x86
This board is now part of qemu_x86 and shares the same file except
the configuration which makes it build with IAMCU.

JIRA: ZEP-103

Change-Id: I9a9911d013b493240c089ce71e9f95687dcc02a3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-14 20:54:09 +00:00
Anas Nashif
e65df2562d ia32: compile with soft-float when using IAMCU ABI
When building with IAMCU, make sure we set the soft-float, otherwise
build would fail with unsupported instruction errors.

JIRA: ZEP-103

Change-Id: I7a5f107a2df50799a7f6dd4aba36c1a977c1461d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-14 20:54:08 +00:00
Anas Nashif
7bf6ce5b3b build: support multiple defconfigs per board
We will now look for the defconfig to be used using wildcards which will
allow us to host similar boards in the same directory and share all existing
files.

JIRA: ZEP-103

Change-Id: Icfe5dc2fa4b2c4e21e6b1285d80e0c844d430d7d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-14 20:54:08 +00:00
Anas Nashif
05ea5d0cf2 kconfig: Do not put architecture in the title
This is from old kconfig structure and right now it shows
the wrong architecture in the menu. We have the architecture in
CONFIG_ARCH now.

Change-Id: Ifee12ab5a38e9fddb44c74aa3058970f9bd0165f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-14 16:50:51 -04:00
Anas Nashif
64b8a3868e kconfig: move IAMCU option under processor capabilities
Change-Id: Ieaba79e0750ed10f5d4b7204146dbc47775695bf
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-14 16:50:51 -04:00