examples: renamed le_counter to gatt_counter and le_streamer to le_streamer_server to indicate suppport for GATT over BR/EDR

This commit is contained in:
Matthias Ringwald 2019-06-21 10:45:17 +02:00
parent 59a1a47a1b
commit bdc352b16d
34 changed files with 182 additions and 137 deletions

View File

@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Changed
- FreeRTOS: use freertos/.. prefix to include FreeRTOS headers if HAVE_FREERTOS_INCLUDE_PREFIX is defined
- BNEP: add Connection Handle to BNEP_EVENT_CHANNEL_OPENED
- Examples: renamed le_counter to gatt_counter and le_streamer to le_streamer_server to indicate suppport for GATT over BR/EDR
### Fixed
- BNEP: Bluetooth address is stored in little-endian format for all BNEP_EVENT_*

View File

@ -118,86 +118,106 @@ CVSD_PLC = \
btstack_cvsd_plc.c \
AVDTP += \
avdtp_util.c \
avdtp.c \
avdtp_initiator.c \
avdtp_acceptor.c \
avdtp_source.c \
avdtp_sink.c \
a2dp_source.c \
a2dp_sink.c \
avdtp_util.c \
avdtp.c \
avdtp_initiator.c \
avdtp_acceptor.c \
avdtp_source.c \
avdtp_sink.c \
a2dp_source.c \
a2dp_sink.c \
btstack_ring_buffer.c \
HXCMOD_PLAYER = \
hxcmod.c \
hxcmod.c \
nao-deceased_by_disease.c \
EXAMPLES = \
audio_duplex \
a2dp_sink_demo \
# List of General Examples without Bluetooth
EXAMPLES_GENERAL = \
audio_duplex \
led_counter \
mod_player \
sine_player \
# List of Examples that only use Bluetooth BR/EDR = Classic
EXAMPLES_CLASSIC_ONLY = \
a2dp_sink_demo \
a2dp_source_demo \
ancs_client_demo \
att_delayed_response \
avrcp_browsing_client \
dut_mode_classic \
gap_dedicated_bonding \
gap_inquiry \
gap_le_advertisements \
gap_dedicated_bonding \
gap_inquiry \
gap_link_keys \
gatt_battery_query \
gatt_browser \
gatt_heart_rate_client \
hfp_ag_demo \
hfp_hf_demo \
hid_host_demo \
hid_keyboard_demo \
hid_keyboard_demo \
hid_mouse_demo \
hog_keyboard_demo \
hog_mouse_demo \
hsp_ag_demo \
hsp_hs_demo \
le_counter \
le_data_channel_client \
le_data_channel_server \
le_streamer \
le_streamer_client \
led_counter \
mod_player \
nordic_spp_le_counter \
nordic_spp_le_streamer \
pbap_client_demo \
sdp_bnep_query \
sdp_general_query \
sdp_rfcomm_query \
sine_player \
sm_pairing_central \
sm_pairing_peripheral \
spp_and_le_counter \
spp_and_le_streamer \
spp_counter \
spp_streamer \
pbap_client_demo \
sdp_bnep_query \
sdp_general_query \
sdp_rfcomm_query \
spp_counter \
spp_streamer \
spp_streamer_client \
ublox_spp_le_counter \
EXAMPLES_USING_LE = \
ancs_client_demo \
# List of Examples that only use Bluetooth LE
EXAMPLES_LE_ONLY= \
ancs_client_demo \
att_delayed_response \
gap_le_advertisements \
gatt_battery_query \
gatt_browser \
gatt_browser \
gatt_counter \
gatt_streamer_server \
hog_keyboard_demo \
hog_mouse_demo \
le_counter \
le_data_channel_client \
le_data_channel_server \
le_streamer \
le_streamer_client \
nordic_spp_le_counter \
nordic_spp_le_streamer \
sm_pairing_central \
sm_pairing_peripheral \
spp_and_le_counter \
spp_and_gatt_counter \
ublox_spp_le_counter \
# List of Examples that use Bluetooth BR/EDR/LE = Dual Mode
EXAMPLES_DUAL_MODE= \
gatt_counter \
gatt_streamer_server \
spp_and_gatt_counter \
spp_and_gatt_streamer \
# List of GATT files used by either LE_ONLY or DUAL_MODE examples
EXAMPLES_GATT_FILES = \
att_delayed_response.gatt \
ancs_client_demo.gatt \
gatt_battery_query.gatt \
gatt_browser.gatt \
gatt_counter.gatt \
gatt_streamer_server.gatt \
hog_keyboard_demo.gatt \
hog_mouse_demo.gatt \
le_data_channel_server.gatt \
nordic_spp_le_counter.gatt \
nordic_spp_le_streamer.gatt \
sm_pairing_central.gatt \
sm_pairing_peripheral.gatt \
spp_and_gatt_counter.gatt \
spp_and_gatt_streamer.gatt \
ublox_spp_le_counter.gatt \
# .h for .gatt
EXAMPLES_GATT_H_FILES = $(EXAMPLES_GATT_FILES:.gatt=.h)
# .o for .c
CORE_OBJ = $(CORE:.c=.o)
COMMON_OBJ = $(COMMON:.c=.o)
@ -253,11 +273,11 @@ sm_pairing_peripheral: sm_pairing_peripheral.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_O
sm_pairing_central: sm_pairing_central.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} sm_pairing_central.o
${CC} $(filter-out sm_pairing_central.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
le_counter: le_counter.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${CLASSIC_OBJ} battery_service_server.o le_counter.c
${CC} $(filter-out le_counter.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
gatt_counter: gatt_counter.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${CLASSIC_OBJ} battery_service_server.o gatt_counter.c
${CC} $(filter-out gatt_counter.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
le_streamer: le_streamer.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${CLASSIC_OBJ} le_streamer.c
${CC} $(filter-out le_streamer.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
gatt_streamer_server: gatt_streamer_server.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${CLASSIC_OBJ} gatt_streamer_server.c
${CC} $(filter-out gatt_streamer_server.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
le_streamer_client: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} le_streamer_client.c
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
@ -265,11 +285,11 @@ le_streamer_client: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} le_s
gatt_heart_rate_client: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} gatt_heart_rate_client.c
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
spp_and_le_counter: spp_and_le_counter.h ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} spp_and_le_counter.c
${CC} $(filter-out spp_and_le_counter.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
spp_and_gatt_counter: spp_and_gatt_counter.h ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} spp_and_gatt_counter.c
${CC} $(filter-out spp_and_gatt_counter.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
spp_and_le_streamer: spp_and_le_streamer.h ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} spp_and_le_streamer.c
${CC} $(filter-out spp_and_le_streamer.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
spp_and_gatt_streamer: spp_and_gatt_streamer.h ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} spp_and_gatt_streamer.c
${CC} $(filter-out spp_and_gatt_streamer.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
spp_streamer: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} spp_streamer.c
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
@ -368,22 +388,10 @@ ublox_spp_le_counter: ublox_spp_le_counter.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ
${CC} $(filter-out ublox_spp_le_counter.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
clean:
rm -f ${EXAMPLES} *_demo
rm -f *.o *.out *.hex *.exe *.wav *.sbc
rm -f ancs_client_demo.h profile.h spp_and_le_counter.h le_counter.h le_streamer.h hog_keyboard_demo.h hog_mouse_demo.h
rm -f gatt_battery_query.h gatt_browser.h sm_pairing_peripheral.h spp_and_le_streamer.h
rm -f le_data_channel_server.h sm_pairing_central.h
rm -f nordic_spp_le_counter.h nordic_spp_le_streamer.h nordic_spp_le_counter nordic_spp_le_streamer
rm -f ublox_spp_le_counter.h ublox_spp_le_counter
rm -f le_streamer_and_counter_client.h le_streamer_and_counter_client
rm -f sco_output.msbc sco_input.msbc
rm -rf *.dSYM
rm -f ${EXAMPLES} ${EXAMPLES_GATT_H_FILES}
rm -f *.o *.out *.hex *.exe *.wav *.sbc *.dSYM
rm -rf ${BTSTACK_ROOT}/src/*.o
rm -rf ${BTSTACK_ROOT}/src/ble/*.o
rm -rf ${BTSTACK_ROOT}/src/ble/gatt-service/*.o
rm -rf ${BTSTACK_ROOT}/src/classic/*.o
rm -rf ${BTSTACK_ROOT}/example/*.o
rm -rf ${BTSTACK_ROOT}/example/ancs_client_demo.h
rm -rf ${BTSTACK_ROOT}/example/profile.h
rm -rf ${BTSTACK_ROOT}/example/spp_and_le_counter.h
rm -rf ${BTSTACK_ROOT}/example/le_counter.h
rm -rf ${BTSTACK_ROOT}/example/le_streamer.h

View File

@ -70,7 +70,7 @@
*
* @text Listing MainConfiguration shows main application code.
* It initializes L2CAP, the Security Manager and configures the ATT Server with the pre-compiled
* ATT Database generated from $le_counter.gatt$.
* ATT Database generated from $att_delayed_response.gatt$.
* Additionally, it enables the Battery Service Server with the current battery level.
* Finally, it configures the advertisements and boots the Bluetooth stack.
* In this example, the Advertisement contains the Flags attribute and the device name.

View File

@ -35,7 +35,7 @@
*
*/
#define BTSTACK_FILE__ "le_counter.c"
#define BTSTACK_FILE__ "gatt_counter.c"
// *****************************************************************************
/* EXAMPLE_START(le_counter): LE Peripheral - Heartbeat Counter over GATT
@ -52,7 +52,7 @@
#include <stdlib.h>
#include <string.h>
#include "le_counter.h"
#include "gatt_counter.h"
#include "btstack.h"
#include "ble/gatt-service/battery_service_server.h"

View File

@ -35,7 +35,7 @@
*
*/
#define BTSTACK_FILE__ "le_streamer.c"
#define BTSTACK_FILE__ "gatt_streamer.c"
// *****************************************************************************
/* EXAMPLE_START(le_streamer): LE Streamer - Stream data over GATT.
@ -66,7 +66,7 @@
// le_streamer.h contains the binary representation of le_streamer.gatt
// it is generated by the build system by calling: $BTSTACK_ROOT/tool/compile_gatt.py le_streamer.gatt le_streamer.h
// it needs to be regenerated when the GATT Database declared in le_streamer.gatt file is modified
#include "le_streamer.h"
#include "gatt_streamer_server.h"
#define REPORT_INTERVAL_MS 3000
#define MAX_NR_CONNECTIONS 3

View File

@ -35,7 +35,7 @@
*
*/
#define BTSTACK_FILE__ "spp_and_le_counter.c"
#define BTSTACK_FILE__ "spp_and_gatt_counter.c"
// *****************************************************************************
/* EXAMPLE_START(spp_and_le_counter): Dual mode example
@ -59,7 +59,7 @@
#include <inttypes.h>
#include "btstack.h"
#include "spp_and_le_counter.h"
#include "spp_and_gatt_counter.h"
#define RFCOMM_SERVER_CHANNEL 1
#define HEARTBEAT_PERIOD_MS 1000

View File

@ -35,7 +35,7 @@
*
*/
#define BTSTACK_FILE__ "spp_and_le_streamer.c"
#define BTSTACK_FILE__ "spp_and_gatt_streamer.c"
// *****************************************************************************
/* EXAMPLE_START(spp_and_le_streamer): Dual mode example
@ -60,7 +60,7 @@
#include <inttypes.h>
#include "btstack.h"
#include "spp_and_le_streamer.h"
#include "spp_and_gatt_streamer.h"
int btstack_main(int argc, const char * argv[]);

View File

@ -12,16 +12,25 @@
SUBDIRS = \
arduino \
deamon \
daemon \
ez430-rf2560 \
libusb \
libusb-intel \
max32630-fthr \
msp-exp430f5438-cc2564b \
msp430f5229lp-cc2564b \
mtk \
posix-h4 \
posix-h4-atwilc3000 \
posix-h4-da14581 \
posix-h4-da14585 \
posix-h4-zephyr \
posix-h5 \
posix-h5-bcm \
samv71-xplained-atwilc3000 \
stm32-f103rb-nucleo \
max32630-fthr \
stm32-f4discovery-cc256x \
stm32-l073rz-nucleo-em9304 \
EXCLUDED = \
pic32-harmony/app.X \

View File

@ -43,7 +43,7 @@ apps_btstack = am_root + "/boards/apollo2_evb_am_ble/examples/"
print("Creating examples in /boards/apollo2_evb_am_ble/examples:")
LE_EXAMPLES = ["ancs_client_demo", "gap_le_advertisements", "gatt_battery_query", "gatt_browser", "le_counter", "le_streamer", "le_streamer_client", "sm_pairing_peripheral", "sm_pairing_central"]
LE_EXAMPLES = ["ancs_client_demo", "gap_le_advertisements", "gatt_battery_query", "gatt_browser", "gatt_counter", "gatt_streamer", "le_streamer_client", "sm_pairing_peripheral", "sm_pairing_central"]
# iterate over btstack examples
for example in LE_EXAMPLES:

View File

@ -102,7 +102,7 @@ all: led_counter.hex
include ${BTSTACK_ROOT}/chipset/cc256x/Makefile.inc
# compiling requires a 20-bit mspgcc version
# spp_and_le_counter.hex spp_accel.hex spp_flowcontrol.hex spp_counter.hex
# spp_and_gatt_counter.hex spp_accel.hex spp_flowcontrol.hex spp_counter.hex
# sdp_rfcomm_query.hex sdp_general_query.hex
# gap_inquiry.hex
@ -129,7 +129,7 @@ hid_demo.out: ${CORE_OBJ} ${COMMON_OBJ} ${LCD_OBJ} ${SPP_OBJ} ${CC2560B} hid_dem
spp_accel.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${CC2560B} spp_accel.o sdp_server.o hal_adc.o
${CC} $^ ${LDFLAGS} -o $@
spp_and_le_counter.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${BLE_OBJ} spp_and_le_counter.h spp_and_le_counter.o sdp_server.o
spp_and_gatt_counter.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${BLE_OBJ} spp_and_gatt_counter.h spp_and_gatt_counter.o sdp_server.o
${CC} $^ ${LDFLAGS} -o $@
spp_counter.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${CC2560B} spp_counter.o sdp_server.o
@ -148,7 +148,7 @@ sdp_general_query.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${SDP_CLIENT} ${CC25
${CC} $^ ${LDFLAGS} -o $@
clean:
rm -f $ *.o *.out *.hex profile.h spp_and_le_counter.h bluetooth*.c BLE*.c *.bts
rm -f $ *.o *.out *.hex profile.h spp_and_gatt_counter.h bluetooth*.c BLE*.c *.bts
size: all
msp430-size *.o

View File

@ -33,6 +33,7 @@ VPATH += ${BTSTACK_ROOT}/chipset/intel
CFLAGS += $(shell pkg-config libusb-1.0 --cflags)
LDFLAGS += $(shell pkg-config libusb-1.0 --libs)
EXAMPLES = ${EXAMPLES_GENERAL} ${EXAMPLES_CLASSIC_ONLY} ${EXAMPLES_LE_ONLY} ${EXAMPLES_DUAL_MODE}
EXAMPLES += pan_lwip_http_server
# use pkg-config for portaudio

View File

@ -32,8 +32,8 @@ VPATH += ${BTSTACK_ROOT}/chipset/zephyr
CFLAGS += $(shell pkg-config libusb-1.0 --cflags)
LDFLAGS += $(shell pkg-config libusb-1.0 --libs)
EXAMPLES = ${EXAMPLES_GENERAL} ${EXAMPLES_CLASSIC_ONLY} ${EXAMPLES_LE_ONLY} ${EXAMPLES_DUAL_MODE}
EXAMPLES += pan_lwip_http_server
EXAMPLES += csr_set_bd_addr
csr_set_bd_addr: ${CORE_OBJ} ${COMMON_OBJ} btstack_chipset_csr.o csr_set_bd_addr.o

View File

@ -103,7 +103,7 @@ include ${BTSTACK_ROOT}/chipset/cc256x/Makefile.inc
# compiling requires a 20-bit mspgcc version
# hid_demo.hex
# spp_and_le_counter.hex
# spp_and_gatt_counter.hex
# spp_accel.hex
# ble_server.hex
# spp_counter.hex
@ -135,7 +135,7 @@ hid_demo.out: ${CORE_OBJ} ${COMMON_OBJ} ${LCD_OBJ} ${SPP_OBJ} ${CC2560B} hid_dem
spp_accel.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${CC2560B} spp_accel.o sdp_server.o hal_adc.o
${CC} $^ ${LDFLAGS} -o $@
spp_and_le_counter.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${BLE_OBJ} spp_and_le_counter.h spp_and_le_counter.o sdp_server.o
spp_and_gatt_counter.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${BLE_OBJ} spp_and_gatt_counter.h spp_and_gatt_counter.o sdp_server.o
${CC} $^ ${LDFLAGS} -o $@
spp_counter.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${CC2560B} spp_counter.o sdp_server.o
@ -154,7 +154,7 @@ sdp_general_query.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${SDP_CLIENT} ${CC25
${CC} $^ ${LDFLAGS} -o $@
clean:
rm -f $ *.o *.out *.hex profile.h spp_and_le_counter.h
rm -f $ *.o *.out *.hex profile.h spp_and_gatt_counter.h
size: all
msp430-size *.o

View File

@ -106,7 +106,7 @@ all: led_counter.hex spp_counter.hex gap_inquiry.hex spp_flowcontrol.hex \
include ${BTSTACK_ROOT}/chipset/cc256x/Makefile.inc
# compiling requires a 20-bit mspgcc version
# spp_and_le_counter.hex
# spp_and_gatt_counter.hex
# compiling ant-test requires special ant init script
# ant-test.hex
@ -125,7 +125,7 @@ ant-test.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} profile.h ant_cmds.o ${CC2567
ble_server.out: ${CORE_OBJ} ${COMMON_OBJ} ${BLE_OBJ} profile.h ble_server.o
${CC} $^ ${LDFLAGS} -o $@
spp_and_le_counter.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${BLE_OBJ} spp_and_le_counter.h spp_and_le_counter.o sdp_server.o
spp_and_gatt_counter.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${BLE_OBJ} spp_and_gatt_counter.h spp_and_gatt_counter.o sdp_server.o
${CC} $^ ${LDFLAGS} -o $@
spp_counter.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${CC2560B} spp_counter.o sdp_server.o
@ -144,7 +144,7 @@ sdp_general_query.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${SDP_CLIENT} ${CC25
${CC} $^ ${LDFLAGS} -o $@
clean:
rm -f $ *.o *.out *.hex profile.h spp_and_le_counter.h ../driver/*.o ../../src/*.o ../src/*.o ../firmware/*.o ${BTSTACK_ROOT}/chipset/cc256x/*.o ${BTSTACK_ROOT}/src/*.o
rm -f $ *.o *.out *.hex profile.h spp_and_gatt_counter.h ../driver/*.o ../../src/*.o ../src/*.o ../firmware/*.o ${BTSTACK_ROOT}/chipset/cc256x/*.o ${BTSTACK_ROOT}/src/*.o
size: all
msp430-size *.o

View File

@ -62,9 +62,9 @@ for file in os.listdir(examples_embedded):
# filter LE-only applications
if not os.path.exists(gatt_path) and not example in [
"ancs_client_demo","gap_le_advertisements", "gatt_battery_query","gatt_browser","sm_pairing_central",'le_streamer_client']:
"ancs_client_demo","gap_le_advertisements", "gatt_battery_query", "gatt_browser", "sm_pairing_central", 'le_streamer_client']:
continue
if example == "spp_and_le_counter":
if example == "spp_and_gatt_counter":
continue
# create folder

View File

@ -30,14 +30,7 @@ CFLAGS += -g -Wall -Werror \
VPATH += ${BTSTACK_ROOT}/platform/posix
VPATH += ${BTSTACK_ROOT}/chipset/atwilc3000
ifeq ($(OS),Windows_NT)
LDFLAGS += -lws2_32
endif
# Command Line examples require porting to win32, so only build on other unix-ish hosts
ifneq ($(OS),Windows_NT)
EXAMPLES += ${EXAMPLES_CLI}
endif
EXAMPLES = ${EXAMPLES_GENERAL} ${EXAMPLES_LE_ONLY}
# use pkg-config for portaudio
# CFLAGS += $(shell pkg-config portaudio-2.0 --cflags) -DHAVE_PORTAUDIO

View File

@ -26,14 +26,7 @@ CFLAGS += -g -Wall -Werror \
VPATH += ${BTSTACK_ROOT}/platform/posix
VPATH += ${BTSTACK_ROOT}/chipset/da14581
ifeq ($(OS),Windows_NT)
LDFLAGS += -lws2_32
endif
# Command Line examples require porting to win32, so only build on other unix-ish hosts
ifneq ($(OS),Windows_NT)
EXAMPLES += ${EXAMPLES_CLI}
endif
EXAMPLES = ${EXAMPLES_GENERAL} ${EXAMPLES_LE_ONLY}
# use pkg-config for portaudio
# CFLAGS += $(shell pkg-config portaudio-2.0 --cflags) -DHAVE_PORTAUDIO

View File

@ -0,0 +1,36 @@
# Makefile for posix-h4 based examples
BTSTACK_ROOT ?= ../..
CORE += \
btstack_link_key_db_fs.c \
btstack_run_loop_posix.c \
btstack_tlv_posix.c \
btstack_uart_block_posix.c \
hci_transport_h4.c \
le_device_db_fs.c \
main.c \
btstack_stdin_posix.c \
btstack_chipset_zephyr.c \
# examples
include ${BTSTACK_ROOT}/example/Makefile.inc
CFLAGS += -g -Wall -Werror \
-I$(BTSTACK_ROOT)/platform/embedded \
-I$(BTSTACK_ROOT)/platform/posix \
-I$(BTSTACK_ROOT)/chipset/zephyr \
-I${BTSTACK_ROOT}/3rd-party/tinydir
VPATH += ${BTSTACK_ROOT}/platform/posix
VPATH += ${BTSTACK_ROOT}/platform/embedded
VPATH += ${BTSTACK_ROOT}/chipset/zephyr
# use pkg-config for portaudio
# CFLAGS += $(shell pkg-config portaudio-2.0 --cflags) -DHAVE_PORTAUDIO
# LDFLAGS += $(shell pkg-config portaudio-2.0 --libs)
# hard coded flags for portaudio in /usr/local/lib
# CFLAGS += -I/usr/local/include -DHAVE_PORTAUDIO
# LDFLAGS += -L/sw/lib -lportaudio -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,Carbon
all: ${EXAMPLES_LE_ONLY}

View File

@ -32,5 +32,5 @@ VPATH += ${BTSTACK_ROOT}/chipset/zephyr
# CFLAGS += -I/usr/local/include -DHAVE_PORTAUDIO
# LDFLAGS += -L/sw/lib -lportaudio -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,Carbon
all: ${EXAMPLES_USING_LE}
all: ${EXAMPLES_LE_ONLY}

View File

@ -54,6 +54,7 @@ VPATH += ${BTSTACK_ROOT}/chipset/em9301
VPATH += ${BTSTACK_ROOT}/chipset/stlc2500d
VPATH += ${BTSTACK_ROOT}/chipset/tc3566x
EXAMPLES = ${EXAMPLES_GENERAL} ${EXAMPLES_CLASSIC_ONLY} ${EXAMPLES_LE_ONLY} ${EXAMPLES_DUAL_MODE}
EXAMPLES += pan_lwip_http_server
# use pkg-config for portaudio

View File

@ -32,6 +32,7 @@ VPATH += ${BTSTACK_ROOT}/platform/embedded
VPATH += ${BTSTACK_ROOT}/chipset/bcm
EXAMPLES = ${EXAMPLES_GENERAL} ${EXAMPLES_CLASSIC_ONLY} ${EXAMPLES_LE_ONLY} ${EXAMPLES_DUAL_MODE}
EXAMPLES += pan_lwip_http_server
# use pkg-config for portaudio

View File

@ -46,6 +46,7 @@ VPATH += ${BTSTACK_ROOT}/chipset/em9301
VPATH += ${BTSTACK_ROOT}/chipset/stlc2500d
VPATH += ${BTSTACK_ROOT}/chipset/tc3566x
EXAMPLES = ${EXAMPLES_GENERAL} ${EXAMPLES_CLASSIC_ONLY} ${EXAMPLES_LE_ONLY} ${EXAMPLES_DUAL_MODE}
EXAMPLES += pan_lwip_http_server
# use pkg-config for portaudio

View File

@ -35,6 +35,7 @@ VPATH += ${BTSTACK_ROOT}/platform/embedded
VPATH += ${BTSTACK_ROOT}/chipset/bcm
EXAMPLES = ${EXAMPLES_GENERAL} ${EXAMPLES_CLASSIC_ONLY} ${EXAMPLES_LE_ONLY} ${EXAMPLES_DUAL_MODE}
EXAMPLES += pan_lwip_http_server
# use pkg-config for portaudio

View File

@ -34,8 +34,8 @@ le_examples = [
'gatt_browser.c',
'hog_keyboard_demo.c',
'hog_mouse_demo.c',
'le_counter.c',
'le_streamer.c',
'gatt_counter.c',
'gatt_streamer.c',
'le_streamer_client.c',
'led_counter.c',
'sm_pairing_central.c',

View File

@ -3,7 +3,7 @@
#
# BINARY=led_counter
BINARY=spp_and_le_counter
BINARY=spp_and_gatt_counter
OPENCM3_DIR = libopencm3
LDSCRIPT = stm32f1-nucleo.ld
@ -64,7 +64,7 @@ CFLAGS = -I. \
-I$(BTSTACK_ROOT)/src \
-I$(BTSTACK_ROOT)/chipset/cc256x
examples: libopencm3/lib/libopencm3_stm32f1.a spp_and_le_counter.h spp_and_le_counter.elf
examples: libopencm3/lib/libopencm3_stm32f1.a spp_and_gatt_counter.h spp_and_gatt_counter.elf
include libopencm3.stm32f1.mk
@ -84,6 +84,6 @@ libopencm3/lib/libopencm3_stm32f1.a:
make -C libopencm3
# compile GATT database
spp_and_le_counter.h: spp_and_le_counter.gatt
spp_and_gatt_counter.h: spp_and_gatt_counter.gatt
python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@

View File

@ -309,6 +309,8 @@ EXAMPLES = \
gap_le_advertisements \
gatt_battery_query \
gatt_browser \
gatt_counter \
gatt_streamer \
hfp_ag_demo \
hfp_hf_demo \
hid_host_demo \
@ -319,8 +321,6 @@ EXAMPLES = \
hsp_ag_demo \
hsp_hs_demo \
mod_player \
le_counter \
le_streamer \
le_streamer_client \
pan_lwip_http_server \
pbap_client_demo \
@ -330,7 +330,7 @@ EXAMPLES = \
sine_player \
sm_pairing_central \
sm_pairing_peripheral \
spp_and_le_counter \
spp_and_gatt_counter \
spp_and_le_streamer \
spp_counter \
spp_streamer \
@ -338,16 +338,16 @@ EXAMPLES = \
GATT_FILES = \
ancs_client_demo.gatt \
le_counter.gatt \
le_streamer.gatt \
gatt_counter.gatt \
gatt_streamer_server.gatt \
gatt_browser.gatt \
gatt_battery_query.gatt \
hog_keyboard_demo.gatt \
hog_mouse_demo.gatt \
sm_pairing_peripheral.gatt \
sm_pairing_central.gatt \
spp_and_le_counter.gatt \
spp_and_le_streamer.gatt \
spp_and_gatt_counter.gatt \
spp_and_gatt_streamer_server.gatt \
# SBC codec
include ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/Makefile.inc

View File

@ -209,24 +209,22 @@ EXAMPLES = \
gatt_browser \
hog_keyboard_demo \
hog_mouse_demo \
le_counter \
le_streamer \
gatt_counter \
gatt_streamer_server \
le_streamer_client \
sm_pairing_central \
sm_pairing_peripheral \
GATT_FILES = \
ancs_client_demo.gatt \
le_counter.gatt \
le_streamer.gatt \
gatt_browser.gatt \
gatt_battery_query.gatt \
gatt_browser.gatt \
gatt_counter.gatt \
gatt_streamer_server.gatt \
hog_keyboard_demo.gatt \
hog_mouse_demo.gatt \
sm_pairing_peripheral.gatt \
sm_pairing_central.gatt \
spp_and_le_counter.gatt \
spp_and_le_streamer.gatt \
sm_pairing_peripheral.gatt \
#######################################
# build the application

View File

@ -28,4 +28,6 @@ VPATH += ${BTSTACK_ROOT}/platform/windows
VPATH += ${BTSTACK_ROOT}/platform/posix
VPATH += ${BTSTACK_ROOT}/chipset/zephyr
all: ${EXAMPLES_USING_LE}
EXAMPLES = ${EXAMPLES_GENERAL} ${EXAMPLES_LE_ONLY}
all: ${EXAMPLES}

View File

@ -52,6 +52,7 @@ VPATH += ${BTSTACK_ROOT}/chipset/em9301
VPATH += ${BTSTACK_ROOT}/chipset/stlc2500d
VPATH += ${BTSTACK_ROOT}/chipset/tc3566x
EXAMPLES = ${EXAMPLES_GENERAL} ${EXAMPLES_CLASSIC_ONLY} ${EXAMPLES_LE_ONLY} ${EXAMPLES_DUAL_MODE}
EXAMPLES += pan_lwip_http_server
# assume portaudio is installed in /usr/local

View File

@ -33,9 +33,8 @@ VPATH += ${BTSTACK_ROOT}/chipset/intel
LDFLAGS += -lsetupapi -lwinusb
# csr_set_bd_addr
EXAMPLES = ${EXAMPLES_GENERAL} ${EXAMPLES_CLASSIC_ONLY} ${EXAMPLES_LE_ONLY} ${EXAMPLES_DUAL_MODE}
EXAMPLES += csr_set_bd_addr
EXAMPLES += pan_lwip_http_server
csr_set_bd_addr: ${CORE_OBJ} ${COMMON_OBJ} btstack_chipset_csr.o csr_set_bd_addr.o