Return values from native functions

41 views
Skip to first unread message

GilRoss

unread,
Oct 31, 2012, 12:17:01 PM10/31/12
to python-o...@googlegroups.com
I would like to return an integer from a native funcion:
 
myValue = ReadAdc( freq, oversamples )
 
Where ReadAdc is a native function. Are there examples of returning values from C code?
 
Gil

pir...@gmail.com

unread,
Oct 31, 2012, 12:21:40 PM10/31/12
to python-o...@googlegroups.com

Yes, there are examples on __bi.py, basically you have to create a Python object with the returned data and store it on the Python stack using the TOS macros :-)

Sent from my Android cell phone, please forgive the lack of format on the text, and my fat thumbs :-P

--
You are subscribed to the "python-on-a-chip" (or p14p for short) Google Group.
Site: http://groups.google.com/group/python-on-a-chip
Reply all
Reply to author
Forward
0 new messages