123
Return to list Post new posts
Author: phreon

I have a love hate relationship going with OP PC

[Copy link]

3

threads

44

posts

1230

credits

Gold member

Rank: 6Rank: 6

credits
1230
 Author| Published in 2016-1-14 23:12:29 | Show all floors
Wow, more great work snowbody Unfortunately for me this is beyond my level of expertise.
OPI should pay you to get wiringpi working so the OPI community can use it can grow. Talented guys like you will not spend a lot of time doing what should be done by the board designers.
But that is why the OPI PC is $15 instead of $29.

12

threads

30

posts

150

credits

Registered member

Rank: 2

credits
150
Published in 2016-1-15 17:09:33 | Show all floors
I'm a really lousy programmer, so I seriously doubt that anyone would pay for that
Nevertheless I did succeed in writing to the control register!

I will add an example in the interface section of this forum. (with some comment)

I was curious how I could read the onboard switch PL03.
In the control register it was blocked.
I wrote a script to set the port to input. (writing 000 to bits 12, 13, 14)
data = *(unsigned int *)(ptr+0x00); //offset for controller register port L
       data &= ~(1<<12);                              //control register
       data &= ~(1<<13);                              //control register
       data &= ~(1<<14);                              //control register

The other script just prints the content of port PL03

I think you can apply this method to every port of the GPIO.
Some ports are compiled into the kernel : eg spi and i2c, maybe these ports are not usable with the script.
(just recompile kernel without these ports)



7

threads

30

posts

388

credits

Intermediate member

Rank: 3Rank: 3

credits
388
Published in 2016-1-15 19:40:58 | Show all floors
see, the datasheet is a treasure trove of information

3

threads

44

posts

1230

credits

Gold member

Rank: 6Rank: 6

credits
1230
 Author| Published in 2016-1-16 04:39:42 | Show all floors
Thanks snowbody ad matsumo,
This is beyond my level of expertise. I will have to wait until one of you experts fix wiringpi for the OPI before I can go any further.
Thanks for the patient explanations though.
P
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list