mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-10-15 02:07:21 +00:00
service/ans: don't depent on libm for creating bitmask (#903)
X-Original-Commit: 0fc4943638290b121b92bc87266860802ee91258
This commit is contained in:
committed by
Andrzej Kaczmarek
parent
448954c40b
commit
10cc211826
@@ -19,12 +19,6 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
/* Some ambiq SDK headers use `OVERFLOW` as an identifier. This is a macro
|
||||
* that is leaked by some versions of math.h.
|
||||
*/
|
||||
#undef OVERFLOW
|
||||
|
||||
#include "sysinit/sysinit.h"
|
||||
#include "syscfg/syscfg.h"
|
||||
@@ -32,7 +26,6 @@
|
||||
#include "host/ble_gap.h"
|
||||
#include "services/ans/ble_svc_ans.h"
|
||||
|
||||
|
||||
/* Max length of new alert info string */
|
||||
#define BLE_SVC_ANS_INFO_STR_MAX_LEN 18
|
||||
/* Max length of a new alert notification, max string length + 2 bytes
|
||||
@@ -349,7 +342,7 @@ ble_svc_ans_unr_alert_add(uint8_t cat_id)
|
||||
uint8_t cat_bit_mask;
|
||||
|
||||
if (cat_id < BLE_SVC_ANS_CAT_NUM) {
|
||||
cat_bit_mask = pow(2, cat_id);
|
||||
cat_bit_mask = 1 << cat_id;
|
||||
} else {
|
||||
return BLE_HS_EINVAL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user