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:
@@ -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] $<
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user