C++ file for display control
Dependencies: 4DGL mbed ConfigFile
Fork of 4DGLtest by
configread.cpp
- Committer:
- WillemBraat
- Date:
- 2014-06-27
- Revision:
- 4:302c2ac97db9
- Child:
- 6:904d00252480
File content as of revision 4:302c2ac97db9:
#include "mbed.h" #include "ConfigFile.h" void ConfigRead(void) { LocalFileSystem local("local"); ConfigFile cfg; char *key = "MyKey"; char value[BUFSIZ]; /* * Read a configuration file from a mbed. */ if (!cfg.read("/local/input.cfg")) { error("Failure to read a configuration file.\n"); } /* * Get a configuration value. */ if (cfg.getValue(key, &value[0], sizeof(value))) { printf("'%s'='%s'\n", key, value); } }