CONFIG_ARRAY_ELEMENT impossible in modules?!

Started by Marsu42, July 11, 2013, 04:08:44 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Marsu42

I'm trying to use the method from hdr.c for array variables in my module, but it won't work - is it me or isn't this supported in modules (yet? if so, please do add :-)) ... this is part of my (abridged) module code:


static int8_t mymodule_var[2];
CONFIG_ARRAY_ELEMENT("mymodule.var.0", mymodule_var, 0, -1);
CONFIG_ARRAY_ELEMENT("mymodule.var.1", mymodule_var, 1, -1);

MODULE_CONFIGS_START()
    MODULE_CONFIG(mymodule_var)
MODULE_CONFIGS_END()


... and this is the compiler error:


[ CC       ]   mymodule.o
mymodule.c:6:1: error: '__config_mymodule_var' undeclared here (not in a function)
make[1]: *** [mymodule.o] Error 1
make[1]: Leaving directory `/ml/magic-lantern/modules/mymodule'
make: *** [mymodule] Error 2

g3gg0

Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

Marsu42

Quote from: g3gg0 on July 11, 2013, 04:45:26 PM
sorry, this is not possible yet.

Hmmmm, in this case feel free to add it :-) - if the modules support everything you can do in the core, there is less need to patch the core and thus avoids a bit hassle for all concerned parties :-o