pts/l2cap_test: fix compile

This commit is contained in:
Matthias Ringwald 2017-07-10 22:12:01 +02:00
parent 5c8068685c
commit 2814436fcf
2 changed files with 11 additions and 1 deletions

View File

@ -24,6 +24,9 @@ COMMON += \
wav_util.c \
sdp_util.c \
sdp_server.c \
sm.c \
uECC.c \
SBC_DECODER += \
${BTSTACK_ROOT}/src/classic/btstack_sbc_plc.c \

View File

@ -58,6 +58,7 @@
#include "hci_dump.h"
#include "l2cap.h"
#include "btstack_stdin.h"
#include "bluetooth_sdp.h"
static void show_usage(void);
@ -71,6 +72,9 @@ static btstack_packet_callback_registration_t hci_event_callback_registration;
static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size){
UNUSED(channel);
UNUSED(size);
bd_addr_t event_addr;
uint16_t psm;
@ -124,7 +128,7 @@ static void stdin_process(char buffer){
switch (buffer){
case 'c':
printf("Creating L2CAP Connection to %s, PSM SDP\n", bd_addr_to_str(remote));
l2cap_create_channel(packet_handler, remote, PSM_SDP, 100, NULL);
l2cap_create_channel(packet_handler, remote, BLUETOOTH_PROTOCOL_SDP, 100, NULL);
break;
case 's':
printf("Send L2CAP Data\n");
@ -152,6 +156,9 @@ static void stdin_process(char buffer){
int btstack_main(int argc, const char * argv[]);
int btstack_main(int argc, const char * argv[]){
UNUSED(argc);
(void) argv;
gap_set_class_of_device(0x220404);
gap_discoverable_control(1);