[ECOS] re: Reading flash config value from application
Andre-John Mas
ajmas@sympatico.ca
Wed Jun 21 15:34:00 GMT 2006
Hi,
Just tried the code below and the 'CYGACC_CALL_IF_FLASH_CFG_OP' call returns false, just as in the code I had.
Its possible as Thomas suggests that maybe I have code which does not match what Gary has. I am currrently using 2.0.51, I believe.
#include <stdio.h>
#include <cyg/kernel/kapi.h>
#include <cyg/hal/hal_if.h>
#include <network.h>
#define CONFIG_IP 5
int
main(int argc, char *argv[])
{
unsigned long addr;
if (CYGACC_CALL_IF_FLASH_CFG_OP(CYGNUM_CALL_IF_FLASH_CFG_GET,
"bootp_my_ip",
&addr,
CONFIG_IP)) {
diag_dump_buf(&addr, sizeof(addr));
} else {
printf("Can't get 'bootp_my_ip'\n");
}
printf("fconfig_test done\n");
return 0;
}
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss
mailing list