Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
resources:tools-software:sharc-audio-module:micropython:new-module [28 Feb 2019 16:12] – change letter cases in the title; fix wrong navigation menu Wenting Zhangresources:tools-software:sharc-audio-module:micropython:new-module [02 Apr 2019 22:01] (current) – [A module template] Chad Wentworth
Line 29: Line 29:
 </code> </code>
  
-In this template, it declares a module called fooand has one member function called bar, with no arguments, when called, it returns True.+In this template, it declares a module called foo and has one member function called bar. With no arguments, when called, it returns True. If arguments need to be added, all arguments need to have type of mp_obj_t, and the MP_DEFINE_CONST_FUN_OBJ_X macro should be changed to reflect the argument number (for example, use MP_DEFINE_CONST_FUN_OBJ_2 if the function has 2 arguments.)
  
-If arguments need to be added, all arguments need to have type of mp_obj_t, and the MP_DEFINE_CONST_FUN_OBJ_X macro should be changed to reflect the argument number (for example, use MP_DEFINE_CONST_FUN_OBJ_2 if the function has 2 arguments.) +To link this module into MicroPython build, one also needs to add the module into the builtin list in mpconfigport.h:
- +
-To link this module into MicroPython build, one also need to add the module into the builtin list in the mpconfigport.h:+
  
 <code c> <code c>
resources/tools-software/sharc-audio-module/micropython/new-module.1551366740.txt.gz · Last modified: 28 Feb 2019 16:12 by Wenting Zhang