Python GPIOs
#1
I wished to control GPIO with python !
I've tried to use the same library I'm used to on A20, so, I've copied pyA20-0.2.1 from my Olimex board into my PinA64.
Compile it and try it out ... Segmentation fault !
Digging with GDB, I've figured it out : some pointers were 32bits while we are now on 64bits plateform !

Here are the changes to achieve :


Code:
root@pineA64:~# diff pyA20-0.2.1/pyA20/gpio/gpio_lib.c~ pyA20-0.2.1/pyA20/gpio/gpio_lib.c
67c67
<     SUNXI_PIO_BASE = (unsigned int) pc;
---
>     SUNXI_PIO_BASE = (unsigned long) pc;
root@pineA64:~# diff pyA20-0.2.1/pyA20/gpio/gpio_lib.h~ pyA20-0.2.1/pyA20/gpio/gpio_lib.h
123c123
< extern unsigned int SUNXI_PIO_BASE;
---
> extern unsigned long SUNXI_PIO_BASE;
  Reply
#2
Please consider opening an account over at linux-sunxi, collect these valuable information there -- eg. using http://linux-sunxi.org/User:Martinayotte -- and link from here to there. Forum posts get lost so fast.
  Reply
#3
(04-15-2016, 09:12 AM)tkaiser Wrote: Please consider opening an account over at linux-sunxi, collect these valuable information there -- eg. using http://linux-sunxi.org/User:Martinayotte -- and link from here to there. Forum posts get lost so fast.

Done ! Tongue

(I'm member of so many forums now ...)
  Reply
#4
(04-15-2016, 02:22 PM)martinayotte Wrote:
(04-15-2016, 09:12 AM)tkaiser Wrote: Please consider opening an account over at linux-sunxi, collect these valuable information there -- eg. using http://linux-sunxi.org/User:Martinayotte -- and link from here to there. Forum posts get lost so fast.

Done ! Tongue

(I'm member of so many forums now ...)
Thanks for raising this up. I'm also interested in controlling variable sensors and devices with PINE but mine will arrive in MAY. Sad
Also thanks to raising the request for UARTs. I'm going to use all 6 UARTs (if I succeed) on PINE.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  RPi.GPIO python module for Pine A64/A64+ aquilegia 98 147,571 10-26-2024, 07:17 AM
Last Post: Garesdq1d
  Udev rule for gpios for non root access dkebler 2 4,870 06-13-2019, 09:30 PM
Last Post: tllim
  High-speed GPIOs dsnyder 3 5,494 05-05-2016, 09:07 PM
Last Post: martinayotte

Forum Jump:


Users browsing this thread: 1 Guest(s)