|
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)
|
|