diff options
Diffstat (limited to 'sw/programmer/linux/src/flash.h')
-rw-r--r-- | sw/programmer/linux/src/flash.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sw/programmer/linux/src/flash.h b/sw/programmer/linux/src/flash.h new file mode 100644 index 0000000..373ebf3 --- /dev/null +++ b/sw/programmer/linux/src/flash.h @@ -0,0 +1,22 @@ +#ifndef __FLASH_H__ +#define __FLASH_H__ + +#include "serial.h" + +#include <sys/stat.h> +#include <fcntl.h> +#include <unistd.h> + +#define FLASH_BLOCK_SIZE 512 + +struct flash_blk +{ + uint16_t addr; + uint16_t size; +}; + +int flash_open(const char *devpath, unsigned long baudrate); +int flash_write(const char *romfile, void (*log)(const char *)); +void flash_close(void); + +#endif |