Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions BLE_GattServer_AddService/mbed_app.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"target_overrides": {
"*": {
"mbed-trace.enable": "0",
"platform.stdio-baud-rate": 115200
},
"K64F": {
Expand Down
10 changes: 10 additions & 0 deletions BLE_GattServer_AddService/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
#include "ble/services/HeartRateService.h"
#include "pretty_printer.h"

#if MBED_CONF_MBED_TRACE_ENABLE
#include "mbed-trace/mbed_trace.h"
#endif

using namespace std::literals::chrono_literals;

const static char DEVICE_NAME[] = "Heartrate";
Expand Down Expand Up @@ -174,6 +178,12 @@ void schedule_ble_events(BLE::OnEventsToProcessCallbackContext *context)

int main()
{
printf("\nSTART BLE_GattServer_AddService mbed-os example\n");

#if MBED_CONF_MBED_TRACE_ENABLE
mbed_trace_init()
#endif

BLE &ble = BLE::Instance();
ble.onEventsToProcess(schedule_ble_events);

Expand Down