Skip to content

Commit

Permalink
🔧 (DeepSleep): Set macro MBED_SLEEP_TRACING_ENABLED + retarget mbed_o…
Browse files Browse the repository at this point in the history
…verride_console
  • Loading branch information
YannLocatelli committed Jan 29, 2024
1 parent fef24f7 commit 45fa18d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
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\""
}
}
}
}

0 comments on commit 45fa18d

Please sign in to comment.