2022-07-20 13:56:33 +03:00
|
|
|
#include "furi.h"
|
|
|
|
#include <string.h>
|
2023-11-01 10:24:11 +03:00
|
|
|
|
|
|
|
#include <FreeRTOS.h>
|
|
|
|
#include <queue.h>
|
2022-07-20 13:56:33 +03:00
|
|
|
|
2024-03-25 13:53:32 +03:00
|
|
|
void furi_init(void) {
|
|
|
|
furi_check(!furi_kernel_is_irq_or_masked());
|
|
|
|
furi_check(xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED);
|
2022-07-20 13:56:33 +03:00
|
|
|
|
|
|
|
furi_log_init();
|
|
|
|
furi_record_init();
|
|
|
|
}
|
|
|
|
|
2024-03-25 13:53:32 +03:00
|
|
|
void furi_run(void) {
|
|
|
|
furi_check(!furi_kernel_is_irq_or_masked());
|
|
|
|
furi_check(xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED);
|
2022-07-20 13:56:33 +03:00
|
|
|
|
|
|
|
#if(__ARM_ARCH_7A__ == 0U)
|
2022-11-28 19:51:51 +03:00
|
|
|
/* Service Call interrupt might be configured before kernel start */
|
|
|
|
/* and when its priority is lower or equal to BASEPRI, svc instruction */
|
|
|
|
/* causes a Hard Fault. */
|
2022-07-20 13:56:33 +03:00
|
|
|
NVIC_SetPriority(SVCall_IRQn, 0U);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Start the kernel scheduler */
|
|
|
|
vTaskStartScheduler();
|
|
|
|
}
|