smile
Members-
Posts
17 -
Joined
-
Last visited
-
Build libgpiod the "New GPIO Interface for User Space"
smile replied to sgjava's topic in NanoPi Duo
I got libgpiood working at orange pi one. My question is about internal resistors, when line direction is INPUT what about pull_up and pull_down commands ((( ? -
Build libgpiod the "New GPIO Interface for User Space"
smile replied to sgjava's topic in NanoPi Duo
thank you very! I`ll try this. it is good info about c++ std11 -
Build libgpiod the "New GPIO Interface for User Space"
smile replied to sgjava's topic in NanoPi Duo
Hi, thank you for this work! is it suitable for orange pi one? as I can see your lib for piton, but can you share c++ example with interrupts and call back function? -
Anyone() I just test this code with Raspberry Pi 3 and Wiring Pi library, all works perfect() But on orange pi one still this problem(
-
Hi, my environment is: Orange Pi One ARMBIAN 5.34.171031 nightly Ubuntu 16.04.3 LTS 4.11.12-sun8i WiringPi fork by WereCatf: git clone https://github.com/WereCatf/WiringOP.git -b h3 ./build small c++ programm: #include <stdio.h> #include <string.h> #include <errno.h> #include <stdlib.h> #include <wiringPi.h> #include <pthread.h> static volatile int globalCounter; void myInterrupt(void) { ++globalCounter; printf("InterruptCounter: %5d\n", globalCounter); //digitalRead(7); } int main(void) { if (wiringPiSetup() == -1) { printf("wiringPiSetup Error\n"); } pinMode(7, INPUT); pullUpDnControl(7, PUD_UP); if (wiringPiISR(7, INT_EDGE_FALLING, &myInterrupt) < 0) { fprintf(stderr, "Unable to setup ISR: %s\n", strerror(errno)); return 1; } for (;;) { //main programm code here... } return 0; } Compile: gcc ./isr.c -o wg-daemon.out -lwiringPi -lwiringPiDev -lpthread -lm and run it... but when I put pin 7 in down state (gpio mode 7 down) ISR function begin fires (triggers) continuously ((((((( Here is output : InterruptCounter: 132371 InterruptCounter: 132372 InterruptCounter: 132373 InterruptCounter: 132374 InterruptCounter: 132375 InterruptCounter: 132376 InterruptCounter: 132377 InterruptCounter: 132378 InterruptCounter: 132379 InterruptCounter: 132380 InterruptCounter: 132381 ^C root@orangepione:~/example# but, when I add to ISR function "digitalRead(7);" program works fine ((( Please tell me, what I do wrong
-
fortunately, I got it works! martinayottemany many thanks!!! Is there any plans for armbian mainline image for orange pi one?
-
Ok, however I done this(( But I`ll try again, and will be more carefully, many thanks
-
I`m sorry( I check more carefully, it is "disabled"((( disabledroot@nanopineo:/etc/snmp# cat /proc/device-tree/soc/serial@01c28400/status disabledroot@nanopineo:/etc/snmp# cat /proc/device-tree/soc/serial@01c28800/status disabledroot@nanopineo:/etc/snmp# cat /proc/device-tree/soc/serial@01c28c00/status
-
Hi, sorry that too late, but I reinstall clean image, check anything, but have no success( output is: cat: /proc/device-tree/soc/serial@01c28400/: Is a directory if I print "cat /proc/device-tree/soc/serial@01c28400/status", I get empty (no "okay") is printed( but in root@nanopineo:~# cat /dev/ttyS ttyS0 ttyS1 ttyS2 ttyS3 ttyS4 ttyS5 ttyS6 ttyS7 I can see many uarts((((
-
thank you for your help, I soon check thish commands..
-
Firstly, I change @script.bin from /boot/bin/nanopineo.bin to /boot/bin/orangepione.bin I rewrite sun8i-h3-orangepi-one.dtb to sun8i-h3-nanopi-neo.dtb (my board is orange pi one) Here it is.... and script.bin. In dts file I change "disabled" -> "okay" files.rar
-
unfortunately uarts exept 0 fails( root@nanopineo:~# dmesg | grep tty [ 0.000000] Kernel command line: root=UUID=2d2112dd-a756-4cd3-ace6-e0c52d9647dc rootwait rootfstype=ext4 console=tty1 console=ttyS0,115200 cgroup_enable=memory swapaccount=1 hdmi.audio=EDID:0 disp.screen0_output_mode=1920x1080p60 panic=10 consoleblank=0 enforcing=0 loglevel=1 ubootpart=f773f33f-01 sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_fb_mem_reserve=16 [ 0.001204] console [tty1] enabled [ 4.262838] console [ttyS0] disabled [ 4.283070] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 40, base_baud = 1500000) is a U6_16550A [ 4.283139] console [ttyS0] enabled I done with dtb file and with script.bin via fex.... but even in dmesg silence about uart3, uart1, etc.... but I`ll try again and far) thank you friends for your help!
-
Thank you, friends, I'll try
-
thank you very! One qustion... there are many files .dtb in /boot/~dtb directoty How I can know, which file use my linux? must be some config file for this, I guess....
-
sorry, I want to get some skills in it...