Skip to content
Permalink
Browse files

Bumped the version to 2.40 - correctly this time, I hope.

Added fixed for a few minor things. pin driver for rht03/dht type
sensors. Network stuff is experimental - for now.
  • Loading branch information
gordonDrogon committed Feb 27, 2017
1 parent e687f3f commit 70fa99a127ff150ee2b0975afe5be9547ddb44e3
@@ -1 +1 @@
2.39
2.40
8 build
@@ -160,6 +160,14 @@ fi
$sudo make install
check_make_ok

echo
echo "wiringPi Daemon"
cd ../wiringPiD
make -j5
check_make_ok
$sudo make install
check_make_ok

# echo
# echo "Examples"
# cd ../examples
@@ -1,5 +1,5 @@
Package: wiringpi
Version: 2.38
Version: 2.40
Section: libraries
Priority: optional
Architecture: armhf
@@ -33,7 +33,7 @@ INCLUDE = -I/usr/local/include
CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe

LDFLAGS = -L/usr/local/lib
LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm
LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm -lcrypt

# Should not alter anything below this line
###############################################################################
@@ -0,0 +1,61 @@
/*
* blink8-drcn.c:
* Simple sequence over the first 8 GPIO pins - LEDs
* Aimed at the Ladder board, but it's fairly generic.
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
*
* wiringPi is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* wiringPi is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with wiringPi. If not, see <http://www.gnu.org/licenses/>.
***********************************************************************
*/

#include <stdio.h>
#include <wiringPi.h>
#include <drcNet.h>

int main (void)
{
int i, led ;

printf ("Raspberry Pi - 8-LED Sequencer\n") ;
printf ("==============================\n") ;
printf ("\n") ;
printf ("Connect LEDs to the first 8 GPIO pins and watch ...\n") ;

int pinBase = 100 ;

// wiringPiSetup () ;
drcSetupNet (pinBase, 100, "192.168.254.21", "6124", "123456") ;

for (i = 0 ; i < 8 ; ++i)
pinMode (i + pinBase, OUTPUT) ;

for (;;)
{
for (led = 0 ; led < 8 ; ++led)
{
digitalWrite (led + pinBase, 1) ;
delay (10) ;
}

for (led = 0 ; led < 8 ; ++led)
{
digitalWrite (led + pinBase, 0) ;
delay (10) ;
}
}
}
@@ -37,7 +37,7 @@ INCLUDE = -I$(DESTDIR)$(PREFIX)/include
CFLAGS = $(DEBUG) -Wall -Wextra $(INCLUDE) -Winline -pipe

LDFLAGS = -L$(DESTDIR)$(PREFIX)/lib
LIBS = -lwiringPi -lwiringPiDev -lpthread -lrt -lm
LIBS = -lwiringPi -lwiringPiDev -lpthread -lrt -lm -lcrypt

# May not need to alter anything below this line
###############################################################################
@@ -9,15 +9,15 @@ gpio \- Command-line access to Raspberry Pi's GPIO
.PP
.B gpio
.B [ \-g | \-1 ]
.B mode/read/write/aread/awrite/wb/pwm/clock ...
.B mode/read/write/aread/awrite/wb/pwm/clock/toggle/blink ...
.PP
.B gpio
.B [ \-x extension:params ]
.B mode/read/write/aread/awrite/pwm/pwmTone ...
.B mode/read/write/aread/awrite/pwm/toggle/blink ...
.PP
.B gpio
.B [ \-p ]
.B read/write/toggle/wb
.B read/write/toggle/blink
.B ...
.PP
.B gpio
@@ -118,11 +118,23 @@ respective logic levels.
Write the given value (0 or 1) to the pin. You need to set the pin
to output mode first.

.TP
.B toggle <pin>
Changes the state of a GPIO pin; 0 to 1, or 1 to 0.

Note unlike the blink command, the pin must be in output mode first.

.TP
.B blink <pin>
Blinks the given pin on/off. Press Control-C to exit.

Note: This command explicitly sets the pin to output mode.

.TP
.B aread <pin>
Read the analog value of the given pin. This needs to be uses in
Read the analog value of the given pin. This needs to be used in
conjunction with a -x flag to add in an extension that handles analog
inputs. respective logic levels.
inputs.

e.g. gpio -x mcp3002:200:0 aread 200

@@ -132,7 +144,7 @@ will read the first analog input on an mcp3002 SPI ADC chip.
.B awrite <pin> <value>
Write the analog value to the given pin. This needs to be used in
conjunction with a -x flag to add in an extension that handles analog
inputs. respective logic levels.
inputs.

e.g. gpio -x mcp4802:200:0 awrite 200 128

@@ -234,7 +246,7 @@ absolutely sure you know what you're doing.
high | low

Change the USB current limiter to high (1.2 amps) or low (the default, 600mA)
This is only applicable to the model B+
This is only applicable to the Model B+ and the Model B, v2.

.TP
.B pwm-bal/pwm-ms
@@ -253,7 +265,6 @@ them. Optionally it will set the I2C baudrate to that supplied in Kb/sec

Note: On recent kernels with the device tree enabled you should use the
raspi-config program to load/unload the I2C device at boot time.
(or disable the device tree to continue to use this method)

.TP
.B load spi
@@ -268,7 +279,6 @@ e.g. 8192 bytes then reboot.

Note: On recent kernels with the device tree enabled you should use the
raspi-config program to load/unload the SPI device at boot time.
(or disable the device tree to continue to use this method)

.TP
.B gbr
@@ -1443,6 +1443,16 @@ int main (int argc, char *argv [])
wpMode = WPI_MODE_PIFACE ;
}

// Check for -z argument so we don't actually initialise wiringPi

else if (strcasecmp (argv [1], "-z") == 0)
{
for (i = 2 ; i < argc ; ++i)
argv [i - 1] = argv [i] ;
--argc ;
wpMode = WPI_MODE_UNINITIALISED ;
}

// Default to wiringPi mode

else
@@ -1460,12 +1470,15 @@ int main (int argc, char *argv [])
{
if (argc < 3)
{
fprintf (stderr, "%s: -x missing extension specification.\n", argv [0]) ;
fprintf (stderr, "%s: -x missing extension command.\n", argv [0]) ;
exit (EXIT_FAILURE) ;
}

if (!loadWPiExtension (argv [0], argv [2], TRUE)) // Prints its own error messages
if (!loadWPiExtension (argv [0], argv [2], TRUE))
{
fprintf (stderr, "%s: Extension load failed: %s\n", argv [0], strerror (errno)) ;
exit (EXIT_FAILURE) ;
}

// Shift args down by 2

@@ -1,3 +1,3 @@
#define VERSION "2.38"
#define VERSION "2.40"
#define VERSION_MAJOR 2
#define VERSION_MINOR 38
#define VERSION_MINOR 40
@@ -57,8 +57,8 @@ SRC = wiringPi.c \
mcp3002.c mcp3004.c mcp4802.c mcp3422.c \
max31855.c max5322.c ads1115.c \
sn3218.c \
bmp180.c htu21d.c ds18b20.c \
drcSerial.c \
bmp180.c htu21d.c ds18b20.c rht03.c \
drcSerial.c drcNet.c \
pseudoPins.c \
wpiExtensions.c

0 comments on commit 70fa99a

Please sign in to comment.
You can’t perform that action at this time.