123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- extern "C" {
- typedef enum
- {
- HCI_SLIP_RX_RDY,
- HCI_SLIP_TX_DONE,
- HCI_SLIP_RX_OVERFLOW,
- HCI_SLIP_ERROR,
- HCI_SLIP_EVT_TYPE_MAX
- } hci_slip_evt_type_t;
- typedef struct
- {
- hci_slip_evt_type_t evt_type;
- const uint8_t * packet;
- uint32_t packet_length;
- } hci_slip_evt_t;
- typedef void (*hci_slip_event_handler_t)(hci_slip_evt_t event);
- uint32_t hci_slip_evt_handler_register(hci_slip_event_handler_t event_handler);
- uint32_t hci_slip_open(void);
- uint32_t hci_slip_close(void);
- uint32_t hci_slip_write(const uint8_t * p_buffer, uint32_t length);
- uint32_t hci_slip_rx_buffer_register(uint8_t * p_buffer, uint32_t length);
- }
|