EOW
This commit is contained in:
parent
bb10042aae
commit
0c6f849310
3
.gitignore
vendored
3
.gitignore
vendored
@ -9,4 +9,7 @@ doc/*.log
|
||||
doc/*.aux
|
||||
doc/*.pdf
|
||||
doc/*.idx
|
||||
doc/*.ilg
|
||||
doc/*.ind
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
\documentclass[a4paper,12pt]{article}
|
||||
\documentclass[a4paper,11pt]{article}
|
||||
|
||||
% \listfiles % pour le debug
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
\usepackage[T1]{fontenc}
|
||||
% XXX \usepackage{lipsum}
|
||||
\usepackage{makeidx}
|
||||
\usepackage{listings}
|
||||
% \usepackage{color}
|
||||
% \usepackage{url}
|
||||
\usepackage{xspace}
|
||||
@ -93,7 +94,7 @@ ne demande qu'à grandir.
|
||||
|
||||
\subsection{Exemples}
|
||||
|
||||
Promis, on va en mettre !
|
||||
Promis, on va en mettre ! Dès que ça marche\dots
|
||||
|
||||
\subsection{Analyses}
|
||||
|
||||
@ -120,7 +121,19 @@ La première, que nous allons juste entrevoir, passera par le port
|
||||
USB de la carte Arduino. La seconde passera par un port série
|
||||
auxiliaire\footnote{Il y en a 4 sur le 2560} de celle-ci.
|
||||
|
||||
\begin{lstlisting}
|
||||
tcgetattr(uart0, &options);
|
||||
options.c_cflag = baudbits | CS8 | CLOCAL | CREAD;
|
||||
options.c_iflag = IGNPAR;
|
||||
options.c_oflag = 0;
|
||||
options.c_lflag = 0;
|
||||
tcflush(uart0, TCIFLUSH);
|
||||
tcsetattr(uart0, TCSANOW, &options);
|
||||
\end{lstlisting}
|
||||
|
||||
Et en fait, le \texttt{read} sur le \textsl{fd} du serial device
|
||||
n'est pas bloquant, \texttt{perror} annonce \emph{success}, mais
|
||||
rien ne marche. L'année 2019 va commencer sur du vaudou programming.
|
||||
|
||||
% -------------------------------------------------------------------
|
||||
|
||||
|
8
doc/mkdoc.sh
Executable file
8
doc/mkdoc.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
pdflatex dd2-monitoring.tex
|
||||
|
||||
makeindex dd2-monitoring
|
||||
|
||||
pdflatex dd2-monitoring.tex
|
@ -68,8 +68,6 @@ if (uart0 < 0)
|
||||
perror("unable to open uart ");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return uart0; /* WTF ??? */
|
||||
|
||||
// CONFIGURE THE UART
|
||||
// The flags defined in /usr/include/termios.h -
|
||||
@ -92,10 +90,10 @@ baudbits = baudrate2const(baudrate);
|
||||
fprintf(stderr, "%d -> 0x%04x\n", baudrate, baudbits);
|
||||
#endif
|
||||
|
||||
memset(&options, 0, sizeof(options));
|
||||
memset(&options, 0, sizeof(options));
|
||||
|
||||
tcgetattr(uart0, &options);
|
||||
options.c_cflag = baudbits | CS8 | CLOCAL | CREAD; //<Set baud rate
|
||||
options.c_cflag = baudbits | CS8 | CLOCAL | CREAD;
|
||||
options.c_iflag = IGNPAR;
|
||||
options.c_oflag = 0;
|
||||
options.c_lflag = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user