mousejacker_ducky.h 843 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #pragma once
  2. #include <stdlib.h>
  3. #include <stdbool.h>
  4. #include <stdint.h>
  5. #include <furi_hal_spi.h>
  6. #include <stdio.h>
  7. #include <string.h>
  8. #include <nrf24.h>
  9. #include <furi.h>
  10. #include <furi_hal.h>
  11. #include <toolbox/stream/file_stream.h>
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. typedef struct {
  16. char* name;
  17. uint8_t hid;
  18. uint8_t mod;
  19. } MJDuckyKey;
  20. typedef struct {
  21. FuriMutex* mutex;
  22. bool ducky_err;
  23. bool addr_err;
  24. bool is_thread_running;
  25. bool is_ducky_running;
  26. bool is_nrf24_connected;
  27. bool close_thread_please;
  28. Storage* storage;
  29. FuriThread* mjthread;
  30. Stream* file_stream;
  31. } PluginState;
  32. void mj_process_ducky_script(
  33. FuriHalSpiBusHandle* handle,
  34. uint8_t* addr,
  35. uint8_t addr_size,
  36. uint8_t rate,
  37. char* script,
  38. PluginState* plugin_state);
  39. #ifdef __cplusplus
  40. }
  41. #endif