Add usage message for UART address in main function
This commit is contained in:
BIN
Binary file not shown.
+10
-2
@@ -6,6 +6,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <termios.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "users.h"
|
||||
#include "tui.h"
|
||||
@@ -24,8 +25,14 @@ void *uartListener(void *arg)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int main(int argc, char const *argv[])
|
||||
int main(int argc, char const **argv)
|
||||
{
|
||||
if (argc != 1)
|
||||
{
|
||||
printf("Usage: %s <Address of RFID reader>\n", argv[0]);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
int y_max, x_max;
|
||||
char uart_address[51];
|
||||
pthread_t uart_thread;
|
||||
@@ -51,7 +58,8 @@ int main(int argc, char const *argv[])
|
||||
erase();
|
||||
refresh();
|
||||
|
||||
uartDialog(uart_address, x_max, y_max);
|
||||
// uartDialog(uart_address, x_max, y_max);
|
||||
strcpy(uart_address, argv[1]);
|
||||
|
||||
pthread_create(&uart_thread, NULL, uartListener, uart_address);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user