Removed min/max instances from more files

This commit is contained in:
Rahul Tank
2023-08-23 11:15:26 +05:30
parent 4c4f2e15a0
commit 6669d8b418
7 changed files with 57 additions and 0 deletions
+8
View File
@@ -41,6 +41,14 @@
static s32_t adv_int_min = ADV_INT_DEFAULT_MS;
#ifndef min
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif
#ifndef max
#define max(a, b) ((a) > (b) ? (a) : (b))
#endif
/* TinyCrypt PRNG consumes a lot of stack space, so we need to have
* an increased call stack whenever it's used.
*/
+8
View File
@@ -35,6 +35,14 @@ static struct bt_mesh_cfg_srv *conf;
static struct label labels[CONFIG_BT_MESH_LABEL_COUNT];
#ifndef min
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif
#ifndef max
#define max(a, b) ((a) > (b) ? (a) : (b))
#endif
static int comp_add_elem(struct os_mbuf *buf, struct bt_mesh_elem *elem,
bool primary)
{
+8
View File
@@ -39,6 +39,14 @@ extern u8_t g_mesh_addr_type;
static struct ble_gap_adv_params ble_adv_cur_conf[2];
#endif
#ifndef min
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif
#ifndef max
#define max(a, b) ((a) > (b) ? (a) : (b))
#endif
const char *
bt_hex(const void *buf, size_t len)
{
+9
View File
@@ -194,6 +194,15 @@ struct prov_rx {
#define TRANSACTION_TIMEOUT K_SECONDS(30)
#define PROTOCOL_TIMEOUT K_SECONDS(60)
#ifndef min
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif
#ifndef max
#define max(a, b) ((a) > (b) ? (a) : (b))
#endif
#if (MYNEWT_VAL(BLE_MESH_PB_GATT))
#define PROV_BUF_HEADROOM 5
#else
+8
View File
@@ -84,6 +84,14 @@ ble_uuid16_t BT_UUID_MESH_PROXY_DATA_OUT = BLE_UUID16_INIT(0x2ade);
#define CLIENT_BUF_SIZE 68
#ifndef min
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif
#ifndef max
#define max(a, b) ((a) > (b) ? (a) : (b))
#endif
static const struct ble_gap_adv_params slow_adv_param = {
.conn_mode = (BLE_GAP_CONN_MODE_UND),
.disc_mode = (BLE_GAP_DISC_MODE_GEN),
+8
View File
@@ -62,6 +62,14 @@ BUILD_ASSERT(CONFIG_BT_MESH_ADV_BUF_COUNT >= (CONFIG_BT_MESH_TX_SEG_MAX + 3));
/* How long to wait for available buffers before giving up */
#define BUF_TIMEOUT K_NO_WAIT
#ifndef min
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif
#ifndef max
#define max(a, b) ((a) > (b) ? (a) : (b))
#endif
static struct seg_tx {
struct bt_mesh_subnet *sub;
struct os_mbuf *seg[CONFIG_BT_MESH_TX_SEG_MAX];
+8
View File
@@ -40,6 +40,14 @@ static os_membuf_t ble_l2cap_coc_srv_mem[
static struct os_mempool ble_l2cap_coc_srv_pool;
#ifndef min
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif
#ifndef max
#define max(a, b) ((a) > (b) ? (a) : (b))
#endif
static void
ble_l2cap_coc_dbg_assert_srv_not_inserted(struct ble_l2cap_coc_srv *srv)
{