This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
AW: Q: static IP address, how to use flash_get_config() from the application
- From: "Neundorf, Alexander" <Alexander dot Neundorf at jenoptik dot com>
- To: "Franz Hollerer" <hollerer at decomsys dot com>, <ecos-discuss at ecos dot sourceware dot org>
- Date: Thu, 2 Mar 2006 15:27:06 +0100
- Subject: AW: [ECOS] Q: static IP address, how to use flash_get_config() from the application
> Von: ecos-discuss-owner@ecos.sourceware.org
> [mailto:ecos-discuss-owner@ecos.sourceware.org]Im Auftrag von Franz
> Hollerer
>
> Hi,
>
> I have assigned a static IP address to my board by means of
> "fconfig -i"
> at the Redboot prompt.
>
> How can I get Redboot to configure the network based on the settings
> given with "fconfig" and let my application take over this settings?
>
> I found that Redboot itself calls flash_get_config() to get the
> settings, but I did not find a way to call this function from my
> application.
const char* value=0;
struct cyg_fconfig fc;
fc.offset=0;
fc.type=CYGNUM_FLASH_CFG_TYPE_CONFIG_STRING;
fc.key="your_key";
fc.val=&value;
CYGACC_CALL_IF_FLASH_CFG_OP2(CYGNUM_CALL_IF_FLASH_CFG_GET, &fc);
and accordingly for types other than string.
Bye
Alex
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss