[FL-2591] Furi: remove CMSIS thread api, migrate to FuriThread, remove unused CMSIS APIs (#1333)
* Furi: remove CMSIS thread api, migrate to FuriThread, remove unused CMSIS APIs * Furi: magic thread catcher validating thread completion; backtrace improver * Furi: allow furi_thread_get_current_id outside of thread context * Furi: use IRQ instead of ISR for core primitives
This commit is contained in:
@@ -36,7 +36,7 @@ void input_press_timer_callback(void* arg) {
|
||||
|
||||
void input_isr(void* _ctx) {
|
||||
UNUSED(_ctx);
|
||||
osThreadFlagsSet(input->thread, INPUT_THREAD_FLAG_ISR);
|
||||
furi_thread_flags_set(input->thread_id, INPUT_THREAD_FLAG_ISR);
|
||||
}
|
||||
|
||||
const char* input_get_key_name(InputKey key) {
|
||||
@@ -66,7 +66,7 @@ const char* input_get_type_name(InputType type) {
|
||||
|
||||
int32_t input_srv() {
|
||||
input = malloc(sizeof(Input));
|
||||
input->thread = osThreadGetId();
|
||||
input->thread_id = furi_thread_get_current_id();
|
||||
input->event_pubsub = furi_pubsub_alloc();
|
||||
furi_record_create("input_events", input->event_pubsub);
|
||||
|
||||
@@ -129,7 +129,7 @@ int32_t input_srv() {
|
||||
if(is_changing) {
|
||||
osDelay(1);
|
||||
} else {
|
||||
osThreadFlagsWait(INPUT_THREAD_FLAG_ISR, osFlagsWaitAny, osWaitForever);
|
||||
furi_thread_flags_wait(INPUT_THREAD_FLAG_ISR, osFlagsWaitAny, osWaitForever);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -32,7 +32,7 @@ typedef struct {
|
||||
|
||||
/** Input state */
|
||||
typedef struct {
|
||||
osThreadId_t thread;
|
||||
FuriThreadId thread_id;
|
||||
FuriPubSub* event_pubsub;
|
||||
InputPinState* pin_states;
|
||||
Cli* cli;
|
||||
|
Reference in New Issue
Block a user