eth_worker_i.h 908 B

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. #include <furi.h>
  3. #include "eth_worker.h"
  4. #include "eth_view_process.h"
  5. #include "eth_save_process.h"
  6. struct EthWorker {
  7. FuriThread* thread;
  8. void* context;
  9. EthernetSaveConfig* config;
  10. EthViewProcess* init_process;
  11. EthViewProcess* dhcp_process;
  12. EthViewProcess* stat_process;
  13. EthViewProcess* ping_process;
  14. EthViewProcess* traceroute_process;
  15. EthViewProcess* reset_process;
  16. EthViewProcess* active_process;
  17. EthWorkerState state;
  18. EthWorkerState next_state;
  19. EthWorkerSubState sub_state;
  20. EthWorkerCallback callback;
  21. FuriTimer* timer;
  22. };
  23. void eth_worker_change_state(EthWorker* eth_worker, EthWorkerState state);
  24. void eth_worker_log(EthWorker* eth_worker, const char* str);
  25. void eth_run(EthWorker* worker, EthWorkerProcess process);
  26. void eth_log(EthWorkerProcess process, const char* format, ...);
  27. int32_t eth_worker_task(void* context);