eth_worker_i.h 868 B

12345678910111213141516171819202122232425262728293031
  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* reset_process;
  15. EthViewProcess* active_process;
  16. EthWorkerState state;
  17. EthWorkerState next_state;
  18. EthWorkerSubState sub_state;
  19. EthWorkerCallback callback;
  20. FuriTimer* timer;
  21. };
  22. void eth_worker_change_state(EthWorker* eth_worker, EthWorkerState state);
  23. void eth_worker_log(EthWorker* eth_worker, const char* str);
  24. void eth_run(EthWorker* worker, EthWorkerProcess process);
  25. void eth_log(EthWorkerProcess process, const char* format, ...);
  26. int32_t eth_worker_task(void* context);