mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
* introduced flashrom driver for msb430
* restructured some files concerning flashrom access * added some ifdefs to shell commands
This commit is contained in:
parent
5f84689c0b
commit
d00b12ef75
@ -34,4 +34,5 @@ FLASHFLAGS ?= -d $(FLASH_PORT) -j uif ;
|
||||
|
||||
RESET ?= $(FLASHER) $(FLASHFLAGS) reset ;
|
||||
|
||||
HDRS += [ FPath $(TOP) board msb-430-common include ] ;
|
||||
HDRS += [ FPath $(TOP) board msb-430-common drivers include ] ;
|
||||
|
@ -1,6 +1,9 @@
|
||||
#include <stdint.h>
|
||||
#include <board-conf.h>
|
||||
#include <config.h>
|
||||
#include <flashrom.h>
|
||||
|
||||
uint8_t config_save(void) {
|
||||
return 1;
|
||||
configmem_t mem = { CONFIG_KEY, sysconfig };
|
||||
return (flashrom_erase((uint8_t*) INFOMEM) && flashrom_write((uint8_t*) INFOMEM, (char*) &mem, sizeof(mem)));
|
||||
}
|
||||
|
6
msb-430-common/include/board-conf.h
Normal file
6
msb-430-common/include/board-conf.h
Normal file
@ -0,0 +1,6 @@
|
||||
#ifndef BOARD_CONF_H
|
||||
#define BOARD_CONF_H
|
||||
|
||||
#define INFOMEM (0x1000)
|
||||
|
||||
#endif /* BOARD-CONF_H */
|
@ -4,5 +4,5 @@
|
||||
|
||||
uint8_t config_save(void) {
|
||||
configmem_t mem = { CONFIG_KEY, sysconfig };
|
||||
return (flashrom_erase((uint32_t) configmem) && flashrom_write((uint32_t) configmem, (char*) &mem, sizeof(mem)));
|
||||
return (flashrom_erase((uint8_t*) &configmem) && flashrom_write((uint8_t*) &configmem, (char*) &mem, sizeof(mem)));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user