From 43ab9da950b98626b783d478c877aabead658132 Mon Sep 17 00:00:00 2001 From: sn dnv aps Date: Fri, 3 Apr 2015 13:03:55 +0000 Subject: [PATCH 1/7] README.md edited online with Bitbucket --- README.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..76f8c76 --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +wiringPi README +=============== + +Please note that the official way to get wiringPi is via git from +git.drogon.net and not GitHub. + +ie. + + git clone git://git.drogon.net/wiringPi + + + +The version of wiringPi held on GitHub by "Gadgetoid" is used to build the +wiringPython, Ruby, Perl, etc. wrappers for these other languages. This +version may lag the official Drogon release. Pull requests may not be +accepted to Github.... + +Please see + + http://wiringpi.com/ + +for the official documentation, etc. and the best way to submit bug reports, etc. +is by sending an email to projects@drogon.net + +Thanks! + + -Gordon + + + 同步 git://git.drogon.net/wiringPi 最新源代码到项目当中。 + 此修改基于 原来的master 分支 + + ` git remote add upstream git://git.drogon.net/wiringPi.git ` + + ` git fetch upstream master:upstream/master ` + + ` git merge upstream/master ` + + ` git push origin master:master ` \ No newline at end of file From de4c3d8f26de16b5fb7f437cbad6bbe0d52f689c Mon Sep 17 00:00:00 2001 From: dnv_aps sn Date: Tue, 5 May 2015 00:07:21 +0800 Subject: [PATCH 2/7] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 76f8c76..b23ced8 100644 --- a/README.md +++ b/README.md @@ -30,10 +30,10 @@ Thanks! 同步 git://git.drogon.net/wiringPi 最新源代码到项目当中。 此修改基于 原来的master 分支 - ` git remote add upstream git://git.drogon.net/wiringPi.git ` + ` git remote add upstream git://git.drogon.net/wiringPi ` ` git fetch upstream master:upstream/master ` ` git merge upstream/master ` - ` git push origin master:master ` \ No newline at end of file + ` git push origin master:master ` From f3ad069353d41e6982c02974dd3bf48bb68ebcd5 Mon Sep 17 00:00:00 2001 From: sndnvaps Date: Tue, 5 May 2015 01:59:59 +0800 Subject: [PATCH 3/7] [build] add cmake support Signed-off-by: sndnvaps --- CMakeLists.txt | 7 +++++++ devLib/CMakeLists.txt | 9 +++++++++ gpio/CMakeLists.txt | 11 +++++++++++ wiringPi/CMakeLists.txt | 39 +++++++++++++++++++++++++++++++++++++++ wiringPi/CMakeLists.txt~ | 20 ++++++++++++++++++++ 5 files changed, 86 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 devLib/CMakeLists.txt create mode 100644 gpio/CMakeLists.txt create mode 100644 wiringPi/CMakeLists.txt create mode 100644 wiringPi/CMakeLists.txt~ diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..5e9ae47 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8) +project(WiringPi_lib) + +add_subdirectory(devLib) +add_subdirectory(gpio) +#add_subdirectory(pins) +add_subdirectory(wiringPi) diff --git a/devLib/CMakeLists.txt b/devLib/CMakeLists.txt new file mode 100644 index 0000000..6406b5e --- /dev/null +++ b/devLib/CMakeLists.txt @@ -0,0 +1,9 @@ +set(devLib_src ds1302.c maxdetect.c piNes.c gertboard.c piFace.c lcd128x64.c lcd.c piGlow.c) +set(LIB_INSTALL_PATH /usr/lib) +add_library(libwiringPiDev SHARED ${devLib_src}) +set(LIBRARY_OUTPUT_PATH {LIB_INSTALL_PATH) +add_definitions("-lpthread") +set_target_properties(libwiringPiDev PROPERTIES OUTPUT_NAME "wiringPiDev") +install(TARGETS libwiringPiDev DESTINATION ${LIB_INSTALL_PATH}) + + diff --git a/gpio/CMakeLists.txt b/gpio/CMakeLists.txt new file mode 100644 index 0000000..fe73066 --- /dev/null +++ b/gpio/CMakeLists.txt @@ -0,0 +1,11 @@ +include_directories(${PROJECT_SOURCE_DIR}/devLib) +include_directories(${PROJECT_SOURCE_DIR}/wiringPi) +#project(gpio) +set(GPIO_SRC gpio.c readall.c pins.c) +set(GPIO_BINARY_PATH /usr/bin) +add_executable(gpio ${GPIO_SRC}) +target_link_libraries(gpio libwiringPi libwiringPiDev -lpthread -lm) +set(EXECUTABLE_OUTPUT_PATH ${GPIO_BINARY_PATH}) +install(TARGETS gpio + RUNTIME DESTINATION bin) + diff --git a/wiringPi/CMakeLists.txt b/wiringPi/CMakeLists.txt new file mode 100644 index 0000000..2904813 --- /dev/null +++ b/wiringPi/CMakeLists.txt @@ -0,0 +1,39 @@ +set(wiringPi_src wiringPi.c + wiringSerial.c wiringShift.c + piHiPri.c piThread.c + wiringPiSPI.c wiringPiI2C.c + softPwm.c softTone.c + mcp23008.c mcp23016.c mcp23017.c + mcp23s08.c mcp23s17.c + sr595.c + pcf8574.c pcf8591.c + mcp3002.c mcp3004.c mcp4802.c mcp3422.c + max31855.c max5322.c + sn3218.c + drcSerial.c + wpiExtensions.c) +set(LIB_INSTALL_PATH /usr/lib) +set(LIB_INSTALL_HEADERS_PATH /usr/local) +add_library(libwiringPi SHARED ${wiringPi_src}) +set(LIBRARY_OUTPUT_PATH {LIB_INSTALL_PATH) +add_definitions("-lpthread") +set_target_properties(libwiringPi PROPERTIES OUTPUT_NAME "wiringPi") + +set(root_HEADERS + wiringPi.h + wiringSerial.h wiringShift.h + wiringPiSPI.h wiringPiI2C.h + softPwm.h softTone.h + mcp23008.h mcp23016.h mcp23017.h + mcp23s08.h mcp23s17.h + sr595.h + pcf8574.h pcf8591.h + mcp3002.h mcp3004.h mcp4802.h mcp3422.h + max31855.h max5322.h + sn3218.h + drcSerial.h + wpiExtensions.h +) + +install(FILES ${root_HEADERS} DESTINATION ${LIB_INSTALL_HEADERS_PATH}/include) +install(TARGETS libwiringPi DESTINATION ${LIB_INSTALL_PATH}) diff --git a/wiringPi/CMakeLists.txt~ b/wiringPi/CMakeLists.txt~ new file mode 100644 index 0000000..275a970 --- /dev/null +++ b/wiringPi/CMakeLists.txt~ @@ -0,0 +1,20 @@ +set(wiringPi_src wiringPi.c + wiringSerial.c wiringShift.c + piHiPri.c piThread.c + wiringPiSPI.c wiringPiI2C.c + softPwm.c softTone.c + mcp23008.c mcp23016.c mcp23017.c + mcp23s08.c mcp23s17.c + sr595.c + pcf8574.c pcf8591.c + mcp3002.c mcp3004.c mcp4802.c mcp3422.c + max31855.c max5322.c + sn3218.c + drcSerial.c + wpiExtensions.c) +set(LIB_INSTALL_PATH /usr/lib) +add_library(libwiringPi SHARED ${wiringPi_src}) +set(LIBRARY_OUTPUT_PATH {LIB_INSTALL_PATH) +set_target_properties(libwiringPi PROPERTIES OUTPUT_NAME "wiringPi") + + From 649f0cfe772595e1baae7fa824d8f7c5e81734f4 Mon Sep 17 00:00:00 2001 From: dnv_aps sn Date: Fri, 7 Oct 2016 01:45:04 +0800 Subject: [PATCH 4/7] wiringPi/CMakeLists.txt ,update for lastest change [part 1] --- wiringPi/CMakeLists.txt | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/wiringPi/CMakeLists.txt b/wiringPi/CMakeLists.txt index 2904813..cb7816e 100644 --- a/wiringPi/CMakeLists.txt +++ b/wiringPi/CMakeLists.txt @@ -1,16 +1,13 @@ set(wiringPi_src wiringPi.c wiringSerial.c wiringShift.c piHiPri.c piThread.c - wiringPiSPI.c wiringPiI2C.c - softPwm.c softTone.c + wiringPiSPI.c wiringPiI2C.c + softPwm.c softTone.c ads1115.c mcp23008.c mcp23016.c mcp23017.c - mcp23s08.c mcp23s17.c - sr595.c - pcf8574.c pcf8591.c + mcp23s08.c mcp23s17.c sr595.c + pcf8574.c pcf8591.c sn3218.c mcp3002.c mcp3004.c mcp4802.c mcp3422.c - max31855.c max5322.c - sn3218.c - drcSerial.c + max31855.c max5322.c drcSerial.c wpiExtensions.c) set(LIB_INSTALL_PATH /usr/lib) set(LIB_INSTALL_HEADERS_PATH /usr/local) @@ -23,17 +20,15 @@ set(root_HEADERS wiringPi.h wiringSerial.h wiringShift.h wiringPiSPI.h wiringPiI2C.h - softPwm.h softTone.h + softPwm.h softTone.h mcp23008.h mcp23016.h mcp23017.h - mcp23s08.h mcp23s17.h - sr595.h - pcf8574.h pcf8591.h + mcp23s08.h mcp23s17.h + sr595.h ads1115.h + pcf8574.h pcf8591.h mcp3002.h mcp3004.h mcp4802.h mcp3422.h max31855.h max5322.h - sn3218.h - drcSerial.h - wpiExtensions.h -) + sn3218.h drcSerial.h + wpiExtensions.h) install(FILES ${root_HEADERS} DESTINATION ${LIB_INSTALL_HEADERS_PATH}/include) install(TARGETS libwiringPi DESTINATION ${LIB_INSTALL_PATH}) From a7bb06ac679e759332bb7979643b7eb29ec5d6cb Mon Sep 17 00:00:00 2001 From: dnv_aps sn Date: Fri, 7 Oct 2016 01:45:26 +0800 Subject: [PATCH 5/7] Delete CMakeLists.txt~ --- wiringPi/CMakeLists.txt~ | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 wiringPi/CMakeLists.txt~ diff --git a/wiringPi/CMakeLists.txt~ b/wiringPi/CMakeLists.txt~ deleted file mode 100644 index 275a970..0000000 --- a/wiringPi/CMakeLists.txt~ +++ /dev/null @@ -1,20 +0,0 @@ -set(wiringPi_src wiringPi.c - wiringSerial.c wiringShift.c - piHiPri.c piThread.c - wiringPiSPI.c wiringPiI2C.c - softPwm.c softTone.c - mcp23008.c mcp23016.c mcp23017.c - mcp23s08.c mcp23s17.c - sr595.c - pcf8574.c pcf8591.c - mcp3002.c mcp3004.c mcp4802.c mcp3422.c - max31855.c max5322.c - sn3218.c - drcSerial.c - wpiExtensions.c) -set(LIB_INSTALL_PATH /usr/lib) -add_library(libwiringPi SHARED ${wiringPi_src}) -set(LIBRARY_OUTPUT_PATH {LIB_INSTALL_PATH) -set_target_properties(libwiringPi PROPERTIES OUTPUT_NAME "wiringPi") - - From cf02425330e188abab56ea58c08b1d73b2d7c20a Mon Sep 17 00:00:00 2001 From: dnv_aps sn Date: Fri, 7 Oct 2016 01:47:45 +0800 Subject: [PATCH 6/7] devLib/CMakeLists.txt update for lastest change [part 2] --- devLib/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devLib/CMakeLists.txt b/devLib/CMakeLists.txt index 6406b5e..08f5c41 100644 --- a/devLib/CMakeLists.txt +++ b/devLib/CMakeLists.txt @@ -1,4 +1,4 @@ -set(devLib_src ds1302.c maxdetect.c piNes.c gertboard.c piFace.c lcd128x64.c lcd.c piGlow.c) +set(devLib_src ds1302.c maxdetect.c scrollPhat.c piNes.c gertboard.c piFace.c lcd128x64.c lcd.c piGlow.c) set(LIB_INSTALL_PATH /usr/lib) add_library(libwiringPiDev SHARED ${devLib_src}) set(LIBRARY_OUTPUT_PATH {LIB_INSTALL_PATH) From 6d172377cea5940f49cf3130ff9590f047ff1615 Mon Sep 17 00:00:00 2001 From: dnv_aps sn Date: Fri, 7 Oct 2016 20:17:56 +0800 Subject: [PATCH 7/7] update devLib/CMakeLists.txt add scrollPhat.* --- devLib/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/devLib/CMakeLists.txt b/devLib/CMakeLists.txt index 08f5c41..062fc8a 100644 --- a/devLib/CMakeLists.txt +++ b/devLib/CMakeLists.txt @@ -1,9 +1,15 @@ set(devLib_src ds1302.c maxdetect.c scrollPhat.c piNes.c gertboard.c piFace.c lcd128x64.c lcd.c piGlow.c) set(LIB_INSTALL_PATH /usr/lib) +set(LIB_INSTALL_HEADERS_PATH /usr/local) add_library(libwiringPiDev SHARED ${devLib_src}) set(LIBRARY_OUTPUT_PATH {LIB_INSTALL_PATH) add_definitions("-lpthread") set_target_properties(libwiringPiDev PROPERTIES OUTPUT_NAME "wiringPiDev") +set(root_HEADERS + ds1302.h gertboard.h lcd.h + lcd128x64.h maxdetect.h piFace.h + piGlow.h piNes.h scrollPhat.h scrollPhatFont.h) +install(FILES ${root_HEADERS} DESTINATION ${LIB_INSTALL_HEADERS_PATH}/include) install(TARGETS libwiringPiDev DESTINATION ${LIB_INSTALL_PATH})