main_view.h 708 B

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