eth_worker_i.h 761 B

1234567891011121314151617181920212223242526272829303132333435363738
  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 EthViewProcess {
  15. char fifo[SCREEN_STRINGS_COUNT][SCREEN_SYMBOLS_WIDTH];
  16. uint8_t x;
  17. uint8_t y;
  18. uint8_t carriage;
  19. uint8_t position;
  20. uint8_t autofill;
  21. };
  22. struct EthWorker {
  23. FuriThread* thread;
  24. void* context;
  25. EthViewProcess* init_process;
  26. EthWorkerState state;
  27. EthWorkerSubState sub_state;
  28. EthWorkerCallback callback;
  29. };
  30. void eth_worker_change_state(EthWorker* eth_worker, EthWorkerState state);
  31. int32_t eth_worker_task(void* context);