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


Messages In This Thread
Python GPIOs - by martinayotte - 04-14-2016, 07:23 PM
RE: Python GPIOs - by tkaiser - 04-15-2016, 09:12 AM
RE: Python GPIOs - by martinayotte - 04-15-2016, 02:22 PM
RE: Python GPIOs - by peterz - 04-15-2016, 11:12 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  RPi.GPIO python module for Pine A64/A64+ aquilegia 98 131,428 12-15-2022, 08:40 PM
Last Post: Fadazo
  Udev rule for gpios for non root access dkebler 2 4,308 06-13-2019, 09:30 PM
Last Post: tllim
  High-speed GPIOs dsnyder 3 4,938 05-05-2016, 09:07 PM
Last Post: martinayotte

Forum Jump:


Users browsing this thread: 1 Guest(s)