Fixing a few issues - makefile goofs.

Also adding in the stuff for /dev/gpiomem with warnings
and information in the gpio manual page (who reads that
though!)
This commit is contained in:
Gordon Henderson
2015-09-30 16:11:42 +01:00
parent f6c40cb2a6
commit d79506694d
9 changed files with 80 additions and 11 deletions

View File

@@ -45,7 +45,7 @@ SRC = blink.c blink8.c blink12.c \
lcd.c lcd-adafruit.c clock.c \
nes.c \
softPwm.c softTone.c \
delayTest.c serialRead.c serialTest.c okLed.c ds1302.c \
delayTest.c serialRead.c serialTestc okLed.c ds1302.c \
lowPower.c \
max31855.c \
rht03.c
@@ -151,7 +151,7 @@ ds1302: ds1302.o
max31855: max31855.o
$Q echo [link]
$Q $(CC) -o $@ max31855.c.o $(LDFLAGS) $(LDLIBS)
$Q $(CC) -o $@ max31855.o $(LDFLAGS) $(LDLIBS)
.c.o:
$Q echo [CC] $<

View File

@@ -33,7 +33,7 @@
int main (int argc, char *argv [])
{
int i ;
int i = 0 ;
wiringPiSetup () ;
max31855Setup (200, 0) ;
@@ -41,9 +41,20 @@ int main (int argc, char *argv [])
for (;;)
{
printf ("%6d, %6d, %6d, %6d ::::", analogRead (200), analogRead (201), analogRead (202), analogRead (203)) ;
printf ("%6d, %6d, %6d, %6d\n", analogRead (400), analogRead (401), analogRead (402), analogRead (403)) ;
if (i == 0)
{
printf ("+------+------+------+------++------+------+------+------+\n") ;
printf ("| Raw | Err | C | F || Raw | Err | C | F |\n") ;
printf ("+------+------+------+------++------+------+------+------+\n") ;
}
printf ("| %4d | %4d | %4d | %4d |", analogRead (200), analogRead (201), analogRead (202), analogRead (203)) ;
printf ("| %4d | %4d | %4d | %4d |\n", analogRead (400), analogRead (401), analogRead (402), analogRead (403)) ;
delay (500) ;
if (++i == 10)
i = 0 ;
}
}