Implementing a C function that takes a Python function as argument

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Turbinenreiter
Posts: 288
Joined: Sun May 04, 2014 8:54 am

Re: Implementing a C function that takes a Python function as argument

Post by Turbinenreiter » Fri Jan 06, 2017 3:56 pm

Thanks again for pointing me in the right direction. I ended up using get_array, which works with bot list and tuples.

I can now take all types of arguments (but only 0 or 1) and return all types as well as arrays of all types.
At this point, I got everything I need for my proof of concept. I'm not sure how my approach can scale to the flexibility the dbus-interface has.

teltonique21
Posts: 11
Joined: Fri Mar 04, 2022 9:47 am

Re: Implementing a C function that takes a Python function as argument

Post by teltonique21 » Mon Mar 21, 2022 4:36 pm

Turbinenreiter wrote:
Thu Dec 15, 2016 1:50 pm
Thank you!

I can now register a method and run a dbus Service from MicroPython.
Can you please post an example using dbus?

Post Reply