Make sure we are connected to the right device.
Change-Id: I09e696563191392d23a316ad065bb7e320df76bb
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
NRF_GPIO_BASE can be used by both the nrf51 and nrf52 families, as it
gets defined by the nrf5x.h header files.
Change-Id: I8e6b265d9ce94551389ca170f105a53c88d58c68
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Sensors are end-devices and usually nothing depends on them,
so set a global priority for all sensors and use it instead of
individual values per sensor.
Change-Id: I5847411e783ef8a8517f0ab1d8234810513707b4
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move SRAM_BASE_ADDRESS and FLASH_BASE_ADDRESS to Kconfig.soc since
it will most likely be the same values for all STM32 socs.
Change-Id: I682dc441e34155a19a4f90757707008ef299e9d4
Signed-off-by: Fabien Parent <fparent@baylibre.com>
Generalize the LOG_ETHERNET_LEVEL configuration parameter for use with
multiple ethernet drivers.
Change-Id: I26bc2189c8cf79db19f59e8082caec03b0d9c7b8
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Make sure that kernel/unified, that is included in libs-y does not
built recursively through building kernel/ directory.
Make sure that any lib.a library is not included into libzephyr.a
and thus object modules from those lib.a files are linked only if a
function from that object module is referenced from the application.
Jira: ZEP-1025
Change-Id: Id3a3e96ca0b8abc9aedde0ffb9baa0164e380464
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
API documenation for Nanokernel FIFO make no mention that the data items
added to the FIFO must include and reserve the first 32 bits for use as
a pointer to the next item in the FIFO. This adds that note, as described
in the overview FIFO documentation.
Change-Id: I8cf0072d97dbb373a73d534f39b72831c726f4ef
Jira: ZEP-747
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
i2c_quark_se_ss driver is deprecated and replaced
by i2c_qmsi_ss. So remove i2c_quark_se_ss definition.
Change-Id: Idcc6a7f01ffae626ae7d5f9966eac67be78599af
Signed-off-by: Qiu Peiyang <peiyangx.qiu@intel.com>
Simplified some documentation, removing inconsistencies and making
it easier to understand by separating PM infrastructure areas and
soc specific components that implement the hooks.
Removed the DEVICE_SUSPEND_ONLY policy as it is redundant and
causes high complexity in the flow. It is also not practical
to use it because it was meant to be used without doing CPU or SOC
low power state operations. This means it would do device PM
operations in the ISR of the system timer used by the scheduler.
This can disrupt the scheduler time.
Added a check of a flag around the notification sent from the ISR
of the wake event and created APIs to set/clear it. This will
allow disabling the notification when not needed from
_sys_soc_suspend().
Jira: ZEP-972
Change-Id: Id7aa7d2683384eabed518d4efac446ecc84c3498
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
The new device control API added a 'device_power_state' variable to the
driver's data structure to keep track of the current power state set
for a device. This member variable is conditionally built into the
runtime data structure of each driver, but in some cases the whole data
structure is conditional on its respective API_REENTRANCY config
variable.
In those cases where the runtime data was previously used only for
reentrancy protection, the runtime data pointer used for device
initialization is NULL, and when power management is enabled, this
invalid pointer ends up dereferenced to get the device_power_state
member.
Make the declaration of the runtime data dependent on any of its
conditional members, and NULL only when all of those settings are
disabled.
Change-Id: I4f41e00ad8551a096db639e31d33f43752b6672f
Signed-off-by: Iván Briano <ivan.briano@intel.com>
This misfeature can crop up at development time as the linker scripts
are modified, not just as a regression in known tests (c.f. ZEP-955).
So it makes more sense to put it in a check_link_map script inovked
for every build. Remove it from sanitycheck.
Change-Id: I9c2f47a26a3bc03170b895545476350341e91170
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Oops, turns out that we don't require perl in all our build
environments. Rewrite this script (it's tiny) in Python. Exactly the
same logic.
Change-Id: Icbf4b36ef0b18fca94d54fc7fe5e47343c55c669
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Simplifies k_msgq_purge() at the expense of making the case of an
already empty message queue a little slower.
Change-Id: I8fafd6d49233efbf23b95d171f81bf795e828454
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
This clarify what this list holds making code more readable.
Change-Id: Ia212cf611cbf2c2deab139324120b993bf14d06f
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
Layers (modules) above HCI like L2CAP need to know status of applied
security procedure when it's triggered on existing connection. It gives
them possibility to make action in layer specific context on
post-security-procedure conditions.
Change-Id: Ia10078469847b29bb7eb3b1fb376ac305dd0b0fc
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
This makes k_work_submit to allow resubmits when the work is pending so
the user code don't have to check the pending flag to avoid a possible
assert.
Change-Id: Ic39f3dc5936837ce84ad028cf3d426d0558c2925
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds k_work_pending which can be use to check if a k_work is
pending execution.
Change-Id: Ifd56e8d65d555c7e9722c547fe83e13e886d63cd
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This makes nano_work_submit to allow resubmits when the work is pending
so the user code don't have to check the pending flag to avoid a possible
assert.
Change-Id: I6c9c7a2277aa8e590cedf1d043e55f72f3413451
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds nano_work_pending which can be use to check if a nano_work
is pending execution.
Change-Id: Iae0492a750de93fcd7e89e3a2e74509ffce4983b
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fix the following compiler warnings/errors that show up with llvm:
tests/bluetooth/shell/src/main.c:594:2: error:
initializing 'const uint8_t *' (aka 'const unsigned char *') with an
expression of type 'char [11]' converts between pointers to integer types
with different sign [-Werror,-Wpointer-sign]
BT_DATA(BT_DATA_NAME_COMPLETE, DEVICE_NAME, DEVICE_NAME_LEN),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/bluetooth/bluetooth.h:93:11: note: expanded
from macro 'BT_DATA'
.data = (_data), \
^~~~~~~
1 error generated.
net/bluetooth/hci_core.c:1759:22: error: passing
'uint8_t [248]' to parameter of type 'const char *' converts between
pointers to integer types with different sign [-Werror,-Wpointer-sign]
name_len = strlen(evt->name);
^~~~~~~~~
lib/libc/minimal/include/string.h:32:34: note: passing
argument to parameter 's' here
extern size_t strlen(const char *s);
^
CC net/bluetooth/log.o
net/bluetooth/hci_core.c:3136:10: error: passing
'uint8_t [248]' to parameter of type 'char *' converts between pointers to
integer types with different sign [-Werror,-Wpointer-sign]
strncpy(name_cp->local_name, CONFIG_BLUETOOTH_BREDR_NAME,
^~~~~~~~~~~~~~~~~~~
lib/libc/minimal/include/string.h:30:39: note: passing
argument to parameter 'd' here
extern char *strncpy(char *_Restrict d, const char *_Restrict s, size_t n);
net/bluetooth/conn.c:301:10: error: passing
'uint8_t [16]' to parameter of type 'char *' converts between pointers to
integer types with different sign [-Werror,-Wpointer-sign]
strncpy(cp->pin_code, pin, sizeof(cp->pin_code));
^~~~~~~~~~~~
lib/libc/minimal/include/string.h:30:39: note: passing
argument to parameter 'd' here
extern char *strncpy(char *_Restrict d, const char *_Restrict s, size_t n);
Change-Id: I342131c6c2b25445382b2317d673561c4087096b
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
strncmp() expects pointers of type 'char *', we could cast option.value
to 'char *', but we can use memcmp() instead, which has the benefit of
being simpler.
Change-Id: I8c4ee4401712f3617c134d8e5b6d84e8f5cc4e1d
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Add typecasting in dma QMSI shim to avoid compilation error.
The DMA API and QMSI have their own definitions for the
dma configuration parameters, such as handshake_interface,
handshake_polarity, source/destination_transfer_width,
channel_direction, and source/destination_burst_length.
When a API is called, the shim driver will assign values
for the above-mentioned parameters to the configuration
variable(based on QMSI's definiton) from the values in the
variable provided by the caller based on API's definition.
Even though all these parameters have similiar definition
and values in both the generic API and QMSI, QMSI uses
its own names which are different from those definied in
the generic API. Without typecasting, the parameter value
assignment will cause compilation error(even though error
only happens for some compiler).
Jira: ZEP-1031
Change-Id: I147c690799514bd611cd9f88316f44346e095359
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
Obtained from device.h, which includes microkernel.h when building for a
microkernel system.
Caught by LLVM.
Change-Id: I98a00269b2b6cb38c851b176323de1228d65603d
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
printk format specifier used for size_t (%lu) was not compatible
with llvm because it sees size_t as unsigned int. Using %zu
makes it portable acroos compilers.
Change-Id: If0e732fbaada5f50a975ec912b8147d6b252a2de
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
API Implemented Connect API. This can be used to establish A2DP connection.
Change-Id: I8cf714283a452c40b33fd46de442514a1341264c
Signed-off-by: Itankar, Piyush T <piyush.t.itankar@intel.com>
The maximum allowed values in Kconfig were quite conservative.
Change-Id: Icd2d09a2d52fbbaf03671147f08e08385c6776c7
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
As per the coding guidelines spaces should be used for allignment
of macros.
Change-Id: I8947af32ec64ef3791a88bc3ff151f2fbb3c8480
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
The reference counting has been an internal trick to handle the TX
fiber, but it's not really needed since we can do the same thing with
the help of the state value.
Change-Id: I9cdaed9afb0b0c07e23d599637328cb863c123b3
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
dlc will be destroyed when ref count reaches 0.
This also moves calling user disconnected callback to destroy
since disocnneted callback will be called whenever dlc is
destroyed regardless of dlc previously been in connected state
or not.
Change-Id: I4a13f8118704c59a88923b74e538063c0db11d77
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
DM (Disconnect mode) response is to inform the peer that dlc
is in logically disconnected state. It can be used to reject
an incoming SABM or PN request as well.
For example if a PN request comes to a server channel which is
not registered, a DM response can be sent.
> ACL Data RX: Handle 256 flags 0x02 dlen 18
Channel: 64 len 14 [PSM 3 mode 0] {chan 0}
RFCOMM: Unnumbered Info with Header Check (UIH) (0xef)
Address: 0x03 cr 1 dlci 0x00
Control: 0xef poll/final 0
Length: 10
FCS: 0x70
MCC Message type: DLC Parameter Negotiation CMD (0x20)
Length: 8
dlci 2 frame_type 0 credit_flow 15 pri 7
ack_timer 0 frame_size 195 max_retrans 0 credits 7
< ACL Data TX: Handle 256 flags 0x00 dlen 8
Channel: 64 len 4 [PSM 3 mode 0] {chan 0}
RFCOMM: Disconnect Mode (DM) (0x0f)
Address: 0x0b cr 1 dlci 0x02
Control: 0x1f poll/final 1
Length: 0
FCS: 0x73
Change-Id: I1f7576ad97590eed147505802f59faadacc790ea
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
This ensures ADVTP patches are build tested with debug enabled.
Change-Id: I5c09afea4a9df84b054d2383f0b53ff85fa5dcd5
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
conn->handle belongs to core stack space. Apps shouldn't get access to
it. This fixes build/compiler error when Kconfig's DEBUG_AVDTP is defined.
Change-Id: Id188b367e1e4b7d377a7ef59c0f672229ad98fd8
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
The protocol for audio distribution shouldn't have references to internal
core stack space.
Change-Id: Ifce00856dfb8e48d406f815d54cf4b493a7a2770
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
The profile code as sort of user application shouldn't use internal core
stack headers.
Change-Id: I3c6aabf0ee8e1bedac0bd99ebc8526d735219369
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>