mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-22 18:53:18 +00:00
28eb4d1060
Not full refactoring, only small issues is fixed and moved all plugins to furi mutex instead of valuemutex Many small issues was found and fixed due mutex upgrade OFW removed 60 lines of code and it was painful
45 lines
No EOL
814 B
C
45 lines
No EOL
814 B
C
#pragma once
|
|
#include <stdlib.h>
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
#include <furi_hal_spi.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <nrf24.h>
|
|
#include <furi.h>
|
|
#include <furi_hal.h>
|
|
#include <toolbox/stream/file_stream.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct {
|
|
char* name;
|
|
uint8_t hid;
|
|
uint8_t mod;
|
|
} MJDuckyKey;
|
|
|
|
typedef struct {
|
|
FuriMutex* mutex;
|
|
bool ducky_err;
|
|
bool addr_err;
|
|
bool is_thread_running;
|
|
bool is_ducky_running;
|
|
bool close_thread_please;
|
|
Storage* storage;
|
|
FuriThread* mjthread;
|
|
Stream* file_stream;
|
|
} PluginState;
|
|
|
|
void mj_process_ducky_script(
|
|
FuriHalSpiBusHandle* handle,
|
|
uint8_t* addr,
|
|
uint8_t addr_size,
|
|
uint8_t rate,
|
|
char* script,
|
|
PluginState* plugin_state);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif |