Przeglądaj źródła

Merged in changes from official WiringPi master branch (commit 1ad03dd326)

pull/157/head
Jim Parziale 2 lat temu
rodzic
commit
3cf1d238b5
100 zmienionych plików z 177 dodań i 427 usunięć
  1. +16
    -0
      .github/workflows/build.yml
  2. +2
    -17
      README.md
  3. +1
    -1
      VERSION
  4. +0
    -16
      build
  5. +5
    -2
      debian-template/wiringPi/DEBIAN/control
  6. +1
    -1
      debian/control
  7. +1
    -1
      devLib/Makefile
  8. +1
    -1
      devLib/ds1302.c
  9. +1
    -1
      devLib/ds1302.h
  10. +1
    -1
      devLib/gertboard.c
  11. +1
    -1
      devLib/gertboard.h
  12. +1
    -1
      devLib/lcd.c
  13. +1
    -1
      devLib/lcd.h
  14. +1
    -1
      devLib/lcd128x64.c
  15. +1
    -1
      devLib/lcd128x64.h
  16. +1
    -1
      devLib/maxdetect.c
  17. +1
    -1
      devLib/maxdetect.h
  18. +1
    -1
      devLib/piFace.c
  19. +1
    -1
      devLib/piFace.h
  20. +1
    -1
      devLib/piFaceOld.c
  21. +1
    -1
      devLib/piGlow.c
  22. +1
    -1
      devLib/piGlow.h
  23. +1
    -1
      devLib/piNes.c
  24. +1
    -1
      devLib/piNes.h
  25. +1
    -1
      devLib/scrollPhat.c
  26. +1
    -1
      devLib/scrollPhat.h
  27. +1
    -1
      devLib/scrollPhatFont.h
  28. +0
    -1
      do-git.sh
  29. +3
    -3
      examples/Gertboard/buttons.c
  30. +3
    -3
      examples/Gertboard/gertboard.c
  31. +2
    -2
      examples/Gertboard/temperature.c
  32. +2
    -2
      examples/Gertboard/voltmeter.c
  33. +1
    -1
      examples/Makefile
  34. +1
    -1
      examples/PiFace/Makefile
  35. +2
    -2
      examples/PiFace/blink.c
  36. +2
    -2
      examples/PiFace/buttons.c
  37. +2
    -2
      examples/PiFace/metro.c
  38. +2
    -2
      examples/PiFace/motor.c
  39. +2
    -2
      examples/PiFace/reaction.c
  40. +1
    -1
      examples/PiGlow/Makefile
  41. +1
    -1
      examples/PiGlow/piGlow0.c
  42. +1
    -1
      examples/PiGlow/piGlow1.c
  43. +1
    -1
      examples/PiGlow/piglow.c
  44. +2
    -2
      examples/blink-thread.c
  45. +2
    -2
      examples/blink.c
  46. +2
    -2
      examples/blink.rtb
  47. +2
    -2
      examples/blink.sh
  48. +2
    -2
      examples/blink12.c
  49. +3
    -3
      examples/blink12drcs.c
  50. +2
    -2
      examples/blink6drcs.c
  51. +2
    -2
      examples/blink8-drcn.c
  52. +2
    -2
      examples/blink8.c
  53. +1
    -1
      examples/clock.c
  54. +2
    -2
      examples/delayTest.c
  55. +1
    -1
      examples/ds1302.c
  56. +2
    -2
      examples/header.h
  57. +3
    -3
      examples/isr-osc.c
  58. +7
    -6
      examples/isr.c
  59. +1
    -3
      examples/isr1.c
  60. +3
    -3
      examples/lcd-adafruit.c
  61. +4
    -4
      examples/lcd.c
  62. +1
    -1
      examples/lowPower.c
  63. +1
    -1
      examples/max31855.c
  64. +2
    -2
      examples/nes.c
  65. +2
    -2
      examples/okLed.c
  66. +2
    -4
      examples/pwm.c
  67. +1
    -1
      examples/q2w/Makefile
  68. +2
    -2
      examples/q2w/binary.c
  69. +2
    -2
      examples/q2w/blink-io.c
  70. +2
    -2
      examples/q2w/blink.c
  71. +2
    -2
      examples/q2w/blink.sh
  72. +2
    -2
      examples/q2w/bright.c
  73. +2
    -2
      examples/q2w/button.c
  74. +2
    -2
      examples/q2w/volts.c
  75. +2
    -2
      examples/rht03.c
  76. +1
    -1
      examples/scrollPhat/Makefile
  77. +3
    -3
      examples/scrollPhat/scphat.c
  78. +3
    -3
      examples/scrollPhat/test.c
  79. +2
    -2
      examples/serialRead.c
  80. +2
    -2
      examples/serialTest.c
  81. +4
    -4
      examples/servo.c
  82. +2
    -2
      examples/softPwm.c
  83. +2
    -2
      examples/softTone.c
  84. +2
    -2
      examples/speed.c
  85. +1
    -1
      examples/spiSpeed.c
  86. +0
    -111
      examples/test1.c
  87. +0
    -58
      examples/test2.c
  88. +0
    -59
      examples/tone.c
  89. +1
    -1
      examples/wfi.c
  90. +1
    -1
      gpio/Makefile
  91. +1
    -2
      gpio/gpio.1
  92. +1
    -1
      gpio/gpio.c
  93. +1
    -1
      gpio/readall.c
  94. +4
    -1
      newVersion
  95. +1
    -1
      pins/pins.tex
  96. +2
    -2
      version.h
  97. +1
    -1
      wiringPi/Makefile
  98. +0
    -8
      wiringPi/README
  99. +1
    -1
      wiringPi/ads1115.c
  100. +1
    -1
      wiringPi/ads1115.h

+ 16
- 0
.github/workflows/build.yml Wyświetl plik

@@ -0,0 +1,16 @@
name: Build

on:
pull_request:
push:
branches:
- master

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run build
run: |
./build

+ 2
- 17
README.md Wyświetl plik

@@ -1,19 +1,3 @@
Unofficial WiringPi Mirror
==========================
This is an unofficial mirror of WiringPi. I have made my own changes to the repository,
including updates for RaspberryPi 4. I'm not sure if the changes are complete, and I
don't guarantee that everything works. I just needed to have some things working for my Pi4.

Pull-requests are not currently accepted, since this is a mirror.

For support, comments, questions, etc please join the WiringPi Discord channel: https://discord.gg/SM4WUVG

-Nuncio


Official Unofficial WiringPi README
===================================

WiringPi (Unofficial Mirror/Fork)
=================================

@@ -43,6 +27,7 @@ Support

Please do not email Gordon if you have issues, he will not be able to help.

Pull-requests are not currently accepted, since this is a mirror.
Pull-requests may be accepted to add or fix support for newer hardware, but new features or
other changes may not be accepted.

For support, comments, questions, etc please join the WiringPi Discord channel: https://discord.gg/SM4WUVG

+ 1
- 1
VERSION Wyświetl plik

@@ -1 +1 @@
2.62
2.70

+ 0
- 16
build Wyświetl plik

@@ -115,22 +115,6 @@ fi

hardware=`fgrep Hardware /proc/cpuinfo | head -1 | awk '{ print $3 }'`

# if [ x$hardware != "xBCM2708" ]; then
# echo ""
# echo " +------------------------------------------------------------+"
# echo " | wiringPi is designed to run on the Raspberry Pi only. |"
# echo " | This processor does not appear to be a Raspberry Pi. |"
# echo " +------------------------------------------------------------+"
# echo " | In the unlikely event that you think it is a Raspberry Pi, |"
# echo " | then please accept my apologies and email the contents of |"
# echo " | /proc/cpuinfo to projects@drogon.net. |"
# echo " | - Thanks, Gordon |"
# echo " +------------------------------------------------------------+"
# echo ""
# exit 1
# fi


echo
echo "WiringPi Library"
cd wiringPi


+ 5
- 2
debian-template/wiringPi/DEBIAN/control Wyświetl plik

@@ -1,10 +1,13 @@
Package: wiringpi
Version: 2.61
Version: 2.70
Section: libraries
Priority: optional
Architecture: armhf
Depends: libc6
Maintainer: Gordon Henderson <projects@drogon.net>
Maintainer: Phil Howard <wiringpi@gadgetoid.com>
Uploaders: Phil Howard <wiringpi@gadgetoid.com>
Description: The wiringPi libraries, headers and gpio command
Libraries to allow GPIO access on a Raspberry Pi from C and C++
and BASIC programs as well as from the command-line
Homepage: https://github.com/WiringPi/WiringPi/
Bugs: https://github.com/WiringPi/WiringPi/

+ 1
- 1
debian/control Wyświetl plik

@@ -3,7 +3,7 @@ Section: electronics
Priority: optional
Maintainer: Ian Jackson <ijackson@chiark.greenend.org.uk>
Standards-Version: 3.8.0
Homepage: http://wiringpi.com/
Homepage: https://github.com/WiringPi/WiringPi
Build-Depends: debhelper (>= 8)

Package: libwiringpi2


+ 1
- 1
devLib/Makefile Wyświetl plik

@@ -5,7 +5,7 @@
# Copyright (c) 2012-2016 Gordon Henderson
#################################################################################
# This file is part of wiringPi:
# https://projects.drogon.net/raspberry-pi/wiringpi/
# https://github.com/wiringPi/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


+ 1
- 1
devLib/ds1302.c Wyświetl plik

@@ -5,7 +5,7 @@
* Copyright (c) 2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 1
- 1
devLib/ds1302.h Wyświetl plik

@@ -5,7 +5,7 @@
* Copyright (c) 2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 1
- 1
devLib/gertboard.c Wyświetl plik

@@ -13,7 +13,7 @@
*
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/WiringPi/
*
* wiringPi is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as


+ 1
- 1
devLib/gertboard.h Wyświetl plik

@@ -8,7 +8,7 @@
*
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/WiringPi/
*
* wiringPi is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as


+ 1
- 1
devLib/lcd.c Wyświetl plik

@@ -7,7 +7,7 @@
* Copyright (c) 2012 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 1
- 1
devLib/lcd.h Wyświetl plik

@@ -7,7 +7,7 @@
* Copyright (c) 2012 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 1
- 1
devLib/lcd128x64.c Wyświetl plik

@@ -13,7 +13,7 @@
* Copyright (c) 2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 1
- 1
devLib/lcd128x64.h Wyświetl plik

@@ -4,7 +4,7 @@
* Copyright (c) 2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 1
- 1
devLib/maxdetect.c Wyświetl plik

@@ -5,7 +5,7 @@
* Copyright (c) 2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 1
- 1
devLib/maxdetect.h Wyświetl plik

@@ -5,7 +5,7 @@
* Copyright (c) 2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 1
- 1
devLib/piFace.c Wyświetl plik

@@ -6,7 +6,7 @@
* Copyright (c) 2012-2013 Gordon Henderson
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/WiringPi/
*
* wiringPi is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as


+ 1
- 1
devLib/piFace.h Wyświetl plik

@@ -4,7 +4,7 @@
* Copyright (c) 2012-2013 Gordon Henderson
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 1
- 1
devLib/piFaceOld.c Wyświetl plik

@@ -6,7 +6,7 @@
* has an MCP23S17 GPIO device connected via the SPI bus.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/WiringPi/
*
* wiringPi is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as


+ 1
- 1
devLib/piGlow.c Wyświetl plik

@@ -5,7 +5,7 @@
* Copyright (c) 2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 1
- 1
devLib/piGlow.h Wyświetl plik

@@ -5,7 +5,7 @@
* Copyright (c) 2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 1
- 1
devLib/piNes.c Wyświetl plik

@@ -4,7 +4,7 @@
* Copyright (c) 2012 Gordon Henderson
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/WiringPi/
*
* wiringPi is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as


+ 1
- 1
devLib/piNes.h Wyświetl plik

@@ -4,7 +4,7 @@
* Copyright (c) 2012 Gordon Henderson
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/WiringPi/
*
* wiringPi is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as


+ 1
- 1
devLib/scrollPhat.c Wyświetl plik

@@ -5,7 +5,7 @@
* Copyright (c) 2015 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 1
- 1
devLib/scrollPhat.h Wyświetl plik

@@ -5,7 +5,7 @@
* Copyright (c) 2015 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 1
- 1
devLib/scrollPhatFont.h Wyświetl plik

@@ -8,7 +8,7 @@
* Copyright (c) 2015-2016 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 0
- 1
do-git.sh Wyświetl plik

@@ -1 +0,0 @@
git pull origin

+ 3
- 3
examples/Gertboard/buttons.c Wyświetl plik

@@ -1,12 +1,12 @@
/*
* buttons.c:
* Read the Gertboard buttons. Each one will act as an on/off
* tiggle switch for 3 different LEDs
* toggle switch for 3 different LEDs
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 3
- 3
examples/Gertboard/gertboard.c Wyświetl plik

@@ -7,12 +7,12 @@
*
* We output a sine wave on D/A port 0 and sample A/D port 0. We then
* plot the input value on the terminal as a sort of vertical scrolling
* oscilloscipe.
* oscilloscope.
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/Gertboard/temperature.c Wyświetl plik

@@ -3,10 +3,10 @@
* Demonstrate use of the Gertboard A to D converter to make
* a simple thermometer using the LM35.
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/Gertboard/voltmeter.c Wyświetl plik

@@ -3,10 +3,10 @@
* Demonstrate use of the Gertboard A to D converter to make
* a simple voltmeter.
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 1
- 1
examples/Makefile Wyświetl plik

@@ -1,7 +1,7 @@
#
# Makefile:
# wiringPi - A "wiring" library for the Raspberry Pi
# https://projects.drogon.net/wiring-pi
# https://github.com/wiringPi/wiringPi
#
# Copyright (c) 2012-2015 Gordon Henderson
#################################################################################


+ 1
- 1
examples/PiFace/Makefile Wyświetl plik

@@ -1,7 +1,7 @@
#
# Makefile:
# wiringPi - A "wiring" library for the Raspberry Pi
# https://projects.drogon.net/wiring-pi
# https://github.com/wiringPi/wiringPi
#
# Copyright (c) 2012 Gordon Henderson
#################################################################################


+ 2
- 2
examples/PiFace/blink.c Wyświetl plik

@@ -2,10 +2,10 @@
* blink.c:
* Simple "blink" test for the PiFace interface board.
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/PiFace/buttons.c Wyświetl plik

@@ -4,10 +4,10 @@
*
* Read the buttons and output the same to the LEDs
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/PiFace/metro.c Wyświetl plik

@@ -2,10 +2,10 @@
* metronome.c:
* Simple test for the PiFace interface board.
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/PiFace/motor.c Wyświetl plik

@@ -4,10 +4,10 @@
* circuit via the 2 relays.
* Then add on an external transsitor to help with PWM.
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/PiFace/reaction.c Wyświetl plik

@@ -2,10 +2,10 @@
* reaction.c:
* Simple test for the PiFace interface board.
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 1
- 1
examples/PiGlow/Makefile Wyświetl plik

@@ -1,7 +1,7 @@
#
# Makefile:
# wiringPi - A "wiring" library for the Raspberry Pi
# https://projects.drogon.net/wiring-pi
# https://github.com/wiringPi/wiringPi
#
# Copyright (c) 2012-2015 Gordon Henderson
#################################################################################


+ 1
- 1
examples/PiGlow/piGlow0.c Wyświetl plik

@@ -8,7 +8,7 @@
* Copyright (c) 2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 1
- 1
examples/PiGlow/piGlow1.c Wyświetl plik

@@ -6,7 +6,7 @@
* Copyright (c) 2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 1
- 1
examples/PiGlow/piglow.c Wyświetl plik

@@ -6,7 +6,7 @@
* Copyright (c) 2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/blink-thread.c Wyświetl plik

@@ -3,10 +3,10 @@
* Standard "blink" program in wiringPi. Blinks an LED connected
* to the first GPIO pin.
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/blink.c Wyświetl plik

@@ -3,10 +3,10 @@
* Standard "blink" program in wiringPi. Blinks an LED connected
* to the first GPIO pin.
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/blink.rtb Wyświetl plik

@@ -1,10 +1,10 @@
// blink.rtb:
// Blink program in Return to Basic
//
// Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
// Copyright (c) 2012-2013 Gordon Henderson.
//**********************************************************************
// This file is part of wiringPi:
// https://projects.drogon.net/raspberry-pi/wiringpi/
// https://github.com/WiringPi/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


+ 2
- 2
examples/blink.sh Wyświetl plik

@@ -4,10 +4,10 @@
# Standard "blink" program in wiringPi. Blinks an LED connected
# to the first GPIO pin.
#
# Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
# Copyright (c) 2012-2013 Gordon Henderson.
#######################################################################
# This file is part of wiringPi:
# https://projects.drogon.net/raspberry-pi/wiringpi/
# https://github.com/WiringPi/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


+ 2
- 2
examples/blink12.c Wyświetl plik

@@ -3,10 +3,10 @@
* Simple sequence over the first 12 GPIO pins - LEDs
* Aimed at the Gertboard, but it's fairly generic.
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 3
- 3
examples/blink12drcs.c Wyświetl plik

@@ -2,12 +2,12 @@
* blink12drcs.c:
* Simple sequence over the first 12 GPIO pins - LEDs
* Aimed at the Gertboard, but it's fairly generic.
* This version uses DRC totalk to the ATmega on the Gertboard
* This version uses DRC to talk to the ATmega on the Gertboard
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/blink6drcs.c Wyświetl plik

@@ -4,10 +4,10 @@
* Aimed at the Gertduino, but it's fairly generic.
* This version uses DRC to talk to the ATmega on the Gertduino
*
* Copyright (c) 2012-2014 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2014 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/blink8-drcn.c Wyświetl plik

@@ -3,10 +3,10 @@
* 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>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/blink8.c Wyświetl plik

@@ -3,10 +3,10 @@
* Simple sequence over the first 8 GPIO pins - LEDs
* Aimed at the Gertboard, but it's fairly generic.
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 1
- 1
examples/clock.c Wyświetl plik

@@ -16,7 +16,7 @@
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/delayTest.c Wyświetl plik

@@ -3,10 +3,10 @@
* Just a little test program I'm using to experiment with
* various timings and latency, etc.
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 1
- 1
examples/ds1302.c Wyświetl plik

@@ -5,7 +5,7 @@
* Copyright (c) 2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/header.h Wyświetl plik

@@ -1,10 +1,10 @@
/*
* file.c:
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 3
- 3
examples/isr-osc.c Wyświetl plik

@@ -5,7 +5,7 @@
* How to test:
*
* IMPORTANT: To run this test we connect 2 GPIO pins together, but
* before we do that YOU must make sure that they are both setup
* before we do that YOU must make sure that they are both set up
* the right way. If they are set to outputs and one is high and one low,
* then you connect the wire, you'll create a short and that won't be good.
*
@@ -23,10 +23,10 @@
* then do the up/down toggling for itself and run at full speed, and
* it will report the number of interrupts recieved every second.
*
* Copyright (c) 2013 Gordon Henderson. projects@drogon.net
* Copyright (c) 2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 7
- 6
examples/isr.c Wyświetl plik

@@ -14,7 +14,7 @@
* Copyright (c) 2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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
@@ -29,8 +29,6 @@
* You should have received a copy of the GNU Lesser General Public License
* along with wiringPi. If not, see <http://www.gnu.org/licenses/>.
***********************************************************************
* Updates: 2021 J. Parziale
***********************************************************************
*/

#include <stdio.h>
@@ -81,11 +79,13 @@ int main (void)
int gotOne, pin ;
int myCounter [8] ;

for (pin = 0 ; pin < 8 ; ++pin) {
for (pin = 0 ; pin < 8 ; ++pin)
{
globalCounter [pin] = myCounter [pin] = 0 ;
}

if (wiringPiSetup() < 0) {
if (wiringPiSetup() < 0)
{
fprintf(stderr, "Unable to setup wiringPi: %s\n", strerror(errno));
return 1;
}
@@ -111,7 +111,8 @@ int main (void)
signal(SIGUSR1, Signal_handler);
signal(SIGUSR2, Signal_handler);

while (!terminate_process) {
while (!terminate_process)
{
gotOne = 0 ;
printf("Waiting ... ");
fflush(stdout);


+ 1
- 3
examples/isr1.c Wyświetl plik

@@ -14,7 +14,7 @@
* Copyright (c) 2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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
@@ -29,8 +29,6 @@
* You should have received a copy of the GNU Lesser General Public License
* along with wiringPi. If not, see <http://www.gnu.org/licenses/>.
***********************************************************************
* Updates: 2021 J. Parziale
***********************************************************************
*/

#include <stdio.h>


+ 3
- 3
examples/lcd-adafruit.c Wyświetl plik

@@ -7,7 +7,7 @@
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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
@@ -271,8 +271,8 @@ int main (int argc, char *argv[])

adafruitLCDSetup (colour) ;

lcdPosition (lcdHandle, 0, 0) ; lcdPuts (lcdHandle, "Gordon Henderson") ;
lcdPosition (lcdHandle, 0, 1) ; lcdPuts (lcdHandle, " wiringpi.com ") ;
lcdPosition (lcdHandle, 0, 0) ; lcdPuts (lcdHandle, " Hello World ") ;
lcdPosition (lcdHandle, 0, 1) ; lcdPuts (lcdHandle, " wiringpi ") ;

waitForEnter () ;



+ 4
- 4
examples/lcd.c Wyświetl plik

@@ -19,7 +19,7 @@
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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
@@ -215,14 +215,14 @@ int main (int argc, char *argv[])
return -1 ;
}

lcdPosition (lcdHandle, 0, 0) ; lcdPuts (lcdHandle, "Gordon Henderson") ;
lcdPosition (lcdHandle, 0, 1) ; lcdPuts (lcdHandle, " wiringpi.com ") ;
lcdPosition (lcdHandle, 0, 0) ; lcdPuts (lcdHandle, "Hello World") ;
lcdPosition (lcdHandle, 0, 1) ; lcdPuts (lcdHandle, " wiringpi ") ;

waitForEnter () ;

if (rows > 1)
{
lcdPosition (lcdHandle, 0, 1) ; lcdPuts (lcdHandle, " wiringpi.com ") ;
lcdPosition (lcdHandle, 0, 1) ; lcdPuts (lcdHandle, " wiringpi ") ;

if (rows == 4)
{


+ 1
- 1
examples/lowPower.c Wyświetl plik

@@ -9,7 +9,7 @@
* Copyright (c) 2014 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 1
- 1
examples/max31855.c Wyświetl plik

@@ -5,7 +5,7 @@
* Copyright (c) 2015 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/nes.c Wyświetl plik

@@ -2,10 +2,10 @@
* nes.c:
* Test program for an old NES controller connected to the Pi.
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/okLed.c Wyświetl plik

@@ -9,10 +9,10 @@
* e.g. by putting it in /etc/rc.local and running it in the
* background &
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 4
examples/pwm.c Wyświetl plik

@@ -2,10 +2,10 @@
* pwm.c:
* This tests the hardware PWM channel.
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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
@@ -20,8 +20,6 @@
* You should have received a copy of the GNU Lesser General Public License
* along with wiringPi. If not, see <http://www.gnu.org/licenses/>.
***********************************************************************
* Updates: 2021 J. Parziale
***********************************************************************
*/

#include <wiringPi.h>


+ 1
- 1
examples/q2w/Makefile Wyświetl plik

@@ -1,7 +1,7 @@
#
# Makefile:
# wiringPi - A "wiring" library for the Raspberry Pi
# https://projects.drogon.net/wiring-pi
# https://github.com/wiringPi/wiringPi
#
# Copyright (c) 2012-2013 Gordon Henderson
#################################################################################


+ 2
- 2
examples/q2w/binary.c Wyświetl plik

@@ -3,10 +3,10 @@
* Using the Quick 2 wire 16-bit GPIO expansion board to output
* a binary counter.
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/q2w/blink-io.c Wyświetl plik

@@ -2,10 +2,10 @@
* blink-io.c:
* Simple "blink" test for the Quick2Wire 16-pin IO board.
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/q2w/blink.c Wyświetl plik

@@ -2,10 +2,10 @@
* blink.c:
* Simple "blink" test for the Quick2Wire interface board.
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/q2w/blink.sh Wyświetl plik

@@ -4,10 +4,10 @@
# Standard "blink" program in wiringPi. Blinks an LED connected
# to the LED on the Quick2Wire board
#
# Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
# Copyright (c) 2012-2013 Gordon Henderson.
#######################################################################
# This file is part of wiringPi:
# https://projects.drogon.net/raspberry-pi/wiringpi/
# https://github.com/WiringPi/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


+ 2
- 2
examples/q2w/bright.c Wyświetl plik

@@ -2,10 +2,10 @@
* bright.c:
* Vary the Q2W LED brightness with the analog card
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/q2w/button.c Wyświetl plik

@@ -2,10 +2,10 @@
* button.c:
* Simple button test for the Quick2Wire interface board.
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/q2w/volts.c Wyświetl plik

@@ -2,10 +2,10 @@
* volts.c:
* Read in all 4 analogs on the Q2W analog board.
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/rht03.c Wyświetl plik

@@ -2,10 +2,10 @@
* rht03.c:
* Driver for the MaxDetect series sensors
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 1
- 1
examples/scrollPhat/Makefile Wyświetl plik

@@ -1,7 +1,7 @@
#
# Makefile:
# wiringPi - A "wiring" library for the Raspberry Pi
# https://projects.drogon.net/wiring-pi
# https://github.com/wiringPi/wiringPi
#
# Copyright (c) 2012-2015 Gordon Henderson
#################################################################################


+ 3
- 3
examples/scrollPhat/scphat.c Wyświetl plik

@@ -1,12 +1,12 @@
/*
* scphat.c:
* Little program to allow use of the Pimoroni Sctoll Phat
* Little program to allow use of the Pimoroni Scroll pHAT
* from the command-line.
*
* Copyright (c) 2015-2016 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2015-2016 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 3
- 3
examples/scrollPhat/test.c Wyświetl plik

@@ -1,11 +1,11 @@
/*
* test.c:
* Little test program forthe Pimoroni Scroll Phat.
* Little test program for the Pimoroni Scroll pHAT.
*
* Copyright (c) 2015-2016 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2015-2016 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/serialRead.c Wyświetl plik

@@ -2,10 +2,10 @@
* serial.c:
* Example program to read bytes from the Serial line
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/serialTest.c Wyświetl plik

@@ -3,10 +3,10 @@
* Very simple program to test the serial port. Expects
* the port to be looped back to itself
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 4
- 4
examples/servo.c Wyświetl plik

@@ -3,10 +3,10 @@
* Test of the softServo code.
* Do not use this code - use the servoBlaster kernel module instead
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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
@@ -45,7 +45,7 @@ int main()

softServoSetup(cPin, -1, -1, -1, -1, -1, -1, -1);

/*
/*
softServoWrite(1, -250);
delay(1000);
softServoWrite(1, 0);
@@ -60,7 +60,7 @@ int main()
delay(1000);
softServoWrite(1, 1250);
delay(1000);
*/
*/

/*
softServoWrite (1, 1000) ; delay(1000);


+ 2
- 2
examples/softPwm.c Wyświetl plik

@@ -3,10 +3,10 @@
* Test of the software PWM driver. Needs 8 LEDs connected
* to the Pi - e.g. Ladder board.
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/softTone.c Wyświetl plik

@@ -3,10 +3,10 @@
* Test of the softTone module in wiringPi
* Plays a scale out on pin 3 - connect pizeo disc to pin 3 & 0v
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 2
- 2
examples/speed.c Wyświetl plik

@@ -3,10 +3,10 @@
* Simple program to measure the speed of the various GPIO
* access mechanisms.
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 1
- 1
examples/spiSpeed.c Wyświetl plik

@@ -4,7 +4,7 @@
* Copyright (c) 2014 Gordon Henderson
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/WiringPi/
*
* wiringPi is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as


+ 0
- 111
examples/test1.c Wyświetl plik

@@ -1,111 +0,0 @@
/*
* test1.c:
* Simple test program to test the wiringPi functions
* This is a sequencer to make a patter appear on 8 LEDs
* connected to the GPIO pins.
*
* 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 <wiringPi.h>

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>


// Simple sequencer data
// Triplets of LED, On/Off and delay

uint8_t data [] =
{
0, 1, 1,
1, 1, 1,
0, 0, 0, 2, 1, 1,
1, 0, 0, 3, 1, 1,
2, 0, 0, 4, 1, 1,
3, 0, 0, 5, 1, 1,
4, 0, 0, 6, 1, 1,
5, 0, 0, 7, 1, 1,
6, 0, 1,
7, 0, 1,

0, 0, 1, // Extra delay

// Back again

7, 1, 1,
6, 1, 1,
7, 0, 0, 5, 1, 1,
6, 0, 0, 4, 1, 1,
5, 0, 0, 3, 1, 1,
4, 0, 0, 2, 1, 1,
3, 0, 0, 1, 1, 1,
2, 0, 0, 0, 1, 1,
1, 0, 1,
0, 0, 1,

0, 0, 1, // Extra delay

9, 9, 9, // End marker

} ;


int main (void)
{
int pin ;
int dataPtr ;
int l, s, d ;

printf ("Raspberry Pi wiringPi test program\n") ;

if (wiringPiSetup () == -1)
exit (1) ;

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

pinMode (8, INPUT) ; // Pin 8 SDA0 - Has on-board 2k2 pull-up resistor

dataPtr = 0 ;

for (;;)
{
l = data [dataPtr++] ; // LED
s = data [dataPtr++] ; // State
d = data [dataPtr++] ; // Duration (10ths)

if ((l + s + d) == 27)
{
dataPtr = 0 ;
continue ;
}

digitalWrite (l, s) ;

if (digitalRead (8) == 0) // Pressed as our switch shorts to ground
delay (d * 10) ; // Faster!
else
delay (d * 100) ;
}

return 0 ;
}

+ 0
- 58
examples/test2.c Wyświetl plik

@@ -1,58 +0,0 @@
/*
* test2.c:
* This tests the hardware PWM channel.
*
* 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 <wiringPi.h>

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>

int main (void)
{
int bright ;

printf ("Raspberry Pi wiringPi PWM test program\n") ;

if (wiringPiSetup () == -1)
exit (1) ;

pinMode (1, PWM_OUTPUT) ;

for (;;)
{
for (bright = 0 ; bright < 1024 ; ++bright)
{
pwmWrite (1, bright) ;
delay (1) ;
}

for (bright = 1023 ; bright >= 0 ; --bright)
{
pwmWrite (1, bright) ;
delay (1) ;
}
}

return 0 ;
}

+ 0
- 59
examples/tone.c Wyświetl plik

@@ -1,59 +0,0 @@
/*
* tone.c:
* Test of the softTone module in wiringPi
* Plays a scale out on pin 3 - connect pizeo disc to pin 3 & 0v
*
* 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 <errno.h>
#include <string.h>

#include <wiringPi.h>
#include <softTone.h>

#define PIN 3

int scale [8] = { 262, 294, 330, 349, 392, 440, 494, 525 } ;

int main ()
{
int i ;

if (wiringPiSetup () == -1)
{
fprintf (stdout, "oops: %s\n", strerror (errno)) ;
return 1 ;
}

softToneCreate (PIN) ;

for (;;)
{
for (i = 0 ; i < 8 ; ++i)
{
printf ("%3d\n", i) ;
softToneWrite (PIN, scale [i]) ;
delay (500) ;
}
}

}

+ 1
- 1
examples/wfi.c Wyświetl plik

@@ -15,7 +15,7 @@
* Copyright (c) 2012-2013 Gordon Henderson.
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 1
- 1
gpio/Makefile Wyświetl plik

@@ -2,7 +2,7 @@
# Makefile:
# The gpio command:
# A swiss-army knige of GPIO shenanigans.
# https://projects.drogon.net/wiring-pi
# https://github.com/wiringPi/wiringPi
#
# Copyright (c) 2012-2016 Gordon Henderson
#################################################################################


+ 1
- 2
gpio/gpio.1 Wyświetl plik

@@ -105,7 +105,6 @@ BCM_GPIO pin numbers are always used with the export and edge commands.
This causes the named extension to be initialised. Extensions
comprise of a name (e.g. mcp23017) followed by a colon, then the
pin-base, then more optional parameters depending on the extension type.
See the web page on http://wiringpi.com/the-gpio-utility/

.TP
.B \-p
@@ -329,7 +328,7 @@ in future releases once the /dev/gpiomem interface is fully operational.
.LP
WiringPi's home page
.IP
http://wiringpi.com/
https://github.com/WiringPi/WiringPi/

.SH AUTHOR



+ 1
- 1
gpio/gpio.c Wyświetl plik

@@ -5,7 +5,7 @@
* Copyright (c) 2012-2018 Gordon Henderson
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 1
- 1
gpio/readall.c Wyświetl plik

@@ -4,7 +4,7 @@
* Copyright (c) 2012-2018 Gordon Henderson
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/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


+ 4
- 1
newVersion Wyświetl plik

@@ -40,8 +40,11 @@ Section: libraries
Priority: optional
Architecture: armhf
Depends: libc6
Maintainer: Gordon Henderson <projects@drogon.net>
Maintainer: Phil Howard <wiringpi@gadgetoid.com>
Uploaders: Phil Howard <wiringpi@gadgetoid.com>
Description: The wiringPi libraries, headers and gpio command
Libraries to allow GPIO access on a Raspberry Pi from C and C++
and BASIC programs as well as from the command-line
Homepage: https://github.com/WiringPi/WiringPi/
Bugs: https://github.com/WiringPi/WiringPi/
EOF

+ 1
- 1
pins/pins.tex Wyświetl plik

@@ -37,7 +37,7 @@

\begin{center}
\bfseries{WiringPi: GPIO Pin Numbering Tables}\\
\tt{http://wiringpi.com/}
\tt{https://github.com/WiringPi/WiringPi}
\end{center}

\begin{center}


+ 2
- 2
version.h Wyświetl plik

@@ -1,3 +1,3 @@
#define VERSION "2.62"
#define VERSION "2.70"
#define VERSION_MAJOR 2
#define VERSION_MINOR 62
#define VERSION_MINOR 70

+ 1
- 1
wiringPi/Makefile Wyświetl plik

@@ -5,7 +5,7 @@
# Copyright (c) 2012-2015 Gordon Henderson
#################################################################################
# This file is part of wiringPi:
# https://projects.drogon.net/raspberry-pi/wiringpi/
# https://github.com/wiringPi/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


+ 0
- 8
wiringPi/README Wyświetl plik

@@ -1,8 +0,0 @@

WiringPi
An implementation of most of the Arduino Wiring functions for the Raspberry Pi,
along with many more features and libraries to support hardware, etc. on the Raspberry Pi

Full details at:
https://github.com/WiringPi/WiringPi


+ 1
- 1
wiringPi/ads1115.c Wyświetl plik

@@ -4,7 +4,7 @@
* Copyright (c) 2016 Gordon Henderson
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/WiringPi/
*
* wiringPi is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as


+ 1
- 1
wiringPi/ads1115.h Wyświetl plik

@@ -4,7 +4,7 @@
* Copyright (c) 2016 Gordon Henderson
***********************************************************************
* This file is part of wiringPi:
* https://projects.drogon.net/raspberry-pi/wiringpi/
* https://github.com/WiringPi/WiringPi/
*
* wiringPi is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików

Ładowanie…
Anuluj
Zapisz