Coder Social home page Coder Social logo

bpi-sinovoip / bpi-wiringpi Goto Github PK

View Code? Open in Web Editor NEW
35.0 12.0 24.0 567 KB

(OLD) Supports BananaPi BPI -M1 / M1Plus / M2 / M2P / M3, (NEW) Version On BPI-SINOVOIP/BPI-WiringPi2 (supoort all Banana Pi boards in one version)

Home Page: https://github.com/BPI-SINOVOIP/BPI-WiringPi2

License: GNU Lesser General Public License v3.0

Shell 2.76% Makefile 3.00% C 90.50% C++ 0.34% Groff 2.34% TeX 1.06%

bpi-wiringpi's Introduction

BPI-WiringPi README

This is a modified WiringPi for BPI boards. We call it BPI-WiringPi. It is based on the original WiringPi for Raspberry Pi created by Drogon. The modification is done by BPI-Team. The BPI-WiringPi API usage are the same to the original wiringPi. You can donwload the original wiringPi from: git clone https://github.com/BPI-SINOVOIP/BPI-WiringPi.

Download

For BPI-M1 / M1Plus

git clone https://github.com/BPI-SINOVOIP/BPI-WiringPi.git -b BPI_M1_M1Plus

For BPI-M2

git clone https://github.com/BPI-SINOVOIP/BPI-WiringPi.git -b BPI_M2

For BPI-M3

git clone https://github.com/BPI-SINOVOIP/BPI-WiringPi.git -b BPI_M3    

For BPI-M2P

git clone https://github.com/BPI-SINOVOIP/BPI-WiringPi.git -b BPI_M2P

Installation

cd BPI-WiringPi
chmod +x ./build
sudo ./build

Examples

You can go to folder "test folder" to test sample codes.

You can also use the examples and instructions provided by http://wiringpi.com/

And the source directory examples also has many demo.

Thanks!

BPI Team

bpi-wiringpi's People

Contributors

bpi-sinovoip avatar dangku avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bpi-wiringpi's Issues

R2-Support

Hi,
is R2 support planed?
what have to be changed/added to get wiringPI working for R2-Board

regards Frank

BPI-M3 wiringPi driver gpio problem

Hi, I have been installed wiringPi (git clone git://git.drogon.net/wiringPi), and found this version incorrect. Then I reinstall BPI-WiringPi(git clone https://github.com/BPI-SINOVOIP/BPI-WiringPi.git -b BPI_M3), then I try follows code:
#include <wiringPi.h>
#include "stdio.h"

int main(void)
{
wiringPiSetup() ;
pinMode (4, OUTPUT) ;
for(;;)
{
printf("test\r\n");
digitalWrite(4, HIGH) ; delay (500) ;
digitalWrite(4, LOW) ; delay (500) ;
}
}

when I run it, the gpio doesn't output higt and low. Do I need to uninstall wiringPi?

sudo ./build Link Error BPI_M2P on Ubuntu 16.04 mate

[Link]
/usr/bin/ld: gpio.o: undefined reference to symbol '__printf_chk@@GLIBC_2.4'
//lib/arm-linux-gnueabihf/libc.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:51: recipe for target 'gpio' failed
make: *** [gpio] Error 1

BPI M1 Plus

hi,
when i do :
gpio mode in
gpio read 1
result is always 0
and wpi pin 8, 9 15,16 always at 1

thanks

BPI-WiringPi for BPI_M2P issue

Hello,

I try to build BPI-WiringPi for BPI_M2P, but I get this output:

WiringPi Library
[UnInstall]
[Compile] wiringPi.c
[Compile] wiringSerial.c
[Compile] wiringShift.c
[Compile] piHiPri.c
[Compile] piThread.c
[Compile] wiringPiSPI.c
[Compile] wiringPiI2C.c
[Compile] softPwm.c
wiringPi.c:666:3: warning: excess elements in array initializer
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // ... 63
^
wiringPi.c:666:3: warning: (near initialization for ‘pinTobcm_BP’)
wiringPi.c:756:3: warning: excess elements in array initializer
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},//PN
^
wiringPi.c:756:3: warning: (near initialization for ‘BP_PIN_MASK’)
wiringPi.c: In function ‘sunxi_gpio_unexports’:
wiringPi.c:798:13: warning: assignment makes integer from pointer without a cast
if ((fd = fopen ("/sys/class/gpio/unexport", "w")) == NULL)
^
wiringPi.c:798:56: warning: comparison between pointer and integer
if ((fd = fopen ("/sys/class/gpio/unexport", "w")) == NULL)
^
wiringPi.c:807:14: warning: passing argument 1 of ‘fprintf’ makes pointer from integer without a >cast
fprintf (fd, "%d\n", pin) ;
^
In file included from wiringPi.c:55:0:
/usr/include/stdio.h:356:12: note: expected ‘struct FILE * restrict’ but argument is of type >‘int’
extern int fprintf (FILE *__restrict __stream,
^
wiringPi.c:808:13: warning: passing argument 1 of ‘fclose’ makes pointer from integer without a >cast
fclose (fd) ;
^
In file included from wiringPi.c:55:0:
/usr/include/stdio.h:237:12: note: expected ‘struct FILE *’ but argument is of type ‘int’
extern int fclose (FILE *__stream);
^
[Compile] softTone.c
[Compile] mcp23008.c
[Compile] mcp23016.c
[Compile] mcp23017.c
[Compile] mcp23s08.c
wiringPi.c: At top level:
wiringPi.c:719:12: warning: ‘physToGpioR3’ defined but not used [-Wunused-variable]
static int physToGpioR3 [64] =//head num map to BCMpin
^
[Compile] mcp23s17.c
[Compile] sr595.c
[Compile] pcf8574.c
[Compile] pcf8591.c
[Compile] mcp3004.c
[Compile] mcp3002.c
[Compile] mcp4802.c
[Compile] mcp3422.c
[Compile] max31855.c
[Compile] max5322.c
[Compile] sn3218.c
[Compile] drcSerial.c
[Compile] wpiExtensions.c
[Link (Dynamic)]
[Install Headers]
[Install Dynamic Lib]

WiringPi Devices Library
[UnInstall]
[Compile] ds1302.c
[Compile] maxdetect.c
[Compile] piNes.c
[Compile] piFace.c
[Compile] gertboard.c
[Compile] lcd128x64.c
[Compile] lcd.c
[Compile] piGlow.c
[Link (Dynamic)]
[Install Headers]
[Install Dynamic Lib]

GPIO Utility
[Compile] gpio.c
[Compile] readall.c
[Compile] pins.c
gpio.c:875:13: warning: ‘doPadDrive’ defined but not used [-Wunused-function]
static void doPadDrive (int argc, char *argv [])
^
gpio.c:963:13: warning: ‘doGbw’ defined but not used [-Wunused-function]
static void doGbw (int argc, char *argv [])
^
gpio.c:1005:13: warning: ‘doGbr’ defined but not used [-Wunused-function]
static void doGbr (int argc, char *argv [])
^

Thx for your work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.