Skip to content
Draft
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
10 changes: 10 additions & 0 deletions app/os/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Copyright 2020-2022 APF France handicap
// SPDX-License-Identifier: Apache-2.0

#include "mbed_retarget.h"
#include "mbed_stats.h"

#include "drivers/Watchdog.h"
Expand Down Expand Up @@ -75,6 +76,15 @@
using namespace leka;
using namespace std::chrono;

//
// MARK: - Mbed retarget
//

auto mbed::mbed_override_console([[maybe_unused]] int fd) -> mbed::FileHandle *
{
return leka::logger::internal::filehandle;
}

//
// MARK: - Global definitions
//
Expand Down
5 changes: 3 additions & 2 deletions config/mbed_app.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"target.features_add": [
"EXPERIMENTAL_API"
],
"platform.stdio-baud-rate": 115200
"platform.stdio-baud-rate": 115200,
"platform.deepsleep-stats-enabled": true
},
"LEKA_DISCO": {
"target_name": "\"LEKA_DISCO\""
Expand All @@ -39,4 +40,4 @@
"target_name": "\"LEKA_V1_2_DEV\""
}
}
}
}