Commit graph

42559 commits

Author SHA1 Message Date
Rodrigo Caballero
b5cfa0db00 doc: Edit app development instructions.
The instructions were made more to the point and clearer.
Optional and necessary steps are now easier to identify.

Change-Id: I3f4dc16b1dc0a7e64ae888ed050d266fa1d59645
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-05 20:24:32 -05:00
Rodrigo Caballero
30e2a7dbd2 doc: Edit the Application Contribution section.
Based on Carol's original contribution. Edited based
on comments made to the original change.
Added better labels and links to other places in
the docs.

Change-Id: Iaff7d1849d7ab7c8276ac9fca87070442ce956fd
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-05 20:24:32 -05:00
Rodrigo Caballero
2f99a3183b doc: Edit the application development common procedures.
Corrected the :envvar: markup. Rewrote the text to be less patronizing.

Change-Id: I09ec541ae41ad682106dc73a6e4495216dfa34d3
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-05 20:24:32 -05:00
Rodrigo Caballero
08c09978d2 doc: Edit application code development document.
Also - fixed variable usage and ref links.
Also - fix trailing whitespace and missed deletion of Postrequisites section.

Change-Id: I72f857c8a82048922265db99669263050d1542ff
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-05 20:24:32 -05:00
Rodrigo Caballero
c9d64fdd1f doc: Edit the object configuration section of the app development doc.
Removed prerequisites to fix the flow of the doc.

Change-Id: Ieed03a08c2794fe50d6be3b7d3496da5f4c4471c
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-05 20:24:32 -05:00
Rodrigo Caballero
d3803bab2b doc: Add an improved application development section.
Introduces the first part Carol's original contribution. The original
contribution is broken up in multiple files. The updated toctree shows
the
files that will constitute the section. Edits for clarity,
redability and markup were also included. The old files were removed.

Change-Id: I29364c6bc94322c6235b51850c2d1b9f71eb1ad8
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-05 20:24:32 -05:00
Rodrigo Caballero
a2144857c6 doc: Add and edit the kernel configuration section of the app development doc.
Removed the yous to be more concise and direct.
Second person phrasing can be overused making it redundant.

Change-Id: I849c0dce9a219962e724aade0cc4c5d57271cbe1
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-05 20:24:32 -05:00
Yonattan Louise
86ea4e6827 OS Awareness: Add microkernel object tracing.
Add a list for each kind of microkernel object. Add the register of
the public objects to the tracing lists in the dynamic initialization
function of sysgen.

Change-Id: I8c413812e4db0f443c9dd3a5501e0096270dc70e
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:24:32 -05:00
Yonattan Louise
abc2c9e59d OS Awareness: Add nanokernel object tracing.
Add a list for each kind of nanokernel object. And link the object
to the list on the initialization function.

Change-Id: I7a51902a8d1b306ec50d9486e55af286127fcb1a
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:24:32 -05:00
Yonattan Louise
815513a11d OS Awareness: Add debug object trace configuration.
Add the Kconfig option for enabling the debug object tracing.

Change-Id: I56bf48568905604f6f50a06db2c5eaf4d91ded1d
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:24:32 -05:00
Daniel Leung
fed1cc8833 x86: galileo: pinmux: update get/set functions
This implements the get function for the Galileo pinmux
driver. Also modify the set function so that the get
function would work correctly.

Change-Id: I463b01a903389a9c640bb1354ce92b9c0e37030f
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:24:32 -05:00
Anas Nashif
bcc16634ac spi: move static stubs to driver directory
Change-Id: Idd08e79eec429df00673a10790ec85afbe3183f6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:32 -05:00
Anas Nashif
87fe9387fb shared_irq: move static stubs to driver directory
Change-Id: I55808e5e460486c7f61919eca0aba9e2f4b434e1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:32 -05:00
Anas Nashif
47869287a4 gpio: move static stubs to driver directory
Change-Id: I6077aaeba4d572ddfa9d696014c6aec08abd3d3a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:32 -05:00
L.S. Cook
8f613da882 doc: Added bold to lists and made some confusing wording more clear.
Another pass to improve readability and eliminate wordiness

Change-Id: I028483b6630de195e157159e8491abde60bb683c
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-05 20:24:32 -05:00
L.S. Cook
f833735bd2 doc: Fix the Naming Conventions document markup.
Fixed the broken code blocks and rebased.
Content correction about architectures
Naming conventions fix broken line directive, comments, fix broken build
OK, really fixing the too-long line length this time...

Change-Id: Ib4aa60bed33ff40c5fbd6266670188c1c5e378c6
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-05 20:24:32 -05:00
Andrei Emeltchenko
e3f542cf2f galileo: Correct typo and mark variable unused
Change-Id: I0a386b293ddff54bbce8035670a282201eb5358b
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:24:32 -05:00
Andrei Emeltchenko
c7b152932d galileo: Remove unneeded defines
If console handler is defined uart console should also be defined.

Change-Id: I3efcc6c837f8f1621340f7f13bf0603d7dc42fb2
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:24:32 -05:00
Tomasz Bursztyka
17e06fb457 uart: Move generic API to root directory of include
Only driver specific public headers should be found in include/drivers.
All generic API are found in include/ directory.

Change-Id: Ic50931987bb9460fd4a3843abc6f5de107faf045
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-05 20:24:32 -05:00
Andrei Emeltchenko
82c958581e doc: Replace bt_init() with bt_enable()
bt_init() is now static function and API should use bt_enable().

Change-Id: I565f30bf816282961b71ceae2bbe90d5d93e7b8a
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:24:32 -05:00
Dirk Brandewie
94c2960227 i2c: designware move to using single isr
With ioapic_mkstub now taking a context value we can have a single isr
routine and move away from the isr trampolines we have now

Change-Id: Ibbb0f627ac515b12c0590a71da6a3267c952dd30
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:24:31 -05:00
Dirk Brandewie
7a1e221733 init: add SYS_GET_DEVICE() macro to bury &__initconfig_* names usage.
Add a macro to retrieve the device structure for a config structure by
name.  This avoids the very error prone activity of the developer
having to *know* the way the internal object is named.

Change-Id: I1d7857d5aad6dfd4b1b46f63b946aad1ae3a6dc4
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:24:31 -05:00
Dirk Brandewie
ad5af93f25 x86: Add context value to loapic_mkstub and ioapic_mkstub macros
Add a context value to the ioapic and loapic mkstub macros to allow
the developer to specify a context value that will be passed on the
stack to the interrupt service routines.

All the invocations for the loapic_mkstub and ioapic_mkstub macros
have been changed to pass in 0 so there is no functional difference
ATM.  This change removes the need for drivers to have trampoline ISR
routines to pass a context vaule to their generic ISR routine.

This is the first step in getting rid of the hack where the driver
needs to look into the __initconfig_* linker objects.

Change-Id: I2c5eaa20d8cb5a42ef445762c426854be32c8452
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:24:31 -05:00
Dirk Brandewie
147d6585ae x86: arm: Modify IRQ_CONFIG macro to have same signature as ARC
In order to have drivers that are usable cross architecture the
signature for IRQ_CONFIG needs to be the same to avoid #ifdef hell in
the driver code based on architecture.

Update the macro and it usage for existing drivers

Change-Id: I22e142b21d4e984add231d1dbd97020e4823985f
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:31 -05:00
Dan Kalowsky
2e938481ce checkpatch: error - initialised_static
Change-Id: I8f51f861e2250c87c296b697ef5b6610ce644b34
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:31 -05:00
Dan Kalowsky
0182d863cd checkpatch: error - function_without_args
Change-Id: Id020ac7eafbb20352d839565256f0bf47f7fe301
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:31 -05:00
Dan Kalowsky
e4bb957a00 checkpatch: error - pointer_location
Change-Id: I9ce224cb75ba21caecffd6747833257f748b5ecf
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:31 -05:00
Dan Kalowsky
a60c866c70 checkpatch: error - open_brace
Change-Id: I434037ce969bcd1fc08bd4b407f9508773e64b1e
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:31 -05:00
Dan Kalowsky
d04ae83e11 checkpatch: error - return_parentheses
Change-Id: If1964349a115043fa54bf48ebfe4b3c0a414ed57
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:31 -05:00
Dan Kalowsky
39063598db checkpatch: error - spacing
Change-Id: Ie6e1c43581dd4b0734625b3a4e59a4ca79619e99
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:31 -05:00
Dan Kalowsky
3bc4039601 checkpatch: error - switch_case_indent_level
Change-Id: I9cbd6ab80b0c0f170626bb1c6b2d07498038fb8f
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:31 -05:00
Dan Kalowsky
7cfc703711 checkpatch: error - trailing statements
Change-Id: I461134536da0288261b90f605a904ab3ea466340
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:31 -05:00
Dan Kalowsky
4518f747af checkpatch: error - trailing_whitespace
Change-Id: I9ccc8aef40de7b66e1899994e3dbc7147df61414
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:31 -05:00
Dan Kalowsky
978851fb6a checkpatch: code_indent failures
Corrects the checkpatch code_indent failures

Change-Id: I2ff93b8907d3eddbaa543ccbd12aecef8af7f698
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:31 -05:00
Dan Kalowsky
247dc8f2d1 checkpatch: removing C++ comment style
checkpatch currently reports several files failing the C99 comment
verification.  Cleaning these up now.

Change-Id: I35766c1f6c88a280c5e844b3f02668d6e1ad11d2
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:31 -05:00
Dan Kalowsky
c936f6a029 random: rename random to use underscore
Naming convention of the OS requires the use of underscores (_) for
filenames instead of dashes (-).

Change-Id: I62b615f1f336e839cbbef2c3721c1926afe76457
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:31 -05:00
Dan Kalowsky
70b8230397 pwm: renaming files to use underscore
Naming convention states we should be using an underscore (_) for
filenames not a dash (-).

Change-Id: I51a6ae02957bfc556b8718aae713636bd14c8b2c
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:31 -05:00
Dan Kalowsky
286a7e2bfe adc: renaming ADC files to use underscore
The naming convention is to use underscores (_) and not dashes (-)
within the filename.

Change-Id: I678cf01306d72a905ed7b161af116c6e4a2cd39c
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:31 -05:00
Dan Kalowsky
6bf971915f gpio: rename files
The naming convention used in the source is for there to be an
_ and not a - in the file.  Fixing GPIO to be consistent with
the os naming conventions.

Change-Id: Ifc4356c14b52e2cc2411a7445b44c7cb57d2765c
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:31 -05:00
Dan Kalowsky
e899bb60ac i2c: changing file names to be consistent
Naming convention uses the _ not - in the file names.  In a recent
commit for I2C this for some reason changed.  Making the names now
more consistent with other files.

Change-Id: I1e363c0c09ae0c8b2ac3def3beeaaeafcc01eb74
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:31 -05:00
Szymon Janc
3def4202ae Bluetooth: SMP: Ignore unsupported AuthReq in Security Request
If Security Request with unsupported flags is received just ignore them
instead of repairing. This is already done for Pairing Request but was
missing in Security Request.

Since we are still on 4.0 just remove any new bits definitions and update
BT_SMP_AUTH_MASK accordingly.

This fix constant repairing (instead of just enabling encryption) with
peripherals that support LE Secure Connections.

Change-Id: Ic053590755e97eadbcadbea788670c050f895d32
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:31 -05:00
Szymon Janc
a0f209ba8c Bluetooth: SMP: Pass SMP context to smp_request_tk
Use SMP context as smp_request_tk() parameter.

Change-Id: Ia0bafa4bab06c8696f1c05a6cfc402d81a08b2ab
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:31 -05:00
Szymon Janc
fe5a7f1041 Bluetooth: SMP: Pass SMP context to smp_reset
Use SMP context as smp_reset() parameter.

Change-Id: If513c58178445cf73e53085397c6f6ba080a2f27
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:31 -05:00
Szymon Janc
a004eb2319 Bluetooth: Add new line in le_conn_update_complete debug log
Change-Id: Id08aa8246b5e5970b0ff104a9c86d80069d1a7e5
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:31 -05:00
Mariusz Skamra
acc84f2bed Bluetooth: ATT: Add debug log for printing negotiated MTU
To have same logs in att_mtu_req and att_mtu_rsp.

Change-Id: Ic820f989d0928089d5b0a6bce21e5e1c369eb026
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:24:31 -05:00
Mariusz Skamra
2ba3c9aa1d Bluetooth: Fix sending incorrect MTU in the Exchange MTU response
According to the Core Spec 4.2 Vol 3 Part G
The server shall respond with the Server Rx MTU parameter set to the
maximum MTU that this server can receive.
Once the messages have been exchanged, the ATT_MTU shall be set
to the minimum of the Client Rx MTU and Server Rx MTU values.

bt: att_mtu_req (0x0010fd04): Client MTU 672
bt: att_mtu_req (0x0010fd04): Server MTU 65
bt: att_mtu_req (0x0010fd04): Negotiated MTU 65

bt: att_mtu_req (0x0010fd04): Client MTU 42
bt: att_mtu_req (0x0010fd04): Server MTU 65
bt: att_mtu_req (0x0010fd04): Negotiated MTU 42

Change-Id: I13f2f0fc99e99d8188ed15bf7972a9b892612e11
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:24:31 -05:00
Mariusz Skamra
de72c02645 Bluetooth: Don't response with error to Exchange MTU req if MTU > 517
According to the Core Spec we shall respond to Exchange MTU Request
with MTU parameter set to the maximum MTU that we can receive.
As a Client, we shouldn't send an error if Server's Rx MTU exceeds
517 bytes. Whe should respond with our maximum MTU, because
after negotiation is done, ATT_MTU shall be set to the
minimum of the Client Rx MTU and Server Rx MTU values.

Error will be sent only in case of Rx MTU lower than LE default
ATT_MTU (23).

Change-Id: I9fa4f3fdb9b8129d52fc7b2557129c0894e5d201
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:24:31 -05:00
Szymon Janc
8b49731d3f Bluetooth: SMP: Fix missing new lines in logs
BT_* log macros don't add new lines at the end of log message.

Change-Id: I4836f58e45453697a87c0a2b290014083b8e229a
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:31 -05:00
Mariusz Skamra
ee224e8bb0 Bluetooth: ATT: Fix incorrect BT_ATT_OP_CMD_MASK
According to Core 4.2 Vol 3 Part F 3.3, Commands have 6th bit
(startting from 0)  set in ATT PDU. If the bit is set, no response shall be sent.

Change-Id: I63f7303e1cf2f9479dae129cdf5d31d7aadc739d
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:24:30 -05:00
Mariusz Skamra
ceef6099dd Bluetooth: shell: Improve device found event callback
With this patch device name obtained from advertising packets
will be printed out.

[DEVICE]: D0:03:4B:DA:10:46 (public), AD evt type 0,
			RSSI -83 AppleLETester
[DEVICE]: D0:03:4B:DA:10:46 (public), AD evt type 4,
			RSSI -82
[DEVICE]: 00:A0:50:00:00:08 (public), AD evt type 0,
			RSSI -80 BLE Keyboard

Change-Id: Ic5116bce958d5b4479d481c40b2658ab56ecb819
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:24:30 -05:00