dotstack API Reference
1.10.37
|
Functions in this module provide interface to DotStack functionality that is common to all protocols and profiles. More...
Typedefs | |
typedef void(* | bt_sys_callback_fp) (bt_bool success, void *param) |
System start callback. More... | |
Functions | |
void | bt_sys_init (void) |
Initialize the Bluetooth system. More... | |
void | bt_sys_init_ex (bt_byte default_link_policy) |
Initialize the Bluetooth system. More... | |
void | bt_sys_start (bt_bool discoverable, bt_bool connectable, const bt_byte *sdp_db, bt_uint sdp_db_len, bt_sys_callback_fp callback, void *callback_param) |
Start the Bluetooth system. More... | |
bt_l2cap_mgr_t * | bt_sys_get_l2cap_manager (void) |
Get the L2CAP manager. More... | |
bt_gap_mgr_t * | bt_sys_get_gap_manager (void) |
Get the GAP manager. More... | |
const bt_byte * | bt_sys_get_version (void) |
Get the version of the dotstack library. More... | |
Functions in this module provide interface to DotStack functionality that is common to all protocols and profiles.
typedef void(* bt_sys_callback_fp) (bt_bool success, void *param) |
System start callback.
This callback function is called when system start initiated by bt_sys_start() has completed.
success | Success of the operation: BT_TRUE if successfull, BT_FALSE otherwise. |
param | Callback parameter that was specified when bt_sys_start() was called. |
bt_gap_mgr_t* bt_sys_get_gap_manager | ( | void | ) |
Get the GAP manager.
This function returns the GAP manager. The GAP manager is created as part of the start up sequence.
bt_l2cap_mgr_t* bt_sys_get_l2cap_manager | ( | void | ) |
Get the L2CAP manager.
This function returns the L2CAP manager. The L2CAP manager is created as part of the start up sequence.
const bt_byte* bt_sys_get_version | ( | void | ) |
Get the version of the dotstack library.
void bt_sys_init | ( | void | ) |
Initialize the Bluetooth system.
This function initializes all internal variables of HCI, L2CAP and SDP modules. It must be called by the application before it can access any functionality provided by the library. In addition to this initialization function the application must call initialization functions of all other profile modules the application is intended to use. E.g., if the application is using the SPP module the bt_spp_init() must be called right after calling bt_sys_init().
This function essentially calls bt_sys_init_ex(HCI_LINK_POLICY_ENABLE_ALL) so all link policy setting are enabled.
void bt_sys_init_ex | ( | bt_byte | default_link_policy | ) |
Initialize the Bluetooth system.
This function initializes all internal variables of HCI, L2CAP and SDP modules. It must be called by the application before it can access any functionality provided by the library. In addition to this initialization function the application must call initialization functions of all other profile modules the application is intended to use. E.g., if the application is using the SPP module the bt_spp_init() must be called right after calling bt_sys_init().
Also, the caller must provide an SDP database.
default_link_policy | default link policy settings. This is a bitmask that defines the initial value of the link policy settings for all new BR/EDR connections. This value can be a combination of the following values:
|
void bt_sys_start | ( | bt_bool | discoverable, |
bt_bool | connectable, | ||
const bt_byte * | sdp_db, | ||
bt_uint | sdp_db_len, | ||
bt_sys_callback_fp | callback, | ||
void * | callback_param | ||
) |
Start the Bluetooth system.
After all modules used by the application have been initialized this function should be called to start the Bluetooth system operation. During the start up sequence it will reset and initialize the HCI controller and then create the L2CAP manager. The application will be notified when the start up sequence completes by calling the provided callback function.
Also, the caller must provide an SDP database.
discoverable | defines whether the device is discoverable after reset. |
connectable | defines whether the device is connectable after reset. |
sdp_db | SDP database data. |
sdp_db_len | Length of SDP database data. |
callback | A callback function that will be called when the start up sequence is complete. |
callback_param | An arbitrary pointer that will be passed to the callback function. |