preparation du plan B

This commit is contained in:
phyto 2019-05-22 09:50:25 +02:00
parent dcc927418b
commit 1b03d60613
9 changed files with 46 additions and 21 deletions

View File

@ -6,18 +6,31 @@
function build
{
echo ============= $1 ==============
curdir=${PWD}
cd $1
make t
error=$?
cd ..
cd ${curdir}
if [ ${error} -ne 0 ]
then
echo === error on $1 = ${error}
exit
fi
}
# ------------------------------------------------------------------
#
# euh, il faut parfois tweaker l'ordre de ces modules
#
modules=" core serial viz/curses ui audio storage "
build serial
for mod in ${modules}
do
build $mod
done
build ui
echo +++++++++++++++++++++++++++++++++++
make essai

View File

@ -34,7 +34,7 @@ if (idx==16) {
fprintf(fp, "%02x ", buffer[foo]);
if (7==foo) fprintf(fp, " ");
}
fprintf(fp, " - |");
fprintf(fp, " |");
for (foo=0; foo<16; foo++) {
c = buffer[foo];
fprintf(fp, "%c", isprint(c) ? c : ' ');

View File

@ -88,7 +88,7 @@ if (uart0 < 0)
baudbits = baudrate2const(baudrate);
#if DEBUG_LEVEL > 1
#if DEBUG_LEVEL
fprintf(stderr, "%d -> 0x%04x\n", baudrate, baudbits);
#endif
@ -107,7 +107,7 @@ options.c_cc[VMIN] = 1; /* ask for blocking read */
tcflush(uart0, TCIOFLUSH);
tcsetattr(uart0, TCSANOW, &options);
tcflush(uart0, TCIFLUSH); /* do it again, sam */
tcflush(uart0, TCIOFLUSH); /* do it again, sam */
if (verbosity) {
fprintf(stderr, "%s %s uart0 = %d\n",

View File

@ -136,7 +136,7 @@ void loop() {
break;
}
}
delay(DELAI);
delay(parametres.delai);
/* ETERNAL LOOP END HERE */
}

View File

@ -0,0 +1,4 @@
t: t.c Makefile
gcc -Wall $< -o $@

View File

@ -0,0 +1,7 @@
#include <stdio.h>
int main(int argc, char *argv[])
{
fprintf(stderr, "storage tool\n");
return 0;
}

View File

@ -21,16 +21,6 @@ extern int verbosity;
int special_dumper(FILE *fp, unsigned char octet);
/* ---------------------------------------------------------------- */
static void bordure(WINDOW * w, char *texte, int type)
{
if (type)
box(w, 0, 0);
else
wborder(w, '|', '|', '-', '-', '+', '+', '+', '+');
wstandout(w); mvwaddstr(w, 0, 3, texte); wstandend(w);
wrefresh(w);
}
/* ---------------------------------------------------------------- */
static int interactive(WINDOW *glass, int fd_local, int fd_remote)
{
@ -98,7 +88,7 @@ do {
received = wgetch(glass);
echo();
#if DEBUG_LEVEL
#if DEBUG_LEVEL > 1
sprintf(ligne, " got $%X '%c'\n", received,
isprint(received) ? received : '?');
waddstr(glass, ligne); wrefresh(glass);

View File

@ -11,6 +11,16 @@
extern int verbosity;
/* ---------------------------------------------------------------- */
void bordure(WINDOW * w, char *texte, int type)
{
if (type)
box(w, 0, 0);
else
wborder(w, '|', '|', '-', '-', '+', '+', '+', '+');
wstandout(w); mvwaddstr(w, 0, 3, texte); wstandend(w);
wrefresh(w);
}
/* ---------------------------------------------------------------- */
int kbhit(void)
{

View File

@ -6,6 +6,7 @@ int kbhit(void); /* experimental */
int fond_ecran(char *titre);
int aff_message(char *);
void bordure(WINDOW * w, char *texte, int type);
int aff7segs_base(WINDOW * win, int lig, int col, int bits, int k);