Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct config_t {
- uint8_t foo;
- uint16_t bar;
- };
- uint8_t ptr[512];
- struct config_t *config;
- //read configuration from SD card
- readSector(10 /*sector number*/, ptr);
- config = (struct config_t*)ptr;
- if (config->foo) {do something;}
- config->bar = 35; //update some paramter
- //save configuration to SD card
- writeSector(10, ptr);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement