Commit graph

99014 commits

Author SHA1 Message Date
Anas Nashif
538cb82151 doxygen: make device and init comments doxygen friendly
Document structs and some typo fixes

Change-Id: Idf9df3f4f401d141a2332a83c2c60cb19c9fb8e3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:37 -05:00
Anas Nashif
72cb707f20 kconfig: Let the application decide the name of the kernel bin
This introduces a new option

	CONFIG_KERNEL_BIN_NAME

that can be used in the kernel configuration (kconfig) to set
the final binary name, for example you can set:

CONFIG_KERNEL_BIN_NAME="test_app"

in the project.conf and this will result in

test_app.{elf,bin} in outdir.

The default is still using the type of the kernel being used, i.e.

microkernel.elf or nanokernel.elf

Change-Id: Id6c437af2ce4c02cb52d4e1e41b29e64d83f9aab
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:37 -05:00
Andrew Boie
4f9a95ff1e kbuild: remove BSP_VARIANT Makefile variable
This wasn't being used anywhere and seems to be a legcy of old sanity tests.
By removing this x86 is no longer a special case.

Change-Id: I78c668a7d9e6bc7c7f60d91712c4c21c0121b7e2
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:14:37 -05:00
Rodrigo Caballero
7650bc0daa doc: Adds step by step procedure to develop microkernel apps.
Includes the procedure and updates all needed cross-references. The
procedure will include examples of MDEF, Makefiles and .conf files.

Change-Id: If5b3e88843a9257036265668765e3ad012818ae9
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-05 20:14:37 -05:00
Peter Mitsis
e5700b46ab Rename ChRef union and its fields
Eliminates references to obsolete "channel" terminology and aligns
the names to Zephyr OS naming practices.

Change-Id: Ie4205bda5529a6f8aebfa63aa5a87eb6aef85bc9
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:37 -05:00
Peter Mitsis
9b8352f7e4 Rename pipe get/set utility parameter names
Eliminates references to obsolete "channel" terminology in parameter
names used by the following pipe get/set utitlities:
    _k_pipe_option_get()        _k_pipe_option_set()
    _k_pipe_request_type_get()  _k_pipe_request_type_set()
    _k_pipe_time_type_get()     _k_pipe_time_type_set()

Change-Id: Id6fb803d77d9d775726e67bd48d35e10e908ff61
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
e2ab3249f6 Standardize on names for PIPE_REQUEST_STATUS objects
Eliminates references to obsolete "channel" terminology and improves
code quality by providing consistent variable names.

Change-Id: I8f1c8afe96913f1f97b3c16fd947cfce20f3d7a2
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
22295bc9a4 Standardize on names for _pipe_xfer_req_arg objects
Eliminates references to obsolete "channel" terminology.
    pipe_xfer_req: used with read/write xfer requests
    pipe_read_req: used with read only xfer requests
    pipe_write_req: used with write only xfer requests

Change-Id: Ia09b7d7b82a568e34adceea3683c8ebde07229a1
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
e2c0574319 Remove unnecessary _pipe_xfer_req_arg pointer definitions
Simplifies routines _k_pipe_put_request() and _k_pipe_get_request() by
avoiding an unnecessary pointer assignment.

Change-Id: I5677826bbbec70124dbc951f102885e5b32aad65
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
8d37ddef02 Rename k_args_args field ChProc to pipe_xfer_req
Eliminates references to obsolete "channel" terminology and improves
code quality by providing more descriptive names.

Change-Id: Ic5f9f9b482c1769e15563c50241f578bf0d1baa1
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
a9e4f6520b Standardize on names for _pipe_xfer_ack_arg type objects
Eliminates references to obsolete "channel" terminology and improves
code quality by providing more descriptive names.

Change-Id: I4135dfc98c13899ec4d2b0befb23822712c668ae
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
5f4f274f44 Standardize on names for _pipe_ack_arg type objects
Eliminates references to obsolete "channel" terminology.

Change-Id: Id47826e0c606048b65d42fde284e5ef851c2b147
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
367d9e9e3f Rename k_args_args field ChReq to pipe_req
Eliminates references to obsolete "channel" terminology.

Change-Id: I0456bfd9a43bd94f83c58dd1f47be50bf393d492
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
a2b866ea74 Standardize on names for pipe_desc type objects
Eliminates references to obsolete "channel" terminology and improves
code quality by providing more descriptive names.

Change-Id: I4c921db1777975210c1ea3d4ab72107ca6d4f589
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
97580269b3 Rename CHREQ_STATUS to PIPE_REQUEST_STATUS
Eliminates references to obsolete "channel" terminology.

Change-Id: Iff071c619170e118adf83a6b9fa0261e98a2ae01
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
f98898b127 Rename k_chproc structure to _pipe_xfer_req_arg
Eliminates references to obsolete "channel" terminology.

Change-Id: I0bcb7924d4c2f5ce5926baf9c09031c33806c8ac
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
91f693e4e2 Rename k_chmovedack structure to _pipe_xfer_ack_arg
Eliminates references to obsolete "channel" terminology.

Change-Id: I631349d197e618e8bff1657fd22848b70263bf4f
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
61f2b49331 Rename k_chack structure to _pipe_ack_arg
Eliminates references to obsolete "channel" terminology.

Change-Id: Id15638160869ad76afb9df352d67ffe6f6a07412
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
a303bdb85b Rename k_chreq structure to _pipe_req_arg
Eliminates references to the obsolete "channel" terminology.

Change-Id: Ic5f375b36fbd234f158a11dfbfd010d3a05a844c
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
a376f0f70d Rename chbuff structure to pipe_desc
Not only does this rename eliminate references to the obsolete "channels", it
better identifies the purpose of the structure.

Change-Id: Ib9c730b0e57b51b562ca0b5c1f5c9aaa3bdcce70
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
7c3bc47caf Eliminate unnecessary copying of k_args_args field
Simplifies routines _task_pipe_get(), _task_pipe_put() and
_task_pipe_put_async() by avoiding unnecessary copying of
k_args_args field.

Change-Id: Ie8b77502d6e1f0e655950f47e766a5e6378d1812
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
467d5f54d0 Cosmetic: Fix whitespace issues
Fixes whitespace issues to comply with checkpatch.

Change-Id: Ic6501158e06a25d616072611e73575a1dc812dab
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Tomasz Bursztyka
fa21363ef1 spi: Add the generic driver API header for SPI controllers
This defines the generic driver API that SPI controller drivers need to
follow.

Change-Id: Ibd14500fb7f0ca353b89b213914066276339940c
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-05 20:14:36 -05:00
Luiz Augusto von Dentz
8ee4a9e93d Bluetooth: GATT: Simplify handling of Read Multiple Request
This process handle by handle instead of first parsing the full PDU
storing the result in another variable to only then process the handles.

Change-Id: I5b6d5d7db4a78a03b34bc1c7e5217bbcd7f4c96b
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:36 -05:00
Luiz Augusto von Dentz
e24f6684cb Bluetooth: ATT: Use BT_ASSERT to check context
Check conn->att context at bt_att_recv and log an error.

Change-Id: Id49e941bdf55529b517b6962fe0d401bd9295c38
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:36 -05:00
Johan Hedberg
3303864d3b Bluetooth: Fix inverted assert conditions in buf.c
Change-Id: Idd858ba3a3bf779e6b8084b61459ee5c9347094b
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:36 -05:00
Luiz Augusto von Dentz
710aa2ecc7 Bluetooth: Add gatt-discover-characteristic command to btshell
This adds gatt-discover-characteristic which works as follow:

btshell>gatt-discover-characteristic <bdaddr> <bdaddr_type> [UUID] [start_handle] [end_handle]
bt: bt_gatt_discover_characteristic (0x0010d098): start_handle 0x000b end_handle 0x0011
Discover pending
btshell>bt: bt_att_recv (0x0010f294): Received ATT code 0x09 len 23
bt: att_handle_read_type_rsp (0x0010f294):
bt: att_read_type_rsp (0x0010f294): err 0x00
bt: att_read_type_rsp (0x0010f294): handle 0x000b properties 0x02 value_handle 0x000c
Discover found handle 11
bt: att_read_type_rsp (0x0010f294): handle 0x000d properties 0x10 value_handle 0x000e
Discover found handle 13
bt: att_read_type_rsp (0x0010f294): handle 0x0010 properties 0x08 value_handle 0x0011
Discover found handle 16
Discover destroy

Change-Id: I04aad56cc4f978e3a884adffc487ae4dcc1c4ee9
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:36 -05:00
Johan Hedberg
d87232b2a1 Bluetooth: att: Fix minor coding style issues
Change-Id: I36019a726187363e41ab72d9a26b2b8ae5c7f4bb
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:36 -05:00
Johan Hedberg
9a52d396da Bluetooth: Take advantage of BT_ASSERT() macro
Change-Id: I0795820169c437e4348a9ab54c1184233067d5e9
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:36 -05:00
Johan Hedberg
5e5c87503d Bluetooth: Add BT_ASSERT() helper macro
Change-Id: Ib9cfb6494cb3369f4c1e029010589c4d6967afcb
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:36 -05:00
Luiz Augusto von Dentz
df92f7c4c6 Bluetooth: GATT: Add bt_gatt_discover_characteritic
This adds bt_gatt_discover_characteristic which can used to discover all
characteristics in the given range.

Change-Id: Ia7ddb93dfdb0f979409e133c902a1cbd9ae9fe71
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:36 -05:00
Luiz Augusto von Dentz
330846b39a Bluetooth: ATT: Handle Read By Type response
This adds function handler for Read By Type Response PDU which call the
request callback:

> ACL Data TX: Handle 3585 flags 0x00 dlen 11
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0010-0x0011
        Attribute type: Characteristic (0x2803)
> ACL Data RX: Handle 3585 flags 0x02 dlen 13
      ATT: Read By Type Response (0x09) len 8
        Attribute data length: 7
        Attribute data list: 1 entry
        Handle: 0x0010
        Value: 081100392a
< ACL Data TX: Handle 3585 flags 0x00 dlen 11
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0011-0x0011
        Attribute type: Characteristic (0x2803)
> ACL Data RX: Handle 3585 flags 0x02 dlen 9
      ATT: Error Response (0x01) len 4
        Read By Type Request (0x08)
        Handle: 0x0011
        Error: Attribute Not Found (0x0a)

Change-Id: Ieba837f603b7d76a4adf95cd637b8423061246f7
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:36 -05:00
Luiz Augusto von Dentz
cfb12dbb61 Bluetooth: GATT: Fix not always calling discover destroy callback
If the function callback returns BT_GATT_ITER_STOP it should cause
the destroy callback to be called to indicate the discover is no longer
active.

Change-Id: Ifc35c375633e38483b2b4bace2c26bab7f02dcb6
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:36 -05:00
Jukka Rissanen
bbe73173bb net: Use 2001:db8::/32 address space for sample apps
Instead of aaaa::/64 address space which is part of global
IPv6 address space, use the 2001:db8::/32 which is meant
for documentation purposes and is not routable.

Change-Id: I56db34da852f8c313379c764bdf75a19151c45bd
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:36 -05:00
Mariusz Skamra
105624a4a0 Bluetooth: Remove empty line
Change-Id: If17c18e8b970c568b0a46405c1f6b36073d5e565
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:14:36 -05:00
Mariusz Skamra
e6d8bc3a59 Bluetooth: Use duplicate filtering policy in passive scanning
To limit the device_found function calls, passive scanning can
take advantage of Filter_Duplicates feature. For now, the stack
will be informed only if some new device will be found.

This solution requires a check if scan filter is used while adding
new address to connect to (bt_connect_le). If filter duplicates
is used (by active scan or passive scan), the scan should be
restarted to refresh scan results.

Change-Id: Ibf539e648288fdcd7a8119ec364cff2c97e4aab8
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:14:36 -05:00
Szymon Janc
d0aa85096c Bluetooth: Add simple advertise command to shell app
This allows to enable advertising with some fixed Advertising Data
and Scan Reponse.

Change-Id: Ie3a33a49fe8517c9e931b7805694bd9c7b05fcdb
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
2016-02-05 20:14:35 -05:00
Szymon Janc
0d7739f389 Bluetooth: Add support for enabling security as slave
As slave send Security Request for master to initiate security.

> HCI Event: LE Meta Event (0x3e) plen 19             [hci0] 569.228544
      LE Connection Complete (0x01)
        Status: Success (0x00)
        Handle: 64
        Role: Slave (0x01)
        Peer address type: Public (0x00)
        Peer address: 00:1B:DC:07:32:7E (Vencer Co., Ltd.)
        Connection interval: 70.00 msec (0x0038)
        Connection latency: 0.00 msec (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Master clock accuracy: 0x01
.....

< ACL Data TX: Handle 64 flags 0x00 dlen 6            [hci0] 600.801709
      SMP: Security Request (0x0b) len 1
        Authentication requirement: Bonding, No MITM, Legacy,
          No Keypresses (0x01)
> ACL Data RX: Handle 64 flags 0x02 dlen 11           [hci0] 600.930641
      SMP: Pairing Request (0x01) len 6
        IO capability: DisplayYesNo (0x01)
        OOB data: Authentication data not present (0x00)
        Authentication requirement: Bonding, No MITM, Legacy,
          No Keypresses (0x01)
        Max encryption key size: 16
        Initiator key distribution: EncKey Sign (0x05)
        Responder key distribution: EncKey IdKey Sign (0x07)

Change-Id: I201cb99d7cbcf3115bc8a5e2968108034ab9189c
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
2016-02-05 20:14:35 -05:00
Szymon Janc
59e78e4d41 Bluetooth: SMP: Add support for sending security request
This allows to request sequrity as a slave.

Change-Id: Ieab15c2ab20403a5a22b13a331405276a7d4074f
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
2016-02-05 20:14:35 -05:00
Mariusz Skamra
8beeb0f3d3 Bluetooth: SMP: Fix smp_send_pairing_req function name
Prefix smp_send_pairing_req with bt_* to maintain proper
namespace in API.

Change-Id: Ia1f0d1291c5298034b9f1312b0d5a94aaa099cd0
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:14:35 -05:00
Jukka Rissanen
4d42645012 net: 15.4: Fix the loopback test
The listening socket was creted after we started to send data
so data was discarded. Now we first create listener and then
start to send data to it.

Change-Id: Iee706c7c862d16a582ee973b10598dde5e5f0bd0
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:35 -05:00
Jukka Rissanen
ea970e2ce1 net: Change the remaining doxygen comments to javadoc style
Change-Id: I942558ca9e4c140145de6e4a1bcebf8d9d16f3d2
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:35 -05:00
Jukka Rissanen
f48fb5f3ec net: tools: Add IPv4 support for echo-client tool
The IPv4 support is activated automatically if the IP address
parameter is a real IPv4 address.

Change-Id: Ief7b2a216a143416b5eec095cd6f813729a40b92
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:35 -05:00
Jukka Rissanen
0605e89ec1 net: apps: Enable IPv4 support for echo-server test application
Change-Id: Ibcedaeeae06767461ee53492fc055d05c635137f
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:35 -05:00
Jukka Rissanen
7ef1a726d4 net: apps: Add IPv4 support for listener application
Change-Id: Ifa5378463dde1bcfc4c701dc4b881175395cd9fd
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:35 -05:00
Jukka Rissanen
9a59d70cf5 net: tools: Add tunslip application for IPv4
The tunslip program will setup the tun device for IPv4 traffic.

Change-Id: I1192a704f691e17016e187167dfca09df00b974f
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:35 -05:00
Jukka Rissanen
f2886e2af3 net: uip: Traverse only through valid UDP connections
The uip.c:uip_process() was not checking the upper bound of
the UDP connection list when traversing the connection list.
Now the code checks the upper bound of the array (UIP_UDP_CONNS)
and will not go beyond the max number of items in the array.

This commit fixes the IPv4 branch, the IPv6 branch was already
fixed by commit 07a5959c2ae9ffce27092c2a0a6161111facdb6c

Change-Id: I5c31176190e0f063b72d6742c4a9c23b433026ad
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:35 -05:00
Jukka Rissanen
e6020d1701 net: uip: Initial IPv4 support
Enabling IPv4 support and modifying code so that it compiles ok.

Change-Id: I605cd94adfda7675be2f2cf798588c69eb1f152e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:35 -05:00
Jukka Rissanen
3c9fd82c5b net: Add INADDR_ANY for IPv4 connectivity
Change-Id: I027ec85c9e15f0a4aae494f766414faab7f2012b
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:35 -05:00
Jukka Rissanen
7d743ce57b net: uip: Remove obsolete file
The declarations in this header file are already provided by
other header files so this file can be removed.

Change-Id: I63cd99ed201af7bebb14943bf965dafd11be14fe
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:35 -05:00