Function riot_sys::ble_hs_start

source ·
pub unsafe extern "C" fn ble_hs_start() -> c_int
Expand description

Synchronizes the host with the controller by sending a sequence of HCI commands. This function must be called before any other host functionality is used, but it must be called after both the host and controller are initialized. Typically, the host-parent-task calls this function at the top of its task routine. This function must only be called in the host parent task. A safe alternative for starting the stack from any task is to call ble_hs_sched_start().

If the host fails to synchronize with the controller (if the controller is not fully booted, for example), the host will attempt to resynchronize every 100 ms. For this reason, an error return code is not necessarily fatal.

@return 0 on success; nonzero on error.