1 /***************************************************************************//**
2  * @brief Bluetooth Link Layer configuration
3  *******************************************************************************
4  * # License
5  * <b>Copyright 2023 Silicon Laboratories Inc. www.silabs.com</b>
6  *******************************************************************************
7  *
8  * SPDX-License-Identifier: Zlib
9  *
10  * The licensor of this software is Silicon Laboratories Inc.
11  *
12  * This software is provided 'as-is', without any express or implied
13  * warranty. In no event will the authors be held liable for any damages
14  * arising from the use of this software.
15  *
16  * Permission is granted to anyone to use this software for any purpose,
17  * including commercial applications, and to alter it and redistribute it
18  * freely, subject to the following restrictions:
19  *
20  * 1. The origin of this software must not be misrepresented; you must not
21  *    claim that you wrote the original software. If you use this software
22  *    in a product, an acknowledgment in the product documentation would be
23  *    appreciated but is not required.
24  * 2. Altered source versions must be plainly marked as such, and must not be
25  *    misrepresented as being the original software.
26  * 3. This notice may not be removed or altered from any source distribution.
27  *
28  ******************************************************************************/
29 
30 #ifndef SL_BT_BLUETOOTH_LL_PRIORITIES_DEFINED
31 #define SL_BT_BLUETOOTH_LL_PRIORITIES_DEFINED
32 
33 typedef struct {
34   uint8_t scan_min;
35   uint8_t scan_max;
36   uint8_t adv_min;
37   uint8_t adv_max;
38   uint8_t conn_min;
39   uint8_t conn_max;
40   uint8_t init_min;
41   uint8_t init_max;
42   uint8_t rail_mapping_offset;
43   uint8_t rail_mapping_range;
44   uint8_t _reserved;
45   uint8_t adv_step;
46   uint8_t scan_step;
47   uint8_t pawr_tx_min;
48   uint8_t pawr_tx_max;
49   uint8_t pawr_rx_min;
50   uint8_t pawr_rx_max;
51 } sl_bt_bluetooth_ll_priorities;
52 
53 //Default priority configuration
54 #define SL_BT_BLUETOOTH_PRIORITIES_DEFAULT { 191, 143, 175, 127, 135, 0, 55, 15, 16, 16, 0, 4, 4, 15, 5, 20, 10 }
55 
56 #define SL_BT_BLUETOOTH_PA_AUTOMODE 0xff
57 
58 #include "sl_common.h"
59 SL_PACK_START(1)
60 typedef struct {
61   int8_t golden_rssi_min_1m; //<! Golden range lowest RSSI for 1M PHY.
62   int8_t golden_rssi_max_1m; //<! Golden range highest RSSI for 1M PHY.
63 
64   int8_t golden_rssi_min_2m; //<! Golden range lowest RSSI for 2M PHY.
65   int8_t golden_rssi_max_2m; //<! Golden range highest RSSI for 2M PHY.
66 
67   int8_t golden_rssi_min_coded_s8; //<! Golden range lowest RSSI for Coded PHY w/ S=8.
68   int8_t golden_rssi_max_coded_s8; //<! Golden range highest RSSI for Coded PHY w/ S=8.
69 
70   int8_t golden_rssi_min_coded_s2; //<! Golden range lowest RSSI for Coded PHY w/ S=2.
71   int8_t golden_rssi_max_coded_s2; //<! Golden range highest RSSI for Coded PHY w/ S=2.
72 
73   uint8_t activate_power_control;
74 } SL_ATTRIBUTE_PACKED sl_bt_ll_power_control_config_t;
75 SL_PACK_END()
76 
77 #define SL_BT_USE_MAX_POWER_LEVEL_SUPPORTED_BY_RADIO 0x7fff
78 #define SL_BT_USE_MIN_POWER_LEVEL_SUPPORTED_BY_RADIO 0x7fff
79 
80 #endif
81