wireless/bluetooth: move H4_* definition to external

Reference the define from board or arch driver

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an
2021-01-13 16:14:21 +08:00
committed by Brennan Ashton
parent f308ac1583
commit c8a6f31a33
2 changed files with 17 additions and 8 deletions
+5 -8
View File
@@ -40,6 +40,9 @@
* *
****************************************************************************/ ****************************************************************************/
#ifndef __DRIVER_WIRELESS_BLUETOOTH_BT_UART_H
#define __DRIVER_WIRELESS_BLUETOOTH_BT_UART_H
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
@@ -55,14 +58,6 @@
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
#define H4_HEADER_SIZE 1
#define H4_CMD 0x01
#define H4_ACL 0x02
#define H4_SCO 0x03
#define H4_EVT 0x04
#define H4_ISO 0x05
#ifdef CONFIG_BLUETOOTH_UART_DUMP #ifdef CONFIG_BLUETOOTH_UART_DUMP
# define BT_DUMP(m,b,l) lib_dumpbuffer(m,b,l) # define BT_DUMP(m,b,l) lib_dumpbuffer(m,b,l)
#else #else
@@ -101,3 +96,5 @@ struct btuart_upperhalf_s
int btuart_send(FAR const struct bt_driver_s *dev, FAR struct bt_buf_s *buf); int btuart_send(FAR const struct bt_driver_s *dev, FAR struct bt_buf_s *buf);
int btuart_open(FAR const struct bt_driver_s *dev); int btuart_open(FAR const struct bt_driver_s *dev);
#endif /* __DRIVER_WIRELESS_BLUETOOTH_BT_UART_H */
@@ -51,6 +51,18 @@
#include <stdbool.h> #include <stdbool.h>
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
#define H4_HEADER_SIZE 1
#define H4_CMD 0x01
#define H4_ACL 0x02
#define H4_SCO 0x03
#define H4_EVT 0x04
#define H4_ISO 0x05
/**************************************************************************** /****************************************************************************
* Public Types * Public Types
****************************************************************************/ ****************************************************************************/