Skip to content

Commit

Permalink
add a license
Browse files Browse the repository at this point in the history
format
  • Loading branch information
m-m-adams committed Jan 18, 2025
1 parent 893b6ca commit 87cb47e
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 9 deletions.
20 changes: 16 additions & 4 deletions src/OSLikeStuff/task_scheduler/resource_checker.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
//
// Created by mark on 18/01/25.
//

/*
* Copyright © 2025 Mark Adams
*
* This file is part of The Synthstrom Audible Deluge Firmware.
*
* The Synthstrom Audible Deluge Firmware is free software: you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program.
* If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef RESOURCE_CHECKER_H
#define RESOURCE_CHECKER_H
#include <OSLikeStuff/scheduler_api.h>
Expand Down
20 changes: 17 additions & 3 deletions src/OSLikeStuff/task_scheduler/task_scheduler_c_api.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
//
// Created by Mark Adams on 2024-12-05.
//
/*
* Copyright © 2025 Mark Adams
*
* This file is part of The Synthstrom Audible Deluge Firmware.
*
* The Synthstrom Audible Deluge Firmware is free software: you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program.
* If not, see <https://www.gnu.org/licenses/>.
*/

#include "OSLikeStuff/scheduler_api.h"
#include "OSLikeStuff/task_scheduler/task_scheduler.h"
#include "resource_checker.h"
Expand Down
5 changes: 3 additions & 2 deletions tests/unit/scheduler_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#endif

uint8_t currentlyAccessingCard = false;
uint32_t usbLock = false;
uint32_t usbLock = false;
bool sdRoutineLock = false;
namespace {

Expand Down Expand Up @@ -83,7 +83,8 @@ TEST(Scheduler, schedule) {
TEST(Scheduler, remove) {
static SelfRemoving selfRemoving;

TaskID id = addRepeatingTask([]() { selfRemoving.runFiveTimes(); }, 0, 0.001, 0.001, 0.001, "run five times", NO_RESOURCE);
TaskID id =
addRepeatingTask([]() { selfRemoving.runFiveTimes(); }, 0, 0.001, 0.001, 0.001, "run five times", NO_RESOURCE);
selfRemoving.id = id;
mock().clear();
// will be called one less time due to the time the sleep takes not being zero
Expand Down

0 comments on commit 87cb47e

Please sign in to comment.