Refactor UART handling and TUI dialogs: integrate UartThreadFlags structure, update uartListener to manage UART status, and add functions for person dialog operations.
This commit is contained in:
+10
-6
@@ -4,22 +4,26 @@
|
||||
#include "main.h"
|
||||
#include "users.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
BYTE wait_for_UART_flag;
|
||||
BYTE end_from_main_flag;
|
||||
BYTE uart_status;
|
||||
} UartThreadFlags;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *uart_address;
|
||||
BYTE *uart_status;
|
||||
|
||||
list_t *person_list_head;
|
||||
UartThreadFlags *flags;
|
||||
} UartThreadArgs;
|
||||
|
||||
|
||||
|
||||
// UART handler thread
|
||||
void *uartListener(void *arg);
|
||||
|
||||
uint16_t parseIncommingPacket(BYTE *_packet);
|
||||
|
||||
void sendPacketToDevice(BYTE * _packet);
|
||||
void sendPacketToDevice(BYTE *_packet);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -34,4 +34,8 @@ int exportDialog(list_t *_list, int terminal_x, int terminal_y);
|
||||
|
||||
void editDatabaseMenu(list_t *_person_list, int terminal_x, int terminal_y);
|
||||
|
||||
void addPersonDialog(list_t *_person_list, int terminal_x, int terminal_y);
|
||||
|
||||
void deletePersonDialog(list_t *_person_list, int terminal_x, int terminal_y);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user