summaryrefslogtreecommitdiff
path: root/include/bluetooth_le_ll.h
diff options
context:
space:
mode:
authorLevi Oliver <levio@google.com>2016-08-09 15:22:36 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-08-11 14:46:33 -0700
commit25c7cc0e4f62633660c8204f527fe19933c6b1ea (patch)
tree8698c45d0b52323f06bea4c46c5d52a54c538e30 /include/bluetooth_le_ll.h
parentbf302b55e9973a5c6e3e59722a9d3062e7936832 (diff)
downloadchrome-ec-25c7cc0e4f62633660c8204f527fe19933c6b1ea.tar.gz
btle: Cleanup: Moved constants, renamed functions
Moved link layer-specific constants into link layer .h file. Renamed data channel function to better represent its function. TEST=make BOARD=hadoken BUG=None BRANCH=None Change-Id: I239d535cf3725bf003443fc211fc802bc8aee13f Signed-off-by: Levi Oliver <levio@google.com> Reviewed-on: https://chromium-review.googlesource.com/367805 Commit-Ready: Myles Watson <mylesgw@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'include/bluetooth_le_ll.h')
-rw-r--r--include/bluetooth_le_ll.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/bluetooth_le_ll.h b/include/bluetooth_le_ll.h
index 14520f1139..e6a94a6cfc 100644
--- a/include/bluetooth_le_ll.h
+++ b/include/bluetooth_le_ll.h
@@ -78,6 +78,38 @@ enum ll_state_t {
#define LL_PING_REQ 0x12
#define LL_PING_RSP 0x13
+/* BLE 4.1 Vol 6 2.3.3.1 Connection information */
+#define CONNECT_REQ_INITA_LEN 6
+#define CONNECT_REQ_ADVA_LEN 6
+#define CONNECT_REQ_ACCESS_ADDR_LEN 4
+#define CONNECT_REQ_CRC_INIT_VAL_LEN 3
+#define CONNECT_REQ_WIN_SIZE_LEN 1
+#define CONNECT_REQ_WIN_OFFSET_LEN 2
+#define CONNECT_REQ_INTERVAL_LEN 2
+#define CONNECT_REQ_LATENCY_LEN 2
+#define CONNECT_REQ_TIMEOUT_LEN 2
+#define CONNECT_REQ_CHANNEL_MAP_LEN 5
+#define CONNECT_REQ_HOP_INCREMENT_AND_SCA_LEN 1
+struct ble_connection_params {
+ uint8_t init_a[CONNECT_REQ_INITA_LEN];
+ uint8_t adv_a[CONNECT_REQ_ADVA_LEN];
+ uint32_t access_addr;
+ uint32_t crc_init_val;
+ uint8_t win_size;
+ uint16_t win_offset;
+ uint16_t interval;
+ uint16_t latency;
+ uint16_t timeout;
+ uint64_t channel_map;
+ uint8_t hop_increment;
+ uint8_t sleep_clock_accuracy;
+ uint32_t transmitWindowOffset;
+ uint32_t transmitWindowSize;
+ uint32_t connInterval;
+ uint16_t connSlaveLatency;
+ uint32_t connSupervisionTimeout;
+};
+
uint8_t ll_reset(void);
uint8_t ll_set_tx_power(uint8_t *params);