main_view.h 832 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #include <furi.h>
  2. #include <furi_hal.h>
  3. #include <gui/gui.h>
  4. #include <i2ctools_icons.h>
  5. #define APP_NAME "I2C Tools"
  6. #define SCAN_MENU_TEXT "Scan"
  7. #define SCAN_MENU_X 90
  8. #define SCAN_MENU_Y 7
  9. #define SNIFF_MENU_TEXT "Sniff"
  10. #define SNIFF_MENU_X 90
  11. #define SNIFF_MENU_Y 21
  12. #define SEND_MENU_TEXT "Send"
  13. #define SEND_MENU_X 90
  14. #define SEND_MENU_Y 35
  15. #define INFOS_MENU_TEXT "Infos"
  16. #define INFOS_MENU_X 90
  17. #define INFOS_MENU_Y 49
  18. // Menu
  19. typedef enum {
  20. MAIN_VIEW,
  21. SCAN_VIEW,
  22. SNIFF_VIEW,
  23. SEND_VIEW,
  24. INFOS_VIEW,
  25. /* Know menu Size*/
  26. MENU_SIZE
  27. } i2cToolsViews;
  28. typedef struct {
  29. i2cToolsViews current_view;
  30. i2cToolsViews menu_index;
  31. } i2cMainView;
  32. void draw_main_view(Canvas* canvas, i2cMainView* main_view);
  33. i2cMainView* i2c_main_view_alloc();
  34. void i2c_main_view_free(i2cMainView* main_view);