Question about adding new functions to port specific modules.

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
chibill
Posts: 47
Joined: Thu Oct 31, 2019 10:44 pm

Question about adding new functions to port specific modules.

Post by chibill » Sat May 29, 2021 10:57 pm

I am wondering where inside a port specific module should I add new functions for example, I wish to add a few new functions to the esp32 modnetwork.c file to add in WPA2 EAP networking support, where in the file would it be best at add these?

After the last function declaration that is accessible from uPy? In the middle somewhere? or at the beginning.

chibill
Posts: 47
Joined: Thu Oct 31, 2019 10:44 pm

Re: Question about adding new functions to port specific modules.

Post by chibill » Tue Jun 08, 2021 4:28 pm

Still looking for an answer.

stijn
Posts: 735
Joined: Thu Apr 24, 2014 9:13 am

Re: Question about adding new functions to port specific modules.

Post by stijn » Tue Jun 08, 2021 5:42 pm

Doesn't really matter where, as long as it compiles? The function object eventually needs to go in mp_module_network_globals_table so must be defined before that.

Post Reply