stm32-f4discovery-cc256x: use new hal_audio implementation

This commit is contained in:
Matthias Ringwald 2018-07-20 16:31:14 +02:00
parent 730bc5a03e
commit c4b3e553ae
3 changed files with 12 additions and 2 deletions

View File

@ -90,7 +90,10 @@ att_db.c \
att_dispatch.c \
att_server.c \
battery_service_server.c \
btstack_audio.c \
btstack_audio_embedded.c \
btstack_crypto.c \
btstack_cvsd_plc.c \
btstack_linked_list.c \
btstack_memory.c \
btstack_memory_pool.c \
@ -115,7 +118,6 @@ sm.c \
uECC.c \
btstack_chipset_cc256x.c \
bluetooth_init_cc2564B_1.6_BT_Spec_4.1.c \
hal_audio_dma.c \
hal_flash_bank_stm32.c \
btstack_tlv_flash_bank.c \
le_device_db_tlv.c \
@ -124,6 +126,7 @@ audio.c \
cs43l22.c \
stm32f4_discovery.c \
stm32f4_discovery_audio.c \
hal_audio_f4discovery.c \
a2dp_sink.c \
a2dp_source.c \
avdtp.c \
@ -302,6 +305,7 @@ EXAMPLES = \
hog_mouse_demo \
hsp_ag_demo \
hsp_hs_demo \
mod_player \
le_counter \
le_streamer \
le_streamer_client \

View File

@ -7,7 +7,7 @@
// Port related features
#define HAVE_EMBEDDED_TIME_MS
#define HAVE_AUDIO_DMA
#define HAVE_HAL_AUDIO
#define HAVE_BTSTACK_STDIN
// BTstack features that can be enabled

View File

@ -6,6 +6,7 @@
#include "port.h"
#include "btstack.h"
#include "btstack_debug.h"
#include "btstack_audio.h"
#include "btstack_chipset_cc256x.h"
#include "btstack_run_loop_embedded.h"
#include "btstack_tlv.h"
@ -341,6 +342,11 @@ void port_main(void){
// setup LE Device DB using TLV
le_device_db_tlv_configure(btstack_tlv_impl, &btstack_tlv_flash_bank_context);
#ifdef HAVE_HAL_AUDIO
// setup audio
btstack_audio_set_instance(btstack_audio_embedded_get_instance());
#endif
// inform about BTstack state
hci_event_callback_registration.callback = &packet_handler;
hci_add_event_handler(&hci_event_callback_registration);