123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- #ifndef ZEPHYR_INCLUDE_BLUETOOTH_HCI_RAW_H_
- #define ZEPHYR_INCLUDE_BLUETOOTH_HCI_RAW_H_
- #ifdef __cplusplus
- extern "C" {
- #endif
- int bt_send(struct net_buf *buf);
- enum {
-
- BT_HCI_RAW_MODE_PASSTHROUGH = 0x00,
-
- BT_HCI_RAW_MODE_H4 = 0x01,
- };
- int bt_hci_raw_set_mode(uint8_t mode);
- uint8_t bt_hci_raw_get_mode(void);
- #define BT_HCI_ERR_EXT_HANDLED 0xff
- #define BT_HCI_RAW_CMD_EXT(_op, _min_len, _func) \
- { \
- .op = _op, \
- .min_len = _min_len, \
- .func = _func, \
- }
- struct bt_hci_raw_cmd_ext {
-
- uint16_t op;
-
- size_t min_len;
-
- uint8_t (*func)(struct net_buf *buf);
- };
- void bt_hci_raw_cmd_ext_register(struct bt_hci_raw_cmd_ext *cmds, size_t size);
- int bt_enable_raw(struct k_fifo *rx_queue);
- #ifdef __cplusplus
- }
- #endif
- #endif
|