-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
53d1a4f
commit 6e03668
Showing
3 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Leka - LekaOS | ||
# Copyright 2024 APF France handicap | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
add_mbed_executable(spike_lk_dac) | ||
|
||
target_include_directories(spike_lk_dac | ||
PRIVATE | ||
. | ||
) | ||
|
||
target_sources(spike_lk_dac | ||
PRIVATE | ||
main.cpp | ||
) | ||
|
||
target_link_custom_leka_targets(spike_lk_dac) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Leka - LekaOS | ||
// Copyright 2024 APF France handicap | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#include "drivers/AnalogOut.h" | ||
#include "drivers/DigitalOut.h" | ||
#include "rtos/ThisThread.h" | ||
|
||
#include "HelloWorld.h" | ||
#include "LogKit.h" | ||
|
||
using namespace leka; | ||
using namespace std::chrono_literals; | ||
|
||
auto dac_enable = mbed::DigitalOut {SOUND_ENABLE, 1}; | ||
auto dac_output = mbed::AnalogOut {MCU_SOUND_OUT}; | ||
|
||
auto main() -> int | ||
{ | ||
logger::init(); | ||
|
||
HelloWorld hello; | ||
hello.start(); | ||
|
||
log_info("Hello, World!\n\n"); | ||
|
||
while (true) { | ||
log_info("Still alive"); | ||
rtos::ThisThread::sleep_for(10s); | ||
} | ||
} |