Microchip® Advanced Software Framework

ble_utils.h File Reference

BLE Utils declarations.

Copyright (c) 2017-2019 Microchip Technology Inc. and its subsidiaries.

#include <asf.h>

Macros

#define ALL_UNUSED(...)   ALL_UNUSED_IMPL( VA_NUM_ARGS(__VA_ARGS__))(__VA_ARGS__ )
 
#define ALL_UNUSED_IMPL(nargs)   ALL_UNUSED_IMPL_(nargs)
 
#define ALL_UNUSED_IMPL_(nargs)   UNUSED ## nargs
 
#define BLE_BROADCASTER   (0x05)
 
#define BLE_CENTRAL   (0x01)
 
#define BLE_CENTRAL_AND_PERIPHERAL   (0x03)
 
#define BLE_OBSERVER   (0x04)
 
#define BLE_PERIPHERAL   (0x02)
 
#define DBG_LOG
 
#define DBG_LOG_CONT   printf
 
#define DBG_LOG_DEV   ALL_UNUSED
 
#define IEEE11073_EXPONENT   (0xFF000000)
 
#define IEEE754_MANTISA(val)   ((uint32_t)(val * 10))
 
#define IEEE754_TO_IEEE11073_FLOAT(f_val)
 
#define UNUSED1(x)   (void)(x)
 
#define UNUSED2(x, y)   (void)(x),(void)(y)
 
#define UNUSED3(x, y, z)   (void)(x),(void)(y),(void)(z)
 
#define UNUSED4(a, x, y, z)   (void)(a),(void)(x),(void)(y),(void)(z)
 
#define UNUSED5(a, b, x, y, z)   (void)(a),(void)(b),(void)(x),(void)(y),(void)(z)
 
#define UNUSED6(a, b, c, x, y, z)   (void)(a),(void)(b),(void)(c),(void)(x),(void)(y),(void)(z)
 
#define UNUSED7(a, b, c, d, x, y, z)   (void)(a),(void)(b),(void)(c),(void)(d),(void)(x),(void)(y),(void)(z)
 
#define UNUSED8(a, b, c, d, e, x, y, z)   (void)(a),(void)(b),(void)(c),(void)(d),(void)(e),(void)(x),(void)(y),(void)(z)
 
#define VA_NUM_ARGS(...)   VA_NUM_ARGS_IMPL(__VA_ARGS__, 8, 7, 6, 5, 4, 3, 2, 1)
 
#define VA_NUM_ARGS_IMPL(_1, _2, _3, _4, _5, _6, _7, _8, N,...)   N
 

Functions

static uint32_t convert_ieee754_ieee11073_float (float f_val)
 

#define ALL_UNUSED (   ...)    ALL_UNUSED_IMPL( VA_NUM_ARGS(__VA_ARGS__))(__VA_ARGS__ )
#define ALL_UNUSED_IMPL (   nargs)    ALL_UNUSED_IMPL_(nargs)
#define ALL_UNUSED_IMPL_ (   nargs)    UNUSED ## nargs
#define BLE_BROADCASTER   (0x05)
#define BLE_CENTRAL   (0x01)
#define BLE_CENTRAL_AND_PERIPHERAL   (0x03)
#define BLE_OBSERVER   (0x04)
#define BLE_PERIPHERAL   (0x02)
#define IEEE11073_EXPONENT   (0xFF000000)
#define IEEE754_MANTISA (   val)    ((uint32_t)(val * 10))
#define IEEE754_TO_IEEE11073_FLOAT (   f_val)
Value:
#define IEEE754_MANTISA(val)
Definition: ble_utils.h:78
#define IEEE11073_EXPONENT
Definition: ble_utils.h:76

Referenced by convert_ieee754_ieee11073_float().

#define UNUSED1 (   x)    (void)(x)
#define UNUSED2 (   x,
 
)    (void)(x),(void)(y)
#define UNUSED3 (   x,
  y,
 
)    (void)(x),(void)(y),(void)(z)
#define UNUSED4 (   a,
  x,
  y,
 
)    (void)(a),(void)(x),(void)(y),(void)(z)
#define UNUSED5 (   a,
  b,
  x,
  y,
 
)    (void)(a),(void)(b),(void)(x),(void)(y),(void)(z)
#define UNUSED6 (   a,
  b,
  c,
  x,
  y,
 
)    (void)(a),(void)(b),(void)(c),(void)(x),(void)(y),(void)(z)
#define UNUSED7 (   a,
  b,
  c,
  d,
  x,
  y,
 
)    (void)(a),(void)(b),(void)(c),(void)(d),(void)(x),(void)(y),(void)(z)
#define UNUSED8 (   a,
  b,
  c,
  d,
  e,
  x,
  y,
 
)    (void)(a),(void)(b),(void)(c),(void)(d),(void)(e),(void)(x),(void)(y),(void)(z)
#define VA_NUM_ARGS (   ...)    VA_NUM_ARGS_IMPL(__VA_ARGS__, 8, 7, 6, 5, 4, 3, 2, 1)
#define VA_NUM_ARGS_IMPL (   _1,
  _2,
  _3,
  _4,
  _5,
  _6,
  _7,
  _8,
  N,
  ... 
)    N

static uint32_t convert_ieee754_ieee11073_float ( float  f_val)
inlinestatic