Commit graph

41120 commits

Author SHA1 Message Date
Mariusz Skamra
a693d9f29c Bluetooth: tester: Set missing bits in GATT supported commands
This patch fixes missing bits set in GATT supported commands.

Change-Id: I0c8035dc126a680147978947438f28df3b734d7a
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:25:07 -05:00
Louis Caron
be72f6d197 Bluetooth: UUID: Add the SCC UUID
Change-Id: I5b9d3ef5745be46b5453e1c5b90fe4dc05d76073
Signed-off-by: Louis Caron <louis.caron@intel.com>
2016-02-05 20:25:07 -05:00
Louis Caron
12f40ebd8c Bluetooth: GATT: Fix small typo
Change-Id: Ie70354e9b80db5b6a08fe639d1e3393df6294115
Signed-off-by: Louis Caron <louis.caron@intel.com>
2016-02-05 20:25:07 -05:00
Andrei Emeltchenko
a8c042827a Bluetooth: Correct headroom calc for outgoing packet
Needed headroom depends on type of the UART driver, change it
accordingly.

Change-Id: Ic9bf5f08a49be6823fce5eff8139d5f949b313ca
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:25:07 -05:00
Andrei Emeltchenko
54c0790b1f Bluetooth: Improve error message printed
Include expected opcode to print together with received opcode.

Change-Id: Iacc73c12f22fe0585e2753d709646bacd3e73d32
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:25:07 -05:00
Andrei Emeltchenko
cc7349b2d8 Bluetooth: Replace fiber_fiber_ with fiber_
We use fiber_delayed_start() for starting delayed fiber. Make use of
fiber_delayed_start_cancel() instead of
fiber_fiber_delayed_start_cancel().

Change-Id: I2399290496ed2a2b21b2a780d884881839f36767
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:25:07 -05:00
Grzegorz Kolodziejczyk
c8dbc71552 Bluetooth: tester: Add passkey entry command implementation
This adds implementation of passkey entry command in tester
application.

Change-Id: I0624ee9f899102284490a82f5bb0a68bb342640a
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-02-05 20:25:07 -05:00
Grzegorz Kolodziejczyk
cc795e9204 Bluetooth: tester: Add pair command implementation
This adds implementation of pair command in tester application.

Change-Id: I55545bdf99e2828c17ec716069e925940f15d019
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-02-05 20:25:07 -05:00
Grzegorz Kolodziejczyk
b6c0a04a55 Bluetooth: tester: Add set io cap command implementation
This adds implementation of setting io capabilities command in tester
application.

Change-Id: I21ae68633fb74d78db6e5622e1ee518ef0eed632
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-02-05 20:25:07 -05:00
Grzegorz Kolodziejczyk
434a4f6d85 Bluetooth: tester: Implement SM command stubs for tester
This patch adds stubs for SM commands defined in GAP.

Change-Id: I5aef256ade5a100eb0a582c5d9bd5eb8d01611f2
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-02-05 20:25:07 -05:00
Grzegorz Kolodziejczyk
2c14807046 Bluetooth: tester: Separate helper for converting to btp addr type
This patch separates helper for converting address type to btp
specific.

Change-Id: Ied723e01f5548b10e063a6771f8824c0c35b4682
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-02-05 20:25:07 -05:00
Grzegorz Kolodziejczyk
c0c7358196 Bluetooth: tester: Replace tester_rsp_full wrapper with tester send
This patch removes redundant tester_rsp_full public function with
wrapped tester_send function.

Change-Id: Iba517ed194e02045ca952b00b952c7608592fbbd
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-02-05 20:25:07 -05:00
Szymon Janc
873cbfb470 Bluetooth: Kconfig: Move SMP related option under BLUETOOTH_SMP
This makes menuconfig easier to navigate.

Change-Id: Ica49bbbde73c785f218846380fd46d5463424890
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:25:07 -05:00
Mariusz Skamra
d82d735079 Bluetooth: tester: Fix blocking ATT requests
BTP Client received success response from the tester application too early,
so that next command was blocked due to pending ATT Request

Change-Id: I598c0e9e90984cac07f8b4ea265b0d6d69d3d18d
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:25:07 -05:00
Szymon Janc
3670e7fcd0 Bluetooth: SMP: Minor codestyle fix
Change-Id: I115fda172698881c69ed301e5f729bb32c1cb978
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:25:07 -05:00
Szymon Janc
755130ad68 Bluetooth: SMP: Fix setting ediv and rand for LE SC LTK
Change-Id: Ic8867a510864a8cfb30af30c505d25faa91c2fb7
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:25:07 -05:00
Johan Hedberg
7493cadee7 Bluetooth: Reduce hci_cmd_complete() stack usage
Instead of storing a pointer to the status (4 bytes) we can just copy
its value directly (1 byte). Since the previous variable is a 16-bit
opcode the smaller 1-byte variable should fit within the same 4-byte
word, saving 4 bytes from the stack.

Change-Id: I406c60c7b2563ba6397ab75cf1dbe3d346b6c0ed
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:07 -05:00
Luiz Augusto von Dentz
4a20bc14a7 Bluetooth: Make use of BT_UUID_DECLARE_16 for services
This makes it simpler to add the services directly into GATT services
table.

Change-Id: I090c7f9396329cf524947dd6647230c663a55f60
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:25:07 -05:00
Andrei Emeltchenko
2e97cbc55b Bluetooth: trivial style correction
Change-Id: Ib9069e2698614a3f5bb4bc9382aa5d458f007d95
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:25:07 -05:00
Johan Hedberg
401fccf7ce Bluetooth: log: Remove redundant 'bt:' prefix from assert
BT_ERR() already inserts the bt: prefix.

Change-Id: I7feda0e28caad4f0e1f18e5d9099fa21684e4b35
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:07 -05:00
Johan Hedberg
30e0e64407 Bluetooth: Add color logging support
Add basic color logging support. Error logs will be printed in red
whereas warn() logs in yellow. The support is behind a Kconfig option
in case someone needs to build the stack for a terminal that doesn't
support the ANSI color codes.

Change-Id: I080e32db68f87e81f1bb54aa4c634f7cd38f1e33
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:07 -05:00
Johan Hedberg
5d80ae929c Bluetooth: Rename NO_DRV to more consistent NO_DRIVER
Change-Id: I30b89607446c9a9926411b5fb210460d076369b1
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:07 -05:00
Johan Hedberg
b9c8afb353 Bluetooth: Rename DEBUG_UART to more generic DEBUG_DRIVER
Change-Id: I6a47f7579be233d1bcdf01dc9af57f6da62ef75c
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:07 -05:00
Johan Hedberg
486167fdee Bluetooth: Kconfig: Remove redundant dependencies
Change-Id: I41013cbea2ec78157b9c5551c3aabecc2daa24a1
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:06 -05:00
Javier B Perez Hernandez
f55fefe3d0 compare footprint: added error counter and error message for sanity.
Added error log when base or current commit cannot be built.
Removed exit(1) when there are deltas, deltas should not be consider as errors.

Change-Id: I182edab83be14f642086818a9df0be96d8d4ae09
Signed-off-by: Javier B Perez Hernandez <javier.b.perez.hernandez@linux.intel.com>
2016-02-05 20:25:06 -05:00
Anas Nashif
33ce2c7011 quark_se: quark_d2000: do not set native drivers as default
Allow usage of alternative drivers and do not hardcode drivers
to zephyr own implementation.

Change-Id: Ieb55b5dc88b3643f276b7c48facef7f1c1c42fa7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:06 -05:00
Anas Nashif
8704792c45 grove_lcd: this display is not a feature of the board
The LCD display is an add-on, not a feature of the platform or the
board.
Set the defaults and remove the definition from Galileo Kconfig.

Change-Id: Ic319cd765d2dc1fe08cc65615680821fe9bc6a83
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:06 -05:00
Daniel Leung
cbd7dc65c4 quark_se_ss: enable UART
On Arduino 101, the sensor subsystem also has access to the two UARTs
on board. So this adds the necessary code to enable them to be used.
However, one needs to make sure only one core has access to one UART
at the same time.

Change-Id: I9f6c203916164d1b48559a9752fb1e4d879d7fa4
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:06 -05:00
Daniel Leung
6a869058ff samples/gpio_dw: extends the app for GPIOs on quark_se_ss
The basic is the same for both architecture, but using different
GPIO controller and pins.

Change-Id: Ie021461858736d90a47bdef2c9d5e655e2efa473
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:06 -05:00
Daniel Leung
5aab5ccbad arc/quark_se_ss: need some magic to enable GPIO interrupts
1. Need to unmask interrupts for the sensor subsystem.
2. The GPIO controllers need their clock enabled before they can
   start sending out interrupts.
3. Setting up ISR on ARC requires usage of irq_connect().

Change-Id: I633b07292f11e5c5e768fc51fabb70769d407609
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:06 -05:00
Daniel Leung
ceb1869bcc arc/quark_se_ss: update GPIO0/GPIO1 interrupt number
The interrupt number for GPIO0/GPIO1 are 20 and 21 respectively.
The old value of 8 refers to the interrupts line on the x86 side
of GPIO controller.

Change-Id: I2e9e061d3506e27cb7b14e0431c3b6201a50aad4
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:06 -05:00
David Antler
a99b90e4da Fixed Galileo UART0_RXD muxing bug
The pin mux for Galileo Gen2 isn't set properly to enable UART0_RXD input from
the Arduino headers. EXP1's pin0 OE_N needs to be set HIGH to make the IO0
buffer an Input.

Change-Id: I0167f11ff5ee87bd5afe17300807b1aa4ed17abf
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: David Antler <david.a.antler@intel.com>
2016-02-05 20:25:06 -05:00
Andrew Boie
689ec02211 x86: mvic: fix IDT reload
The argument to 'lidt' is a chunk of memory with the base address
and limit of the IDT, and not the IDT itself. Horrible things
were happening when the IDT itself was being passed to this
instruction.

To be extra safe, disable interrupts while we modify the table
and subsequently reload it.

Change-Id: I9bf96f13a5f6e1be80d11bbfb9db3df1f2ed613a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:06 -05:00
Andrew Boie
f723c0735d test_stack: enable on ARC
Change-Id: I225130228af2716b566da86eb8a477041daca4e5
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:06 -05:00
Andrew Boie
6eb403389d test_sema: enable for generic_arc
Excluded from quark_se_ss due to insufficient RAM.

Change-Id: I75bb34c058c7c41d4f3baaf12ca110f23eb531b8
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:06 -05:00
Andrew Boie
2568ebc917 test_ipm: enable on ARC
Change-Id: Id3dce706f011ef6f0ebb20594d286fb67fbd4168
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:06 -05:00
Andrew Boie
570fb5abb5 test_fifo: enable ARC build
Change-Id: I921fc300438d1cadc46f000d85b07d5dd66fa9ec
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:06 -05:00
Andrew Boie
fa3569323c test_lifo: enable ARC sanity build
This test uses too much RAM to run on Quark SE, but we now can at least
build it for generic_arc.

Change-Id: Ibdc144303d9d9c2049e4d5d4ec637b1e4778f392
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:06 -05:00
Dirk Brandewie
788fa782dc iamcu: Fix loapic_mkstub macro to pass isr context value correctly
Change-Id: I4f5bab262171e2d248f7c6fdab960a45a47840a9
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:25:06 -05:00
Daniel Leung
649267298f samples: add sample app for GPIO
This adds a sample app to utilize GPIOs on x86 side of
Arduino 101. Refer to the header of source file for
more information.

Change-Id: Ie547618b2c4fb483d85d6458bd68dd2849e1d19d
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:06 -05:00
Daniel Leung
afcc0babae samples: add a sample to use Grove LCD through I2C
This adds a sample app which displays an incrementing
counter through the Grove LCD, with changing backlight.

Please refer to the README file on how to setup
the hardware.

Change-Id: I95c0571edaeabb281ee06f3b32fad1ab5b64d924
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:06 -05:00
Daniel Leung
b90cb66afd grove/lcd: add an option to specify I2C master
Add an option to specify to which I2C master the Grove LCD
is connected, instead of already using the i2c_dw driver
port #0.

Change-Id: I4e61ef8e31c75ae912e2d16f8939369c0b8bbc2c
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:06 -05:00
Daniel Leung
d9e930bc09 samples: using I2C FRAM via Arduino 101
This adds a sample app to utilize the Fujitsu
MB85RC256V FRAM via I2C on Arduino 101. It does
simple read and write on the chip.

Change-Id: Ie20470f3701acb0e4fa9bc3d7b3676625839cf06
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:06 -05:00
Daniel Leung
8a3273aeb6 arm/fsl_frdm_k64f: serial/uart_k20: rework UART clock gating
The code to poke the system integration module to disable clock gating
for UARTs only works for UART0-3 since all the bits are in the same
register. However, clocks for UART4 and UART5 are controlled by
another register. This means that we have been writing to the wrong
bit for enabling UART4.

This patch fixes this issue, and moves the clock gating clock into
board initialization. The incorrect code has also been removed to
prevent accidental mis-use. The dev_data struct is no longer needed
for uart_k20, so that is removed as well.

Change-Id: I67845a417e43647bf0ffcbdbda34ce68fa887713
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:06 -05:00
Daniel Leung
1487f4b6e2 arm/fsl_frdm_k64f: hardware initialization has to be done first
Hardware initialization for fsl_frdm_k64f has to be done at the very
beginning at boot, before anything else. So change the init priority
for hardware initialization to 0. This makes sure the hardware is
initialized. Or else any memory/register access will hang
the board.

Change-Id: Idc1c9449bb7cd1ec7b8d8f44004ea76cc7c09a18
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:06 -05:00
Anas Nashif
225d8e8f48 iamcu: disable building with iamcu compiler
IAMCU compiler breaks some drivers and interrupt handling. Disabling
while we investigate the issue.

The failing test applications are:
- watchdog
- rtc

on quark d2000 boards.

Change-Id: I5b34dcc28206d2bd982f08f75134c66ba9df0cc7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:06 -05:00
Dirk Brandewie
d8a1c8ef17 x86: iamcu: Add support for the IAMCU calling convention.
Add support for compilers conforming to the IAMCU calling convention
as documented by
https://github.com/hjl-tools/x86-psABI/wiki/iamcu-psABI-0.7.pdf


Change-Id: I6fd9d5bede0538b2049772e3850a5940c5dd911e
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:25:06 -05:00
Johan Hedberg
8683dc4836 drivers/console: Add support for ANSI sequences with values
ANSI sequences may have a numbered prefix which means that the action
needs to be taken the number amount of times, e.g. "Esc[ValueA" (move
cursor forward Value number of characters). Some ANSI commands also
have two preceding values, such as Esc[Line;ColumnH (move cursor to
Line & Column).

To support these ANSI sequences we need to track a bit of extra state,
most conveniently done using a bit field. Since the ANSI parsing logic
gets a bit long at this point it's refactored into its own handle_ansi()
function.

Change-Id: I0711f869d5324f9f827915fde468fe470e7689ed
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:06 -05:00
Vlad Lungu
8de1dac833 Add isgraph()/isprint()/isxdigit()/toupper()
Needed for porting various software

Change-Id: Ic5e89f4e606e46bd0c6de67cebb5b8e3159ab90e
Signed-off-by: Vlad Lungu <vlad.lungu@windriver.com>
2016-02-05 20:25:06 -05:00
Johan Hedberg
ceba31ade4 drivers/console: Use cursor save/restore escape sequences
Instead of keeping track how many characters we need to move back to
get to the original position, take advantage of the save/restore
escape sequences. This allows us to drop the extra 'i' variable from
both insert_char() as well as del_char().

Change-Id: I69a2b5ea12ec2a7a2e4d519b55e4c737b5d5d25a
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:06 -05:00