i2ctools_i.h 670 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #include <furi.h>
  2. #include <furi_hal.h>
  3. #include <gui/gui.h>
  4. #include <input/input.h>
  5. #include "i2csniffer.h"
  6. #include "i2cscanner.h"
  7. // Menu
  8. typedef enum {
  9. MAIN_VIEW,
  10. SCAN_VIEW,
  11. SNIFF_VIEW,
  12. SEND_VIEW,
  13. PLAY_VIEW,
  14. /* Know menu Size*/
  15. MENU_SIZE
  16. } i2cToolsMainMenu;
  17. // Bus scanner
  18. // Sender
  19. typedef struct {
  20. uint8_t address_idx;
  21. uint8_t value;
  22. uint8_t recv[2];
  23. bool must_send;
  24. bool sended;
  25. bool error;
  26. } _sender;
  27. // App datas
  28. typedef struct {
  29. ViewPort* view_port;
  30. i2cToolsMainMenu current_menu;
  31. uint8_t main_menu_index;
  32. i2cScanner* scanner;
  33. i2cSniffer* sniffer;
  34. _sender sender;
  35. } i2cTools;