Download Print this page

NETGEAR KWGR614 User Manual page 8

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

Advertisement

uint32 sysInit(void)
{
. . .
/* init nvram example */
example_init();
. . .
} /* end sysInit */
Add an ID to the configuration management table and to the control table.
user/boa/src/rtl865x/rtl_board.h
enum _board_cfgmgr_tabId_e {
. . .
CFGMGR_TABID_EXAMPLE,
CFGMGR_TABID_MAX
};
user/boa/src/dni/board.c
static _board_cfgmgr_ctrl_t _board_cfgmgr_ctrlTbl[CFGMGR_TABID_MAX+1] =
{
. . .
{CFGMGR_TABID_EXAMPLE, exampleParamDefault, (sizeof(exampleParamDefault))},
{CFGMGR_TABID_MAX, NULL, 0}
};
Create a save function for the parameter.
user/boa/src/dni/board.c
int example_cfg_save(void)
{
cfgmgr_write(CFGMGR_TABID_EXAMPLE, \
cfgmgr_task();
return 1;
}
Add the parameter to the NVRAM commit function.
user/boa/src/dni/board.c
int nvram_commit(void)
{
. . .
cfgmgr_write(CFGMGR_TABID_EXAMPLE, \
cfgmgr_task();
return 1;
}
Clean and rebuild userspace after any changes to board.h.
At the shell prompt.
work> cd user; make clean; cd ..; make
(void*)&(pRomeCfgParam->exampleParam),\
sizeof(exampleParam_t));
(void*)&(pRomeCfgParam->exampleParam), \
sizeof(exampleParam_t));
KWGR Open Source Guide (Rev 2.0)

Advertisement

loading