Refactor UART handling and enhance user data structures
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#include "rfid_handler.h"
|
||||
#include "users.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <termios.h>
|
||||
#include <string.h>
|
||||
|
||||
void *uartListener(void *arg)
|
||||
{
|
||||
char *uart_address = (char *)arg;
|
||||
int uart = open(uart_address, O_RDWR | O_NOCTTY | O_NDELAY);
|
||||
if (uart == -1)
|
||||
{
|
||||
perror("Failed to open UART");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
close(uart);
|
||||
return NULL;
|
||||
}
|
||||
Reference in New Issue
Block a user