replace include <nanokernel.h> with <kernel.h> everywhere and also fix
any remaining mentions of nanokernel.
Keep the legacy samples/tests as is.
Change-Id: Iac48447bd191e83f21a719c69dc26233216d08dc
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The README.txt file is updated with information about wiring
and building. A testcase.ini file is also added by this patch.
Change-Id: I7354d844ac3dec41f0c9af02ede5da26f3ad0398
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Introduce random device API analgous to other device driver classes in
Zephyr. Modify the the KSDK random driver to implement the API.
We retain the sys_rand32_get() interface for now on the assumption it
will eventually relocate to or be otherwise replaced by an entropy
management system.
The existing TEST_RANDOM_GENERATOR related drivers that do not
generate entropy are not modified to expose this driver API since they
cannot generate entropy.
Change-Id: I60b2d5afddf242e802a1d9014c99579870fb7472
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
A very common pattern in code goes something like the following:
memcpy(net_buf_add(buf, len), data, len);
To avoid having to create this kind of complex constructions every
time, this patch adds a new API which simplifies the call:
net_buf_add_mem(buf, data, len);
Change-Id: Ic1aeae4baf88b2295d139f672d5d265db2ddbe7b
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
the commit include 5 ztest cases, cover the basic gpio APIs
including callback relevant and pin read/write functions.
It proves workable on intel quark c1000 and
arduino 101 platform
Change-Id: Iab30aa841cfa440c1f773b5a8c5ce0d68346c353
Signed-off-by: jing wang <jing.j.wang@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
the commit cover below apis by testing callback under RISE polarity
*) aio_cmp_configure
*) aio_cmd_disabel
Change-Id: Idc9ec3a2694950d0074b69d164ee2c1edac35c9a
Signed-off-by: jing wang <jing.j.wang@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
One missing ARG_UNUSED is added by this commit.
Change-Id: I4d9275cd7de4675a960adc67018633dcf8bdc034
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
the commit cover basic message queue api testing across contexts
and some typical scenario
Change-Id: I82bb0c6a5df9d4436f5a98f78d1ad989e32282c8
Signed-off-by: jing wang <jing.j.wang@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
add semaphore test case which cover basic sema apis
across thread/thread and thread/isr contexts.
Change-Id: I2041969fcdc70a4dfc95438f067fbef8ebb31b19
Signed-off-by: jing wang <jing.j.wang@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
add unified kernel mutext test cases which covere basic
mutex apis under different conditions - timeout,
no_wait, forever
Change-Id: Iaab5bba80a6eebd89bfe675352d67b27024ad7bb
Signed-off-by: jing wang <jing.j.wang@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
add stack test cases which cover basic api usage across
threads and thread/isr.
Change-Id: I1f42fa1139899c932a14da18753b93972f561bc8
Signed-off-by: jing wang <jing.j.wang@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
In unified kernel, memory maps are renamed as memory slabs.
This change ports tests/legacy/kernel/test_map stuff to
use unified APIs.
Change-Id: Ibf4d60fb53e45a119e6828a09f2638ee7def76b7
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This is the port of the legacy/kernel/test_critical test case to
the unified kernel, and to use the ztest framework
Change-Id: I10834cbb51446b4a12fc680c0b65438d550f4d85
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This is the port of the legacy/kernel/test_context test case to
the unified kernel
Change-Id: I344ac240eb3b48042477f8875115fdc3fca1154a
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The GPIO_INT_LEVEL value is zero so the mask assignement
is never executed. Using the bit complement GPIO_INT_EDGE
the proper mask is assigned
This issue was reported by Coverity
Coverity-CID: 151966
Change-Id: Iacfeb6466388023bd6123ba86280aa9ca15f34e4
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
The dev name for spi in the sensor sub-system was changed to
SPI_SS_x from SPI_x recently. Let's use the new name in the
sample app.
Change-Id: I78cdf21fce16290503c303e0de1432b4587486aa
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
Instead of including the rtd theme in zephyr use an installed instance,
if nothing is installed, use the default zephyr theme.
Change-Id: Ife4bd878e3f879cf59ecf2bc5d186a531a3bf1b6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The commit cover Interrupt Reset mode and Reset mode by 2 test cases.
They can't be tested in one shot, but need test separately.
api converage:
wdt_enable()
wdt_disable()
wdt_set_config()
wdt_get_config()
Change-Id: I44b20cfe97d860e8b25b2cab76f9d9398cfd8e69
Signed-off-by: jing wang <jing.j.wang@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
the test include 2 ztest cases, verfy below apis:
rtc_enable()
rtc_disable()
rtc_read()
rtc_set_config()
rtc_set_alarm()
rtc_get_pending_int()
Change-Id: Ifca2541312c5ec8d450803f1b6e4f5064098e7fe
Signed-off-by: jing wang <jing.j.wang@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This test case is under test set "lifecycle" against
https://www.zephyrproject.org/doc/kernel_v2/threads/lifecycle.html
Change-Id: I0d43c1a1798411c786efc45d76e6fd7c024c47dd
Signed-off-by: Sharron LIU <sharron.liu@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Change-Id: Iaadba1a720130a496a83c245c7da4b95dff168fd
Signed-off-by: Sharron LIU <sharron.liu@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Stops handle data if server responds with SDP Error PDU
Jira: ZEP-1112
Change-Id: Iaddb740f71fa86384753ab32956fc69b89faeea0
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Adds handler responsible for receiving SDP data on SDP client request.
For now simple validation are done on SDP response header data.
Jira: ZEP-1112
Change-Id: Ic6009030db34e26dfdbd57fa1b0a22f6e27b6a11
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
cid is uint16_t and L2CAP_BR_CID_DYN_END is 0xffff so doing
"cid < L2CAP_BR_CID_DYN_END" comparisong is always true resulting
in for loop not being terminated as expected. Check against cid
overflow instead. Code comment is also added for clarity.
Change-Id: I15d6d838ed8b731824e602d089d765614c96c6c1
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
Resets SDP client session data on related L2CAP transport channel
disconnection state. Leave the channel itself reset to L2CAP layer.
Jira: ZEP-1112
Change-Id: I4d8a8f10908f5e599ba6506470b98508869cb21b
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Makes possible to append user UUID to context to be able later iterate
it on subsequent resolving process.
Jira: ZEP-1112
Change-Id: I193ff1cee199045c9686dc4ca200adf19db377e4
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Renames and refactors helper get_client_session to sdp_client_get_session
to follow existing naming convention and adds second helper creating
new SDP client session. Then simplifies using them the API implementation.
Jira: ZEP-1112
Change-Id: I6b919f521e6665a7117fa06208b3fa2ae5f77fda
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Peer sends Remote Port Negotiation command to set port
communication settings. Currently we accept all the settings
sent by remote.
If there is only one value byte in the request then current
port settings has to be returned for which we returns the
default settings defined in ETSI.
Note that RPN may be sent even before a dlc is opened.
> 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: Remote Port Negotiation Command CMD (0x24)
Length: 8
dlci 10
br 3 db 2 sb 0 p 0 pt 0 xi 0 xo 0
rtri 0 rtro 0 rtci 0 rtco 0 xon 17 xoff 19
pm 0x3f7f
< ACL Data TX: Handle 256 flags 0x00 dlen 18
Channel: 64 len 14 [PSM 3 mode 0] {chan 0}
RFCOMM: Unnumbered Info with Header Check (UIH) (0xef)
Address: 0x01 cr 0 dlci 0x00
Control: 0xef poll/final 0
Length: 10
FCS: 0xaa
MCC Message type: Remote Port Negotiation Command RSP (0x24)
Length: 8
dlci 10
br 3 db 2 sb 0 p 0 pt 0 xi 0 xo 0
rtri 0 rtro 0 rtci 0 rtco 0 xon 17 xoff 19
pm 0x3f7f
Change-Id: I73b7d8577e7e2bc3e436f4db86a91e12db440f1f
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
rfcomm_make_uih_msg() only needs session to get the role while creating
msg. This is mainly done since some commands like Test and RPN may come
even before dlc is created.
Change-Id: Ifd5a2ceaf17c20db3f00604cd2b4f1759155123e
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
l2cap_br_conn_req_reply expects valid bt_l2cap_chan pointer but this
is achieved only on accept() callback. Use l2cap_br_send_conn_rsp
instead for rejecting cases where no channel was accepted. This also
makes success path being 'primary' function path ie erros all always
handled inside if() statements.
Jira: ZEP-1405
Change-Id: I890b4fcf029afce65eba4f2ebae0b1094feb007f
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
The buf.h header file is a more natural place for these than the
hci_driver.h file.
Change-Id: I1eedcf03ae6ffa374403b382ec665ae554d6847b
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Not all users are in an ISR context where we can't block, so give the
callers the freedom to choose if they want to block or not.
Jira: ZEP-1481
Change-Id: I19bd7e2df94c4eeb60886a17a78f872bd7bea887
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Adds validation check when 'sdp discovery' API is to be called
by client, to reuse existing connection if valid or initiate new one
if posssible to set SDP L2CAP link to remote.
Change-Id: I47ce33cb5e95cf2616f9b23712641b912ce40f37
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Added a Pending Request structure, this will keep
a track of the last sent AVDTP Singnalling Message.
This will be used to verify the response from the remote device
Memory will be allocated by the application.
Change-Id: Ic31df154b52ce9013e5039ab195a9651d1811a7a
Signed-off-by: Arun Jagadish <arun.jagadish@intel.com>
Adds for now stubs of handlers responsible for taking a connected and
disconnected state of SDP L2CAP channel.
Change-Id: I21b76b755168fb63f6cade5f6b0c0bab93d0a01f
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>