preparation du plan B
This commit is contained in:
parent
dcc927418b
commit
1b03d60613
21
build.sh
21
build.sh
@ -6,18 +6,31 @@
|
|||||||
function build
|
function build
|
||||||
{
|
{
|
||||||
echo ============= $1 ==============
|
echo ============= $1 ==============
|
||||||
|
curdir=${PWD}
|
||||||
cd $1
|
cd $1
|
||||||
make t
|
make t
|
||||||
error=$?
|
error=$?
|
||||||
cd ..
|
cd ${curdir}
|
||||||
echo === error on $1 = ${error}
|
|
||||||
|
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
|
make essai
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ if (idx==16) {
|
|||||||
fprintf(fp, "%02x ", buffer[foo]);
|
fprintf(fp, "%02x ", buffer[foo]);
|
||||||
if (7==foo) fprintf(fp, " ");
|
if (7==foo) fprintf(fp, " ");
|
||||||
}
|
}
|
||||||
fprintf(fp, " - |");
|
fprintf(fp, " |");
|
||||||
for (foo=0; foo<16; foo++) {
|
for (foo=0; foo<16; foo++) {
|
||||||
c = buffer[foo];
|
c = buffer[foo];
|
||||||
fprintf(fp, "%c", isprint(c) ? c : ' ');
|
fprintf(fp, "%c", isprint(c) ? c : ' ');
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h> //Used for UART
|
#include <unistd.h> //Used for UART
|
||||||
#include <fcntl.h> //Used for UART
|
#include <fcntl.h> //Used for UART
|
||||||
#include <termios.h> //Used for UART
|
#include <termios.h> //Used for UART
|
||||||
|
|
||||||
#include "serial.h"
|
#include "serial.h"
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ if (uart0 < 0)
|
|||||||
|
|
||||||
|
|
||||||
baudbits = baudrate2const(baudrate);
|
baudbits = baudrate2const(baudrate);
|
||||||
#if DEBUG_LEVEL > 1
|
#if DEBUG_LEVEL
|
||||||
fprintf(stderr, "%d -> 0x%04x\n", baudrate, baudbits);
|
fprintf(stderr, "%d -> 0x%04x\n", baudrate, baudbits);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -107,7 +107,7 @@ options.c_cc[VMIN] = 1; /* ask for blocking read */
|
|||||||
tcflush(uart0, TCIOFLUSH);
|
tcflush(uart0, TCIOFLUSH);
|
||||||
tcsetattr(uart0, TCSANOW, &options);
|
tcsetattr(uart0, TCSANOW, &options);
|
||||||
|
|
||||||
tcflush(uart0, TCIFLUSH); /* do it again, sam */
|
tcflush(uart0, TCIOFLUSH); /* do it again, sam */
|
||||||
|
|
||||||
if (verbosity) {
|
if (verbosity) {
|
||||||
fprintf(stderr, "%s %s uart0 = %d\n",
|
fprintf(stderr, "%s %s uart0 = %d\n",
|
||||||
|
@ -136,7 +136,7 @@ void loop() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delay(DELAI);
|
delay(parametres.delai);
|
||||||
|
|
||||||
/* ETERNAL LOOP END HERE */
|
/* ETERNAL LOOP END HERE */
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
|
||||||
|
t: t.c Makefile
|
||||||
|
gcc -Wall $< -o $@
|
@ -0,0 +1,7 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
fprintf(stderr, "storage tool\n");
|
||||||
|
return 0;
|
||||||
|
}
|
@ -21,16 +21,6 @@ extern int verbosity;
|
|||||||
|
|
||||||
int special_dumper(FILE *fp, unsigned char octet);
|
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)
|
static int interactive(WINDOW *glass, int fd_local, int fd_remote)
|
||||||
{
|
{
|
||||||
@ -98,7 +88,7 @@ do {
|
|||||||
received = wgetch(glass);
|
received = wgetch(glass);
|
||||||
echo();
|
echo();
|
||||||
|
|
||||||
#if DEBUG_LEVEL
|
#if DEBUG_LEVEL > 1
|
||||||
sprintf(ligne, " got $%X '%c'\n", received,
|
sprintf(ligne, " got $%X '%c'\n", received,
|
||||||
isprint(received) ? received : '?');
|
isprint(received) ? received : '?');
|
||||||
waddstr(glass, ligne); wrefresh(glass);
|
waddstr(glass, ligne); wrefresh(glass);
|
||||||
|
@ -11,6 +11,16 @@
|
|||||||
|
|
||||||
extern int verbosity;
|
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)
|
int kbhit(void)
|
||||||
{
|
{
|
||||||
@ -29,7 +39,7 @@ else { // input
|
|||||||
ungetch(ch);
|
ungetch(ch);
|
||||||
}
|
}
|
||||||
|
|
||||||
// restore block and echo
|
// restore block and echo
|
||||||
echo();
|
echo();
|
||||||
nodelay(stdscr, FALSE);
|
nodelay(stdscr, FALSE);
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ int kbhit(void); /* experimental */
|
|||||||
|
|
||||||
int fond_ecran(char *titre);
|
int fond_ecran(char *titre);
|
||||||
int aff_message(char *);
|
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);
|
int aff7segs_base(WINDOW * win, int lig, int col, int bits, int k);
|
||||||
|
Loading…
Reference in New Issue
Block a user