diff --git a/CHANGES.txt b/CHANGES.txt index dc341cf..4a37052 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,3 +9,5 @@ v1.0.7 -- Added LCD functionality v1.0.8 -- Updated manifest to include .rst and fix build error v1.0.9 -- Erroneous non-fix due to stupidity v1.0.10 -- Added I2CSetup and new I2C class +v1.1.0 -- Synced to WiringPi as of 8th March 2015 +v1.1.1 -- Included devLib folder for headers diff --git a/MANIFEST.in b/MANIFEST.in index dd99154..90aeef1 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,4 @@ graft WiringPi/wiringPi +graft WiringPi/devLib include *.txt include *.rst diff --git a/WiringPi/gpio/version.h b/WiringPi/gpio/version.h index fd96a9b..be8e84c 100644 --- a/WiringPi/gpio/version.h +++ b/WiringPi/gpio/version.h @@ -1 +1 @@ -#define VERSION "2.25" +#define VERSION "2.26" diff --git a/WiringPi/wiringPi/wiringPi.c b/WiringPi/wiringPi/wiringPi.c index be636a0..2382112 100644 --- a/WiringPi/wiringPi/wiringPi.c +++ b/WiringPi/wiringPi/wiringPi.c @@ -627,6 +627,7 @@ int wiringPiFailure (int fatal, const char *message, ...) * 0010 - Model B+, Rev 1.2, 512MB, Sony * 0011 - Pi CM, Rev 1.2, 512MB, Sony * 0012 - Model A+ Rev 1.2, 256MB, Sony + * 0014 - Pi CM, Rev 1.1, 512MB, Sony (Actual Revision might be different) * * For the Pi 2: * 0010 - Model 2, Rev 1.1, Quad Core, 1GB, Sony @@ -638,6 +639,7 @@ int wiringPiFailure (int fatal, const char *message, ...) * last digit, then it's 1, therefore it'll default to not 2 or 3 for a * Rev 1, so will appear as a Rev 2. This is fine for the most part, but * we'll properly detect the Compute Module later and adjust accordingly. + * And the next rev of the CN is 0014 ... * ********************************************************************************* */ @@ -741,7 +743,7 @@ int piBoardRev (void) if ( (strcmp (c, "0002") == 0) || (strcmp (c, "0003") == 0)) boardRev = 1 ; else - boardRev = 2 ; + boardRev = 2 ; // Covers everything else from the B revision 2 to the B+, the Pi v2 and CM's. if (wiringPiDebug) printf ("piBoardRev: Returning revision: %d\n", boardRev) ; @@ -809,7 +811,7 @@ void piBoardId (int *model, int *rev, int *mem, int *maker, int *overVolted) break ; if (*c != ':') - piBoardRevOops ("Bogus \"Revision\" line") ; + piBoardRevOops ("Bogus \"Revision\" line (no colon)") ; // modelNum = (unsigned int)strtol (++c, NULL, 16) ; // Hex number with no leading 0x @@ -830,7 +832,7 @@ void piBoardId (int *model, int *rev, int *mem, int *maker, int *overVolted) // Make sure its long enough if (strlen (c) < 4) - piBoardRevOops ("Bogus \"Revision\" line") ; + piBoardRevOops ("Bogus \"Revision\" line (not long enough)") ; // If longer than 4, we'll assume it's been overvolted @@ -857,6 +859,7 @@ void piBoardId (int *model, int *rev, int *mem, int *maker, int *overVolted) else if (strcmp (c, "0011") == 0) { *model = PI_MODEL_CM ; *rev = PI_VERSION_1_2 ; *mem = 512 ; *maker = PI_MAKER_SONY ; } else if (strcmp (c, "0012") == 0) { *model = PI_MODEL_AP ; *rev = PI_VERSION_1_2 ; *mem = 256 ; *maker = PI_MAKER_SONY ; } else if (strcmp (c, "0013") == 0) { *model = PI_MODEL_BP ; *rev = PI_VERSION_1_2 ; *mem = 512 ; *maker = PI_MAKER_MBEST ; } + else if (strcmp (c, "0014") == 0) { *model = PI_MODEL_CM ; *rev = PI_VERSION_1_2 ; *mem = 512 ; *maker = PI_MAKER_SONY ; } else { *model = 0 ; *rev = 0 ; *mem = 0 ; *maker = 0 ; } } } diff --git a/setup.py b/setup.py index 18e8d52..b5d81bb 100755 --- a/setup.py +++ b/setup.py @@ -1,52 +1,17 @@ #!/usr/bin/env python from setuptools import setup, find_packages, Extension +from glob import glob _wiringpi2 = Extension( '_wiringpi2', include_dirs=['WiringPi/wiringPi','WiringPi/devLib'], - sources=[ - 'WiringPi/devLib/ds1302.c', - 'WiringPi/devLib/gertboard.c', - 'WiringPi/devLib/lcd128x64.c', - 'WiringPi/devLib/lcd.c', - 'WiringPi/devLib/maxdetect.c', - 'WiringPi/devLib/piFace.c', - 'WiringPi/devLib/piGlow.c', - 'WiringPi/devLib/piNes.c', - 'WiringPi/wiringPi/drcSerial.c', - 'WiringPi/wiringPi/max31855.c', - 'WiringPi/wiringPi/max5322.c', - 'WiringPi/wiringPi/mcp23008.c', - 'WiringPi/wiringPi/mcp23016.c', - 'WiringPi/wiringPi/mcp23017.c', - 'WiringPi/wiringPi/mcp23s08.c', - 'WiringPi/wiringPi/mcp23s17.c', - 'WiringPi/wiringPi/mcp3002.c', - 'WiringPi/wiringPi/mcp3004.c', - 'WiringPi/wiringPi/mcp3422.c', - 'WiringPi/wiringPi/mcp4802.c', - 'WiringPi/wiringPi/pcf8574.c', - 'WiringPi/wiringPi/pcf8591.c', - 'WiringPi/wiringPi/piHiPri.c', - 'WiringPi/wiringPi/piThread.c', - 'WiringPi/wiringPi/sn3218.c', - 'WiringPi/wiringPi/softPwm.c', - 'WiringPi/wiringPi/softServo.c', - 'WiringPi/wiringPi/softTone.c', - 'WiringPi/wiringPi/sr595.c', - 'WiringPi/wiringPi/wiringPi.c', - 'WiringPi/wiringPi/wiringPiI2C.c', - 'WiringPi/wiringPi/wiringPiSPI.c', - 'WiringPi/wiringPi/wiringSerial.c', - 'WiringPi/wiringPi/wiringShift.c', - 'wiringpi_wrap.c' - ] + sources=glob('WiringPi/devLib/*.c')+glob('WiringPi/wiringPi/*.c')+['wiringpi_wrap.c'] ) setup( name = 'wiringpi2', - version = '1.0.10', + version = '1.1.1', author = "Philip Howard", author_email = "phil@gadgetoid.com", url = 'https://github.com/Gadgetoid/WiringPi2-Python/', @@ -57,43 +22,5 @@ setup( ext_modules = [ _wiringpi2 ], py_modules = ["wiringpi2"], install_requires=[], - headers=[ - 'WiringPi/wiringPi/wiringPi.h', - 'WiringPi/wiringPi/wiringPi.h', - 'WiringPi/wiringPi/wiringPiI2C.h', - 'WiringPi/wiringPi/wiringPiSPI.h', - 'WiringPi/wiringPi/wiringSerial.h', - 'WiringPi/wiringPi/wiringShift.h', - 'WiringPi/devLib/ds1302.h', - 'WiringPi/devLib/font.h', - 'WiringPi/devLib/gertboard.h', - 'WiringPi/devLib/lcd128x64.h', - 'WiringPi/devLib/lcd.h', - 'WiringPi/devLib/maxdetect.h', - 'WiringPi/devLib/piFace.h', - 'WiringPi/devLib/piGlow.h', - 'WiringPi/devLib/piNes.h', - 'WiringPi/wiringPi/drcSerial.h', - 'WiringPi/wiringPi/max31855.h', - 'WiringPi/wiringPi/max5322.h', - 'WiringPi/wiringPi/mcp23008.h', - 'WiringPi/wiringPi/mcp23016.h', - 'WiringPi/wiringPi/mcp23016reg.h', - 'WiringPi/wiringPi/mcp23017.h', - 'WiringPi/wiringPi/mcp23s08.h', - 'WiringPi/wiringPi/mcp23s17.h', - 'WiringPi/wiringPi/mcp23x0817.h', - 'WiringPi/wiringPi/mcp23x08.h', - 'WiringPi/wiringPi/mcp3002.h', - 'WiringPi/wiringPi/mcp3004.h', - 'WiringPi/wiringPi/mcp3422.h', - 'WiringPi/wiringPi/mcp4802.h', - 'WiringPi/wiringPi/pcf8574.h', - 'WiringPi/wiringPi/pcf8591.h', - 'WiringPi/wiringPi/sn3218.h', - 'WiringPi/wiringPi/softPwm.h', - 'WiringPi/wiringPi/softServo.h', - 'WiringPi/wiringPi/softTone.h', - 'WiringPi/wiringPi/sr595.h' - ] + headers=glob('WiringPi/wiringPi/*.h')+glob('WiringPi/devLib/*.h') )