Moves all files in this sub-directory up one level, to the main
microkernel source directory, then deletes the sub-directory itself.
Change-Id: I5b20310828c26038015b159cb6c57906a8258727
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Moves all files in this sub-directory up one level, to the main
microkernel source directory, then deletes the sub-directory itself.
Change-Id: Ic8e158e4e9be9e4ba21a935c371c49beee4ad276
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Moves all files in this sub-directory up one level, to the main
microkernel source directory, then deletes the sub-directory itself.
Change-Id: Ifd56369e5209b06fae39ee69403ea234fb392b4a
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Moves all files in this sub-directory up one level, to the main
nanokernel source directory, then deletes the sub-directory itself.
This change means that all nanokernel source files (with the
excecption of its include files) are now in the main nanokernel
source directory, which is a more intuitive arrangement.
Change-Id: I6bd4b1bb6fdd9be13d57b320947f520a5bc73914
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Relocates start_task() so that it appears in the main microkernel
directory, alongside its complementary routine abort_task();
this corrects a long-standing anomaly in which this microkernel-
specific routine appeared in the nanokernel portion of the tree.
With this move, the start_task.c file and its parent nanokernel/task
sub-directory no longer serve any purpose and are removed. (Note that
no changes are required for ARC architecture support, which does not
support microkernel capabilities and doesn't use this sub-directory.)
Change-Id: I973e1c32c9a8ddcacdc08159069ae7cdfea0f107
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This renaming will impact the following functions:
nano_node_tick_delta
task_node_tick_delta
Change-Id: I5d3fdfe0121674d88b8f3d8777150b2242b88d1a
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
We no longer support the concept of nodes.
This will impact:
task_node_cycle_get_32
isr_node_cycle_get_32
nano_node_cycle_get_32
This change also updates the nanokernel test API to work with the change.
Change-Id: I68de883b07d4775b09fda13e503c040b3f14baa7
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
We no longer support the concept of nodes. This will impact the
following function names:
task_node_tick_get
isr_node_tick-get
Change-Id: I2591193976578689e70b9d6833d5a89a4dc0c4ce
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
We no longer support the concept of nodes. This will impact the following
functions:
task_node_tick_get_32
isr_node_tick_get_32
nano_node_tick_get_32
Change-Id: I27184c76516da16a0c3f335656f9efcee2fb549d
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
Eliminates unnecessary "node_" portion, as there is only a single
source for which workload information is collected.
Change-Id: Id7c03e2149d1b7979a6921e99e1db0288da09c0c
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Since the microkernel now supports only a single processor, there
is no longer a need for a means to identify it.
Change-Id: If5b2d8e114d8a3bfdd597bc23d70be5e1fa2238c
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
No longer referenced, and not part of the public API.
Change-Id: I97b7bbfe695fc867f93cb222ad893d112f25f755
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
There are no longer any utilities left in this directory.
Change-Id: I444851efd034453ca59eb211cac2aa6aa3d8c4fe
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This allows to build Bluetooth for the target.
Change-Id: I89b1c369d698ee20d0b190614d7f3a9f686f7a5e
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Bluetooth would be connected over second UART. At the moment last
interrupt is serial console and since this number define interrupt
static table it is not possible to register isr for Bluetooth
connected through second UART.
Change-Id: Icfcd436b2193b875c3eff90a67f85e11f4a24246
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Support following configurations:
- With SW ISR table (CONFIG_SW_ISR_TABLE=y)
- static (CONFIG_SW_ISR_TABLE_DYNAMIC=n)
- dynamic (CONFIG_SW_ISR_TABLE_DYNAMIC=y)
- Installed directly in the vector table
(CONFIG_SW_ISR_TABLE=n)
Change-Id: I8562504366295c63202a387c12a2f99f4f1b3dde
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
For fsl_frdm_k64f target add definitions for Bluetooth UART.
Change-Id: Ib1f036aa29ae8709a67016180639d7130a352777
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Support following configurations:
- With SW ISR table (CONFIG_SW_ISR_TABLE=y)
- static (CONFIG_SW_ISR_TABLE_DYNAMIC=n)
- dynamic (CONFIG_SW_ISR_TABLE_DYNAMIC=y)
- Installed directly in the vector table
(CONFIG_SW_ISR_TABLE=n)
Change-Id: Icbaf710fcd8ed8dba409c144cf25849985270a64
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Add Bluetooth UART driver to build targets.
Change-Id: Ia79b69a996bf79b24672bf1e0350e3de171ac409
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Add Bluetooth initialization for target ti_lm3s6965.
Change-Id: I7c7e392d2bb8671098e54b1305051a5882fd3bef
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Add definitions for UART for ti_lm3s6965.
Change-Id: If7b3d6f0cabd69eaad962b5e73429b66d1f0ef0e
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Several lines wrap beyond the recommended width. Cleaning up those lines
to be limited in size
Change-Id: Ie4b15087043886d481ce379d225cb9b96816d004
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
There is no code that these are attached to any longer. Removing the
dead externs to K_debug_req and K_debug_ack functions.
Change-Id: I169e6d13ff9d5c89029dea5322cecce62c27e3b1
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
With the recent cleanup, the code no longer has the concept of a node, and
therefore no longer needs the following function.
Change-Id: Ib40886c0fc07a465327c95a13106d90f2aef5f0a
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
We no longer have the concept of nodes, so this function doesn't
accomplish much of anything.
Change-Id: I273d0a6b746147c96046c13b8d46c17a7d0c2758
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method. This specific change maps the macro to the
function naming used by the OS.
Change accomplished with the following script:
#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
-not \( -path host/src/genIdt -prune \) \
-not \( -path host/src/gen_tables -prune \) \
-print | xargs sed -i "s/"${1}"/"${2}"/g"
echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
-not \( -path host/src/genIdt -prune \) \
-not \( -path host/src/gen_tables -prune \) \
-print | xargs sed -i "s/"${1}"/"${2}"/g"
Change-Id: If41030c6b9f0417356807b0cc6f4c287378e0c17
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
We only perform the HCI init from a single place, so having generic
command complete handlers is a bit pointless. Furthermore, doing the
commands asynchronously doesn't let us catch all errors that may
occur. This patch converts most of the HCI init sequence to use the
new capabilities of the bt_hci_cmd_send_sync() API to parse the return
parameters synchronously.
Since the command handling automatically converts non-zero statuses to
failures we no-longer need to check for the rp->status values in the
response handlers.
Change-Id: Ibb43312cac596b60ab87d88e37a9ae7ee2588182
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Instead of having global command completion handler we can keep the
code more concise by letting bt_hci_cmd_send_sync() give back the
return parameters straight to the caller. This patch extends the
buf->hci.sync variable to not just contain the initial semaphore, but
to have the return parameter bt_buf once the semaphore is given back.
The bt_hci_cmd_send_sync() function receives an extra parameter which
may be NULL if the caller isn't interested in the return parameters.
Change-Id: I41e3e4b1189c4a19d0159947a03fd7052cc98fa9
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
In certain scenarios we want to keep the buffers around for longer
and avoid the default bt_buf_put() calls from putting them back to the
available buffers queue. This patch adds reference counting for the
buffers, along with a bt_buf_hold() API to increment the reference
count. Now bt_buf_put() will only put the buffer back to the pool if
the reference count hits 0.
Change-Id: I1590c5574e18600939f55e5339a6da3d061f7682
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This enables debug for HCI_CORE for samples.
Change-Id: Ide0b3c3db0165a5d00439a7bd05fb516bf67a2f5
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Configuration option BLUETOOTH_DEBUG_HCI_CORE enables debug support
for Bluetooth HCI core. This allows us to fine tune debug output.
Change-Id: Ibc9a90192b8f3318f9683cef4781d0c3d6ae9f7b
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Configuration option BLUETOOTH_DEBUG_UART enables debug support for
Bluetooth UART driver.
Change-Id: I192f380be492df1a52ad212239447b6ee4b50aac
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Enable CONFIG_BLUETOOTH_DEBUG option for Bluetooth samples.
Change-Id: Id0d0377082b16f78f15c5e968c866bed2df69844
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
BLUETOOTH_DEBUG option enables extensive debug output to serial
console. Disabled by default.
Change-Id: I71a6ca4c4f1dfb5bd818e6b8320a07249befadfb
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Add nanokernel configuration to build Bluetooth init sample. Later on
sample would added to sanity check builds.
Change-Id: Ib7251c1b3f5d62c4f1e0bb1fba253ebb1e9342df
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
When the 'len' and 'min' parameters passed to bt_uart_read() are equal
the function is guaranteed to always return 'len' (it will keep
looping until that). This patch removes bt_uart_read() error checks
which would never occur in practice.
Change-Id: Icd879f1e15c6d33acc549155aabd24490098ffc5
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
There are some places where it's forgivable if bt_uart_read() wasn't
able to read as many bytes as requested. In other places it's not
acceptable (e.g. when reading ACL or event header). To avoid failing
in situations where we can handle receiving less data than requested
this patch adds a new parameter to bt_uart_read() to specify the
minimum required data amount.
Change-Id: I372e3af7aaa6bfabe14896eb10cc71c3deff94f2
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
If we're out of buffers the UART driver would previously loose sync of
where the packet boundaries go, because it was using the buffer itself
to store and parse the HCI packet headers. This patch modifies the
UART driver to use stack variable for initial header parsing, thereby
being able to always determine how many remaining bytes there are and
cleanly discard the bytes until the beginning of the next packet.
Change-Id: I278f3fc0c983e6a2a6904356ef1af1d25c9f06e4
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
If we are low on buffers we don't necessarily need to have
bt_buf_get() fail if we are in any other scheduling context besides an
ISR. This patch makes the bt_buf_get() function implicitly wait for
more buffers in case none are immediately available. The call to
get_wait() is done as a second step after a non-waiting call so that
we can give a warning log that the stack is running low on available
buffers.
Change-Id: I37430acc337302df23e516c07d38e08b9d61c57c
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Some logs indicate potentially problematic situations but are not
necessarily errors. Since we do want to log these regardless of the
debug setting it's better to have a separate BT_WARN macro for them.
Change-Id: Iad13fc4b58329113458c97b02855033836618f5b
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
We're already sending 'dummy' buffers to wake up the connection
fibers. The problem is that if we provide a real buffer type it may
have unintended consequences. E.g. with BT_ACL_OUT when bt_buf_put()
is called it may trigger an invalid HCI_Host_Num_Completed_Packets
command.
This patch creates a new BT_DUMMY buffer type to avoid this scenario.
The new type is an alias for BT_CMD since the pool where these buffers
come from is not quota-controlled and synced up with the controller.
Change-Id: I42ac235811dc242345853f7858c10bfc43e4f07d
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Every time we put a BT_ACL_IN buffer back to the pool we should report
this to the controller so it knows it can send us more data. This
patch makes the necessary modifications to the bt_buf_put() function
to trigger the HCI command.
The Host Number of Completed Packets command is special in that it
doesn't need to obey the reported ncmd value and also doesn't generate
any command status/complete events. Because of this we need an
exception for it in the bt_hci_cmd_send() function.
Change-Id: If65f28078fd0d81af853447e95bc53822fea75b7
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
To start supporting controller to host flow control we need to tell
the controller our supported packet count & MTU and send the enabling
HCI command. This patch does the necessary addition to the HCI init
procedure.
Change-Id: I51a66f8cc3a85782a5085f9aae0f4aeb59decad3
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
To track which ACL handle each buffer belongs to (needed for host flow
control) add the necessary information into a new ACL-specific struct.
Change-Id: Ie6cc7c32a70b43a4ff5954bb9dca34e4f62da292
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>