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 148,877 10-26-2024, 07:17 AM
Last Post: Garesdq1d
  Udev rule for gpios for non root access dkebler 2 4,912 06-13-2019, 09:30 PM
Last Post: tllim
  High-speed GPIOs dsnyder 3 5,554 05-05-2016, 09:07 PM
Last Post: martinayotte

Forum Jump:


Users browsing this thread: 1 Guest(s)