Skip to content

Commit

Permalink
sal: update zephyr 4.0 SAL
Browse files Browse the repository at this point in the history
bug: v/49964

Signed-off-by: fangzhenwei <[email protected]>
  • Loading branch information
Frozen935 committed Jan 16, 2025
1 parent 5f83e8d commit 8321d13
Show file tree
Hide file tree
Showing 12 changed files with 155 additions and 202 deletions.
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,11 @@ if(CONFIG_BLUETOOTH)
endif()

if(CONFIG_BLUETOOTH_STACK_BREDR_ZBLUE OR CONFIG_BLUETOOTH_STACK_LE_ZBLUE)
file(GLOB APPEND_FILES ${BLUETOOTH_DIR}/service/stacks/zephyr/*.c)
list(APPEND CSRCS ${APPEND_FILES})
list(APPEND CSRCS ${BLUETOOTH_DIR}/service/stacks/zephyr/sal_debug_interface.c)
list(APPEND CSRCS ${BLUETOOTH_DIR}/service/stacks/zephyr/sal_zblue.c)
if(CONFIG_BLUETOOTH_STACK_BREDR_ZBLUE)
list(APPEND CSRCS ${BLUETOOTH_DIR}/service/stacks/zephyr/sal_adapter_classic_interface.c)
endif()
endif()

if(NOT CONFIG_BLUETOOTH_BLE_AUDIO)
Expand Down Expand Up @@ -415,8 +418,6 @@ if(CONFIG_BLUETOOTH)
endif()

if(CONFIG_BLUETOOTH_STACK_BREDR_ZBLUE OR CONFIG_BLUETOOTH_STACK_LE_ZBLUE)
list(APPEND INCDIR ${BLUETOOTH_DIR}/service/stacks/zephyr/include)
list(APPEND INCDIR ${NUTTX_APPS_DIR}/external/zblue/zblue/include/zephyr)
list(APPEND INCDIR ${NUTTX_APPS_DIR}/external/zblue/zblue/port/include/)
list(APPEND INCDIR
${NUTTX_APPS_DIR}/external/zblue/zblue/port/include/kernel/include)
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ ifneq ($(CONFIG_BLUETOOTH_STACK_BREDR_BLUELET)$(CONFIG_BLUETOOTH_STACK_LE_BLUELE
CSRCS += service/stacks/bluelet/*.c
endif
ifneq ($(CONFIG_BLUETOOTH_STACK_BREDR_ZBLUE)$(CONFIG_BLUETOOTH_STACK_LE_ZBLUE),)
CSRCS += service/stacks/zephyr/*.c
CSRCS += service/stacks/zephyr/sal_debug_interface.c
CSRCS += service/stacks/zephyr/sal_zblue.c
ifeq ($(CONFIG_BLUETOOTH_BREDR_SUPPORT), y)
CSRCS += service/stacks/zephyr/sal_adapter_classic_interface.c
endif #CONFIG_BLUETOOTH_BREDR_SUPPORT
endif
ifeq ($(CONFIG_BLUETOOTH_BLE_AUDIO),)
CSRCS := $(filter-out $(wildcard service/stacks/bluelet/sal_lea_*),$(wildcard $(CSRCS)))
Expand Down Expand Up @@ -290,7 +294,6 @@ ifneq ($(CONFIG_BLUETOOTH_STACK_BREDR_BLUELET)$(CONFIG_BLUETOOTH_STACK_LE_BLUELE
endif
ifneq ($(CONFIG_BLUETOOTH_STACK_BREDR_ZBLUE)$(CONFIG_BLUETOOTH_STACK_LE_ZBLUE),)
CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/frameworks/connectivity/bluetooth/service/stacks/zephyr/include
CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/external/zblue/zblue/include/zephyr
CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/external/zblue/zblue/port/include/
CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/external/zblue/zblue/port/include/kernel/include
endif
Expand Down
4 changes: 0 additions & 4 deletions service/stacks/include/sal_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@

#if defined(CONFIG_BLUETOOTH_STACK_BREDR_BLUELET) || defined(CONFIG_BLUETOOTH_STACK_LE_BLUELET)
#include "sal_adapter_interface.h"
#include "sal_bluelet.h"
#endif
#if defined(CONFIG_BLUETOOTH_STACK_BREDR_ZBLUE) || defined(CONFIG_BLUETOOTH_STACK_LE_ZBLUE)
#include "sal_zblue.h"
#endif

typedef struct bt_stack_info {
Expand Down
2 changes: 1 addition & 1 deletion service/stacks/zephyr/include/sal_zblue.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "bt_addr.h"
#include "bt_status.h"

#include <bluetooth/conn.h>
#include <zephyr/bluetooth/conn.h>

#define AVDTP_RTP_HEADER_LEN 12
#define STREAM_DATA_RESERVED AVDTP_RTP_HEADER_LEN
Expand Down
4 changes: 2 additions & 2 deletions service/stacks/zephyr/sal_a2dp_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
#include "sal_interface.h"
#include "sal_zblue.h"

#include <bluetooth/a2dp.h>
#include <bluetooth/conn.h>
#include <zephyr/bluetooth/classic/a2dp.h>
#include <zephyr/bluetooth/conn.h>

#include "bt_utils.h"
#include "utils/log.h"
Expand Down
Loading

0 comments on commit 8321d13

Please sign in to comment.