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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user