aller chercher des bieres ?

This commit is contained in:
phyto 2019-05-18 18:01:05 +02:00
parent 40e1d434ff
commit 6ad5283de9
4 changed files with 12 additions and 8 deletions

View File

@ -5,7 +5,7 @@
CC = gcc
CCOPT = -Wall -g
CLIB = core/libdd2m-core.a viz/libdd2m-viz.a
OBJS = essai.o terminal.o
all: essai
# -------------------------------------------------------
@ -15,8 +15,7 @@ OSERIAL = serial/serial.o serial/funcs.o
essai.o: essai.c Makefile
$(CC) ${CCOPT} $< -c
essai: essai.o Makefile $(CLIB) ${OSERIAL}
essai: ${OBJS} Makefile $(CLIB) ${OSERIAL}
$(CC) ${CCOPT} $< $(CLIB) ${OSERIAL} -lncurses -o $@
fake-values: fake-values.c Makefile $(CLIB)

View File

@ -1,8 +1,8 @@
# ---------------------------------------------------
# May be we have to put those objs in a .a ?
OPT = -Wall -DDEBUG_LEVEL=0
OBJS = serial.o funcs.o
OPT = -Wall -DDEBUG_LEVEL=1
OBJS = serial.o funcs.o
# ---------------------------------------------------
serial.o: serial.c serial.h Makefile
@ -14,5 +14,6 @@ funcs.o: funcs.c serial.h Makefile
# ---------------------------------------------------
t: t.c Makefile ${OBJS}
gcc ${OPT} $< ${OBJS} -o $@
gcc ${OPT} $< ${OBJS} -lncurses -o $@
# ---------------------------------------------------

View File

@ -9,11 +9,15 @@ int prepare_UART(char *port, int bauds);
int getbyte(int fd); /* really brotched func */
int putbyte(int fd, unsigned char byte);
/* timeout is exprimed in milliseconds. */
int getbyte_to (int fd, int to_ms);
int getline_to(int fd, char *where, int szm, int to_ms);
/* auxiliary and test functions */
int parseXvalue(char *asciidatas, char id);

View File

@ -162,10 +162,10 @@ switch (param) {
retv = loop(serial_in, nbre);
break;
case 1:
retv = essai_terminal(serial_in, device, 0);
retv = -1;
break;
default:
retv = -1;
retv = -2;
break;
}