Skip to content

Commit

Permalink
Improved ending task
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenewald committed Dec 10, 2024
1 parent 9e8758c commit 6fe0c8a
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/user_programs/user_program_ending.cpp
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
#include "userlib/syscalls.hpp"

#include <cstdio>
#include "nrf_delay.h"

void ending_task(void)
{
using namespace edge::userlib;
volatile int i = 0;
bool enabled = true;
while (i < 5'000'000) {
if (i % 1'000'000 == 0) {
edge::userlib::set_led(0, 0, enabled);
enabled = !enabled;
}
i = i + 1;
}
debug_print("Ending Task: Done Running. 0,0 should stop changing.\n");
nrf_delay_ms(1000);
edge::userlib::debug_print("Ending Task: Done Running\n");
}

0 comments on commit 6fe0c8a

Please sign in to comment.