2022-07-20 10:56:33 +00:00
|
|
|
#include "furi.h"
|
|
|
|
#include <string.h>
|
2023-11-01 07:24:11 +00:00
|
|
|
|
|
|
|
#include <FreeRTOS.h>
|
|
|
|
#include <queue.h>
|
2022-07-20 10:56:33 +00:00
|
|
|
|
2024-03-19 14:43:52 +00:00
|
|
|
void furi_init(void) {
|
|
|
|
furi_check(!furi_kernel_is_irq_or_masked());
|
|
|
|
furi_check(xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED);
|
2022-07-20 10:56:33 +00:00
|
|
|
|
|
|
|
furi_log_init();
|
|
|
|
furi_record_init();
|
|
|
|
}
|
|
|
|
|
2024-03-19 14:43:52 +00:00
|
|
|
void furi_run(void) {
|
|
|
|
furi_check(!furi_kernel_is_irq_or_masked());
|
|
|
|
furi_check(xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED);
|
2022-07-20 10:56:33 +00:00
|
|
|
|
|
|
|
#if(__ARM_ARCH_7A__ == 0U)
|
2022-11-28 16:51:51 +00: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 10:56:33 +00:00
|
|
|
NVIC_SetPriority(SVCall_IRQn, 0U);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Start the kernel scheduler */
|
|
|
|
vTaskStartScheduler();
|
|
|
|
}
|