-
Notifications
You must be signed in to change notification settings - Fork 2
/
logic_analyzer_app.h
59 lines (46 loc) · 1.15 KB
/
logic_analyzer_app.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef __ARHA_FLIPPERAPP_DEMO
#define __ARHA_FLIPPERAPP_DEMO
#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
#include <furi.h>
#include <gui/gui.h>
#include <gui/elements.h>
#include <dialogs/dialogs.h>
#include <input/input.h>
#include <storage/storage.h>
#include <stdlib.h>
#include <dolphin/dolphin.h>
#include <notification/notification.h>
#include <notification/notification_messages.h>
#include "sump.h"
#include "usb_uart.h"
#define TAG "LogicAnalyzer"
#define TIMER_HZ 50
#define TIMEOUT 3
#define QUEUE_SIZE 32
typedef enum { KeyNone, KeyUp, KeyRight, KeyDown, KeyLeft, KeyOK } KeyCode;
typedef enum { EventKeyPress, EventBufferFilled } EventType;
typedef struct {
EventType type;
InputEvent input;
} AppEvent;
typedef struct {
FuriMessageQueue* event_queue;
NotificationApp* notification;
Storage* storage;
ViewPort* view_port;
Gui* gui;
DialogsApp* dialogs;
UsbUart* uart;
Sump* sump;
FuriMutex* mutex;
bool triggered;
bool processing;
FuriThread* capture_thread;
uint8_t* capture_buffer;
size_t capture_pos;
uint8_t current_levels;
char state_string[64];
} AppFSM;
#endif