Am Mittwoch, 19. August 2020 21:56:23 UTC+2 schrieb andrew...@gmail.com:
>
> I can't find a reference to the setPin function in the python library
>

Check out example pruss_toggle.py 
<http://users.freebasic-portal.de/tjf/Projekte/libpruio/doc/html/pruss__toggle_8py.html>
.


> I assume I should be able to do this:
> from libpruio import *
>
> io = pruio_new(PRUIO_DEF_ACTIVE, 4, 0x98, 0)
>
> pruio_setPin(io, P9_24, 0)
>

That should work. I used a different syntax (don't know why -- perhaps to 
be closer to the other languages syntax):

from libpruio import * 
>
...
>
io = pruio_new 
> <http://users.freebasic-portal.de/tjf/Projekte/libpruio/doc/html/pruio__c__wrapper_8bas.html#a8416fa1df27f053242d720949d22366f>(PRUIO_DEF_ACTIVE,
>  
> 4, 0x98, 0)
> try:
>    ## The pointer dereferencing, using contents member
>    IO = io.contents
>    if IO.Errr: raise AssertionError("pruio_new failed (%s)" % IO.Errr)
>
...
>
  if (IO.setPin(io, P9_24, 0)):
>     raise AssertionError("P9_24 configuration failed (%s)" % IO.Errr)
> ...
>
  if (pruio_config 
> <http://users.freebasic-portal.de/tjf/Projekte/libpruio/doc/html/pruio__c__wrapper_8bas.html#a283d56d12a6fee85ae2f4920f22705e9>(io,
>  
> 1, 0, 0, 0)):
>     raise AssertionError("config failed (%s)" % IO.Errr)
> ...
>
 

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/c754404d-4735-4fef-8fe7-87c6d8bc5ed0o%40googlegroups.com.

Reply via email to