diff options
author | Christopher Collins <ccollins@apache.org> | 2016-08-23 17:35:28 -0700 |
---|---|---|
committer | Christopher Collins <ccollins@apache.org> | 2016-08-23 17:35:28 -0700 |
commit | 70987f7d2e3c791132509f08566fe77de34142ac (patch) | |
tree | 269ca9b857f65c22b8f2b93560466984f96091e5 /net/nimble/include/nimble/ble.h | |
parent | 0d9c8f30efbe2dba00b21d9185e9db8e36cd579e (diff) | |
parent | 665e22f5722d6348c1b260192e27f69d855b58fd (diff) |
Merge branch 'develop' - in preparation for
backwards-compatibility-breaking changes to develop.
* develop: (290 commits)
sim compiler - replace objsize with size
Fix warnings reported by clang.
MYNEWT-329
MYNEWT-354
STM32f407 discovery board BSP
mbedtls; use smaller version of SHA256.
boot; boot loader does not need to call os_init() anymore, as bsp_init() has been exported.
boot; app does not need the dependency to mbedtls
slinky; time-based waits must use OS_TICKS_PER_SEC.
bootutil; adjust unit tests to work with status upkeep outside sys/config.
bootutil; was returning wrong image header in response when swithing images. Add boot_set_req() routine for unit test use.
boot/bootutil; remove debug console use from bootloader.
bootutil/imgmgr; output of boot now shows the fallback image.
imgmgr; automatically confirm image as good for now.
bootutil; add 'confirm' step, telling that image was confirmed as good. Otherwise next restart we'll go back to old image.
bootutil; make status element size depend on flash alignment restrictions.
boot, imgmgr; return the slot number for test image.
bootutil; move routines reading boot-copy-status from loader.c to bootutil_misc.c.
boot; return full flash location of status bytes, instead of just offset.
boot; don't use NFFS or FCB for keeping status. Interim commit.
...
Diffstat (limited to 'net/nimble/include/nimble/ble.h')
-rw-r--r-- | net/nimble/include/nimble/ble.h | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/net/nimble/include/nimble/ble.h b/net/nimble/include/nimble/ble.h index 04ea21cb..6c4c90ee 100644 --- a/net/nimble/include/nimble/ble.h +++ b/net/nimble/include/nimble/ble.h @@ -34,10 +34,6 @@ struct ble_encryption_block uint8_t cipher_text[BLE_ENC_BLOCK_SIZE]; }; -/* Shared command pool for transort between host and controller */ -extern struct os_mempool g_hci_cmd_pool; -extern struct os_mempool g_hci_os_event_pool; - /* * BLE MBUF structure: * @@ -140,17 +136,17 @@ extern uint8_t g_random_addr[BLE_DEV_ADDR_LEN]; void htole16(void *buf, uint16_t x); void htole32(void *buf, uint32_t x); void htole64(void *buf, uint64_t x); -uint16_t le16toh(void *buf); -uint32_t le32toh(void *buf); -uint64_t le64toh(void *buf); +uint16_t le16toh(const void *buf); +uint32_t le32toh(const void *buf); +uint64_t le64toh(const void *buf); void htobe16(void *buf, uint16_t x); void htobe32(void *buf, uint32_t x); void htobe64(void *buf, uint64_t x); -uint16_t be16toh(void *buf); -uint32_t be32toh(void *buf); -uint64_t be64toh(void *buf); +uint16_t be16toh(const void *buf); +uint32_t be32toh(const void *buf); +uint64_t be64toh(const void *buf); void swap_in_place(void *buf, int len); -void swap_buf(uint8_t *dst, uint8_t *src, int len); +void swap_buf(uint8_t *dst, const uint8_t *src, int len); /* XXX */ /* BLE Error Codes (Core v4.2 Vol 2 part D) */ @@ -222,7 +218,6 @@ enum ble_error_codes BLE_ERR_CONN_ESTABLISHMENT = 62, BLE_ERR_MAC_CONN_FAIL = 63, BLE_ERR_COARSE_CLK_ADJ = 64, - BLE_ERR_ATTR_NOT_FOUND = 65, BLE_ERR_MAX = 255 }; @@ -232,4 +227,6 @@ enum ble_error_codes #define BLE_ADDR_TYPE_RPA_PUB_DEFAULT (2) #define BLE_ADDR_TYPE_RPA_RND_DEFAULT (3) +int ble_err_from_os(int os_err); + #endif /* H_BLE_ */ |