Download Print this page

NETGEAR KWGR614 User Manual page 7

Open source wireless-g router
Hide thumbs Also See for KWGR614:

Advertisement

user/dniutil/nvram_realtek.c
struct ej_nvram_handler nvram_handlers[] =
{
. . .
{"example_question", nvram_get_example_question, nvram_set_example_question},
{"example_answer", nvram_get_example_answer, nvram_set_example_answer},
{ NULL, NULL, NULL },
};
Declare an instance of the parameter for runtime memory use.
user/boa/src/dni/board.c
exampleParam_t
Define default values for the parameter.
user/boa/src/dni/board.c
// nvram example
exampleParam_t exampleParamDefault[1] =
{
{
}
};
Define the initialization function.
user/boa/src/dni/board.c
uint32 example_init(void)
{
/* read cfg from cfgmgr */
if (cfgmgr_read(CFGMGR_TABID_EXAMPLE, \
{
}
//printf("example_init\n");
return OK;
} /* end example_init */
Add the function to system initialization.
user/boa/src/dni/board.c
"What is the meaning of life, the universe, and everything?",
42
(void*)&(pRomeCfgParam->exampleParam), \
sizeof(struct exampleParam_t))!=0)
printf("example_init: call cfgmgr_read fail\n");
/* take proper actions */
return NOT_OK;
KWGR Open Source Guide (Rev 2.0)
ramExampleParam;
//nvram example

Advertisement

loading