47 lines
823 B
C
47 lines
823 B
C
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
#include <stdio.h>
|
|
|
|
#include "nrf_drv_clock.h"
|
|
|
|
#include "bsp.h"
|
|
|
|
#define NRF_LOG_MODULE_NAME "MAIN"
|
|
|
|
#include "nrf_log.h"
|
|
#include "nrf_log_ctrl.h"
|
|
|
|
#include "FreeRTOS.h"
|
|
#include "task.h"
|
|
#include "timers.h"
|
|
#include "semphr.h"
|
|
|
|
#include "user_functions.h"
|
|
|
|
#include "user_tasks.h"
|
|
|
|
int main(void) {
|
|
ret_code_t err_code;
|
|
|
|
err_code = nrf_drv_clock_init();
|
|
APP_ERROR_CHECK(err_code);
|
|
|
|
bsp_board_leds_init();
|
|
bsp_board_leds_off();
|
|
|
|
err_code = NRF_LOG_INIT(xTaskGetTickCount);
|
|
APP_ERROR_CHECK(err_code);
|
|
|
|
NRF_LOG_INFO("Initializing platform\r\n");
|
|
|
|
SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
|
|
|
|
init_tasks();
|
|
|
|
vTaskStartScheduler();
|
|
|
|
for(;;) {
|
|
APP_ERROR_HANDLER(NRF_ERROR_FORBIDDEN);
|
|
}
|
|
}
|