summaryrefslogtreecommitdiffstats
path: root/sw/programmer/linux/src/flash.h
blob: 373ebf3e27e717c9cd066452d980e00083b901b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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