mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-23 05:14:16 +03:00
5190aace88
- BT Service: cleanup code - Dialog: correct release order in file browser - Rpc: rollback to pre #3881 state - Kernel: fix inverted behavior in furi_kernel_is_running - Log: properly take mutex when kernel is not running - Thread: rework tread control block scrubbing procedure, ensure that we don't do stupid things in idle task, add new priority for init task - Timer: add control queue flush method, force flush on stop - Furi: system init task now performs thread scrubbing - BleGlue: add some extra checks - FreeRTOSConfig: fix bunch of issues that were preventing configuration from being properly applied and cleanup
28 lines
571 B
C
28 lines
571 B
C
#include "furi.h"
|
|
|
|
#include "core/thread_i.h"
|
|
|
|
#include <FreeRTOS.h>
|
|
#include <queue.h>
|
|
|
|
void furi_init(void) {
|
|
furi_check(!furi_kernel_is_irq_or_masked());
|
|
furi_check(xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED);
|
|
|
|
furi_thread_init();
|
|
furi_log_init();
|
|
furi_record_init();
|
|
}
|
|
|
|
void furi_run(void) {
|
|
furi_check(!furi_kernel_is_irq_or_masked());
|
|
furi_check(xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED);
|
|
|
|
/* Start the kernel scheduler */
|
|
vTaskStartScheduler();
|
|
}
|
|
|
|
void furi_background(void) {
|
|
furi_thread_scrub();
|
|
}
|