Replies: 2 comments 15 replies
-
The only experience I have adding C functions is in First, create the function itself. I'm not sure how picky MicroPython is about the name of the function, but mine have always followed this naming format with the "my_function_name" being what you would change:
Second, define a constant function object. I do this right below the function that was just created:
Third, the function needs to be mapped in
The process for adding C functions to other modules (i.e. not |
Beta Was this translation helpful? Give feedback.
-
@micropyt You might need to provide more context. In particular, what do you mean by "creating the mpy file of cmodule" -- is this https://docs.micropython.org/en/latest/develop/natmod.html ? Yes you can call any C function, but it will need to be statically linked into your module. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I have a problem with creating the mpy file of cmodule.
Is it possible to call another C function inside like this?
Beta Was this translation helpful? Give feedback.
All reactions