1 /* 2 * Copyright 2016-2023, Cypress Semiconductor Corporation or 3 * an affiliate of Cypress Semiconductor Corporation. All rights reserved. 4 * 5 * This software, including source code, documentation and related 6 * materials ("Software") is owned by Cypress Semiconductor Corporation 7 * or one of its affiliates ("Cypress") and is protected by and subject to 8 * worldwide patent protection (United States and foreign), 9 * United States copyright laws and international treaty provisions. 10 * Therefore, you may use this Software only as provided in the license 11 * agreement accompanying the software package from which you 12 * obtained this Software ("EULA"). 13 * If no EULA applies, Cypress hereby grants you a personal, non-exclusive, 14 * non-transferable license to copy, modify, and compile the Software 15 * source code solely for use in connection with Cypress's 16 * integrated circuit products. Any reproduction, modification, translation, 17 * compilation, or representation of this Software except as specified 18 * above is prohibited without the express written permission of Cypress. 19 * 20 * Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO WARRANTY OF ANY KIND, 21 * EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED 22 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress 23 * reserves the right to make changes to the Software without notice. Cypress 24 * does not assume any liability arising out of the application or use of the 25 * Software or any product or circuit described in the Software. Cypress does 26 * not authorize its products for use in any products where a malfunction or 27 * failure of the Cypress product may reasonably be expected to result in 28 * significant property damage, injury or death ("High Risk Product"). By 29 * including Cypress's product in a High Risk Product, the manufacturer 30 * of such system or application assumes all risk of such use and in doing 31 * so agrees to indemnify Cypress against all liability. 32 */ 33 34 /** @file 35 * 36 * Bluetooth Management (BTM) Application Programming Interface 37 * 38 * The BTM consists of several management entities: 39 * 1. Device Control - controls the local device 40 * 2. Device Discovery - manages inquiries, discover database 41 * 3. ACL Channels - manages ACL connections (BR/EDR and LE) 42 * 4. SCO Channels - manages SCO connections 43 * 5. Security - manages all security functionality 44 * 6. Power Management - manages park, sniff, hold, etc. 45 * 46 * WICED Bluetooth Framework Functions 47 */ 48 49 #pragma once 50 #include "wiced_bt_cfg.h" 51 #include "wiced_bt_dev.h" 52 53 /****************************************************** 54 * Function Declarations 55 ******************************************************/ 56 #ifdef __cplusplus 57 extern "C" { 58 #endif 59 60 /****************************************************************************/ 61 /** 62 * 63 * @ingroup wiced_bt_cfg 64 * 65 * @{ 66 */ 67 /****************************************************************************/ 68 69 /** 70 * 71 * Initialize the Bluetooth controller and stack; register 72 * callback for Bluetooth event notification. 73 * 74 * @param[in] p_bt_management_cback : Callback for receiving Bluetooth management events 75 * @param[in] p_bt_cfg_settings : Bluetooth stack configuration #wiced_bt_cfg_settings_t 76 * 77 * @return <b> WICED_BT_SUCCESS </b> : on success; \n 78 * <b> WICED_BT_FAILED </b> : if an error occurred 79 * @note This API must be called before using any BT functionality. \n 80 * If p_bt_cfg_settings is null, stack uses default parameters defined in wiced_bt_cfg.h \n 81 * However, it is strongly recommended that applications define the configuration to appropriate values based on the application use case. 82 */ 83 wiced_result_t wiced_bt_stack_init(wiced_bt_management_cback_t *p_bt_management_cback, 84 const wiced_bt_cfg_settings_t *p_bt_cfg_settings); 85 86 /** 87 * This is a blocking call (returns after all de-initialisation procedures are complete) 88 * It is recommended that the application disconnect any outstanding connections prior to invoking this function. 89 * 90 * @return <b> WICED_BT_SUCCESS </b> : on success; \n 91 * <b> WICED_BT_ERROR </b> : if an error occurred 92 */ 93 wiced_result_t wiced_bt_stack_deinit( void ); 94 95 96 /**@} wicedbt_Framework */ 97 98 99 #ifdef __cplusplus 100 } 101 #endif 102