smile
-
Posts
17 -
Joined
-
Last visited
Content Type
Forums
Store
Crowdfunding
Applications
Events
Raffles
Community Map
Posts posted by smile
-
-
thank you very! I`ll try this. it is good info about c++ std11
-
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
-
Yes, sorry for the typo ...
I means :
cat /proc/device-tree/soc/serial@01c28400/status cat /proc/device-tree/soc/serial@01c28800/status cat /proc/device-tree/soc/serial@01c28c00/status
it should not get empty, check carefully, because it doesn't do \r\n, so it is appearing just before shell prompt, it is "okay" or "disabled", no other values.
I`m sorry( I check more carefully, it is "disabled"(((
disabledroot@nanopineo:/etc/snmp# cat /proc/device-tree/soc/serial@01c28400/statusdisabledroot@nanopineo:/etc/snmp# cat /proc/device-tree/soc/serial@01c28800/statusdisabledroot@nanopineo:/etc/snmp# cat /proc/device-tree/soc/serial@01c28c00/status -
Your DTS looks Ok.
Did you recompile it into DTB and reboot ?
Still no new tty ?
Strange ...
What those commands showing ?
cat /proc/device-tree/soc/serial@01c28400 cat /proc/device-tree/soc/serial@01c28800 cat /proc/device-tree/soc/serial@01c28c00
it should print "okay" for each one ...
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/ttySttyS0 ttyS1 ttyS2 ttyS3 ttyS4 ttyS5 ttyS6 ttyS7I can see many uarts(((( -
thank you for your help, I soon check thish commands..
-
-
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] enabledI 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 tryIf you use latest nightly, than it is: sun8i-h3-nanopi-neo.dtb
-
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...
-
/boot/dtb....
how to decompile dtb to dts?
-
Hi, sorry than I came in this topic with another board (orange pi one)
I try "Armbian_5.24.161226_Nanopineo_Ubuntu_xenial_4.9.0.img" and my OPI one boot success, ethernet works well, etc..
but I have problem with uart â„–3 (/dev/ttyS3)
cat /dev/ttyS3
cat: /dev/ttyS3: Input/output error
I done https://forum.armbian.com/index.php/topic/1524-orange-pi-one-how-to-enable-uart/
but without success(
Build libgpiod the "New GPIO Interface for User Space"
in NanoPi Duo
Posted
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 ((( ?