eth_worker_i.h 751 B

12345678910111213141516171819202122232425262728293031323334
  1. #pragma once
  2. #include <furi.h>
  3. #include "eth_worker.h"
  4. #include "eth_view_process.h"
  5. struct EthWorkerNetConf {
  6. uint8_t mac[6];
  7. uint8_t ip[4];
  8. uint8_t mask[4];
  9. uint8_t gateway[4];
  10. uint8_t dns[4];
  11. uint8_t fifo_sizes[16];
  12. uint8_t is_dhcp;
  13. };
  14. struct EthWorker {
  15. FuriThread* thread;
  16. void* context;
  17. EthViewProcess* init_process;
  18. EthViewProcess* dhcp_process;
  19. EthViewProcess* stat_process;
  20. EthViewProcess* ping_process;
  21. EthViewProcess* reset_process;
  22. EthViewProcess* active_process;
  23. EthWorkerState state;
  24. EthWorkerSubState sub_state;
  25. EthWorkerCallback callback;
  26. };
  27. void eth_worker_change_state(EthWorker* eth_worker, EthWorkerState state);
  28. int32_t eth_worker_task(void* context);