# Check for compiler support of 128 bit integers
AC_CHECK_TYPES([__int128_t, __uint128_t], [], [], [])
-# Availability of bt_put_le16() depends on the bluez library version.
-AC_CACHE_CHECK([for bt_put_le16], [sr_cv_have_btputle16],
- [AC_LINK_IFELSE([AC_LANG_PROGRAM(
- [[#include <bluetooth/bluetooth.h>]],
- [[bt_put_le16(0, (void *)0);]])],
- [sr_cv_have_btputle16=yes], [sr_cv_have_btputle16=no])])
-AS_IF([test "x$sr_cv_have_btputle16" = xyes],
- [AC_DEFINE([HAVE_BT_PUT_LE16], [1], [Specifies whether we have bt_put_le16().])])
-
########################
## Hardware drivers ##
########################
* the header doesn't.
*/
-#if !defined HAVE_BT_PUT_LE16
-static inline void bt_put_le16(uint16_t v, uint8_t *p)
-{
- p[0] = (v >> 0) & 0xff;
- p[1] = (v >> 8) & 0xff;
-}
-#endif
-
/* }}} compat decls */
/* {{{ Linux socket specific decls */
if (sr_bt_check_socket_usable(desc) < 0)
return -2;
- bt_put_le16(desc->cccd_value, buf);
+ write_u16le(buf, desc->cccd_value);
wrlen = sr_bt_char_write_req(desc, desc->cccd_handle, buf, sizeof(buf));
if (wrlen != sizeof(buf))
return -2;
return -2;
header[0] = type;
- bt_put_le16(handle, &header[1]);
+ write_u16le(&header[1], handle);
if (data && len)
wrlen = writev(desc->fd, iov, ARRAY_SIZE(iov));