blob: 544cd347e70372428dc2ed86089f18537c879f7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#include "BlinkApp.h"
#include <FreeRTOS.h>
#include <task.h>
#include <libraries/log/nrf_log.h>
#include <boards.h>
using namespace Pinetime::Applications;
void BlinkApp::Start() {
if (pdPASS != xTaskCreate(BlinkApp::Process, "BlinkApp", 256, this, 0, &taskHandle))
APP_ERROR_HANDLER(NRF_ERROR_NO_MEM);
}
void BlinkApp::Process(void *instance) {
auto* app = static_cast<BlinkApp*>(instance);
NRF_LOG_INFO("BlinkApp task started!");
while (1) {
NRF_LOG_INFO("BlinkApp task running!");
bsp_board_led_invert(0);
vTaskDelay(1000);
}
}
|