how to use native C function in pymite

169 views
Skip to first unread message

Shreyas Patel

unread,
Dec 31, 2013, 3:56:40 AM12/31/13
to python-o...@googlegroups.com
Hi all,

I am using pymite with freeRTOS in my project, I want to use function which is defined in a C file into python file.
for example I have a function named hello() which prints hello world in hello.c file and I want to use that hello function from hello.py file using pymite.

In Python in linux I could do it using ctypes and import that C library using CDLL and call that function directly.

Thank you,
Regards,
Shreyas.

Dean Hall

unread,
Dec 31, 2013, 8:44:02 AM12/31/13
to python-o...@googlegroups.com
I recently answered this, so here's a link:
https://groups.google.com/d/msg/python-on-a-chip/EL-rHLEgbVc/0zIUIkKi-hkJ

also, you can learn from example. The library of builtin functions has a few native functions. See the code: src/lib/__bi.py

!!Dean
> --
> --
> 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
>
> ---
> You received this message because you are subscribed to the Google Groups "python-on-a-chip" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to python-on-a-ch...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages