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]

re: Reading flash config value from application


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


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