1 /** 2 * Copyright (c) 2017, Realsil Semiconductor Corporation. All rights reserved. 3 * 4 */ 5 #ifndef _HCI_UART_H_ 6 #define _HCI_UART_H_ 7 8 #ifdef __cplusplus 9 extern "C" { 10 #endif 11 #include <stdio.h> 12 #include <string.h> 13 #include <stdbool.h> 14 #include <stdint.h> 15 16 17 typedef bool (*P_UART_TX_CB)(void); 18 typedef bool (*P_UART_RX_CB)(void); 19 20 21 bool hci_uart_init(P_UART_RX_CB rx_ind); 22 bool hci_uart_deinit(void); 23 24 uint16_t hci_uart_recv(uint8_t *p_buf, uint16_t size); 25 26 bool hci_uart_tx(uint8_t *p_buf, uint16_t len, P_UART_TX_CB tx_cb); 27 28 void hci_uart_set_baudrate(uint32_t baudrate); 29 30 void hci_uart_set_rx_ind(P_UART_RX_CB rx_ind); 31 32 void set_hci_uart_out(bool flag); 33 34 bool hci_uart_tx_bridge(uint8_t rc); 35 36 bool hci_uart_rx_bridge(uint8_t rc); 37 38 39 #ifdef __cplusplus 40 } 41 #endif 42 43 #endif /* _HCI_UART_H_ */ 44