This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

AW: 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]