unleashed-firmware/applications/external/flipper_i2ctools/views/main_view.h

43 lines
832 B
C
Raw Normal View History

2022-10-28 15:46:40 +00:00
#include <furi.h>
#include <furi_hal.h>
#include <gui/gui.h>
2023-07-05 17:07:43 +00:00
#include <i2ctools_icons.h>
2022-11-13 01:21:58 +00:00
#define APP_NAME "I2C Tools"
2022-10-28 15:46:40 +00:00
#define SCAN_MENU_TEXT "Scan"
#define SCAN_MENU_X 90
2023-07-05 17:07:43 +00:00
#define SCAN_MENU_Y 7
2022-10-28 15:46:40 +00:00
#define SNIFF_MENU_TEXT "Sniff"
#define SNIFF_MENU_X 90
2023-07-05 17:07:43 +00:00
#define SNIFF_MENU_Y 21
2022-10-28 15:46:40 +00:00
#define SEND_MENU_TEXT "Send"
#define SEND_MENU_X 90
2023-07-05 17:07:43 +00:00
#define SEND_MENU_Y 35
#define INFOS_MENU_TEXT "Infos"
#define INFOS_MENU_X 90
#define INFOS_MENU_Y 49
2022-10-28 15:46:40 +00:00
// Menu
typedef enum {
MAIN_VIEW,
SCAN_VIEW,
SNIFF_VIEW,
SEND_VIEW,
2023-07-05 17:07:43 +00:00
INFOS_VIEW,
2022-10-28 15:46:40 +00:00
/* Know menu Size*/
MENU_SIZE
} i2cToolsViews;
typedef struct {
i2cToolsViews current_view;
i2cToolsViews menu_index;
} i2cMainView;
void draw_main_view(Canvas* canvas, i2cMainView* main_view);
i2cMainView* i2c_main_view_alloc();
void i2c_main_view_free(i2cMainView* main_view);