libusb: add btstack_audio

This commit is contained in:
Matthias Ringwald 2018-07-20 16:29:16 +02:00
parent f89030054a
commit e739af9896
2 changed files with 6 additions and 1 deletions

View File

@ -4,6 +4,7 @@ BTSTACK_ROOT = ../..
CORE += main.c btstack_stdin_posix.c btstack_tlv_posix.c
COMMON += hci_transport_h2_libusb.c btstack_run_loop_posix.c le_device_db_fs.c btstack_link_key_db_fs.c wav_util.c btstack_network_posix.c
COMMON += btstack_audio_portaudio.c btstack_audio.c
include ${BTSTACK_ROOT}/example/Makefile.inc

View File

@ -61,6 +61,7 @@
#include "hci.h"
#include "hci_dump.h"
#include "btstack_stdin.h"
#include "btstack_audio.h"
#include "btstack_tlv_posix.h"
#define TLV_DB_PATH_PREFIX "/tmp/btstack_"
@ -116,7 +117,6 @@ void hal_led_toggle(void){
printf("LED State %u\n", led_state);
}
#define USB_MAX_PATH_LEN 7
int main(int argc, const char * argv[]){
@ -169,6 +169,10 @@ int main(int argc, const char * argv[]){
hci_set_link_key_db(btstack_link_key_db_fs_instance());
#endif
#ifdef HAVE_PORTAUDIO
btstack_audio_set_instance(btstack_audio_portaudio_get_instance());
#endif
// inform about BTstack state
hci_event_callback_registration.callback = &packet_handler;
hci_add_event_handler(&hci_event_callback_registration);