1
2
3
6
7
8
9
10
11
12
13
14
15
16
17
18
22
23
24
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* ... */
#ifndef OPENOCD_FLASH_NOR_IMP_H
#define OPENOCD_FLASH_NOR_IMP_H
#include <stdbool.h>
#include "core.h"
#include "driver.h"
#include <target/target.h>
/* ... */
void flash_bank_add(struct flash_bank *bank);
/* ... */
struct flash_bank *flash_bank_list(void);
int flash_driver_erase(struct flash_bank *bank, unsigned int first,
unsigned int last);
int flash_driver_protect(struct flash_bank *bank, int set, unsigned int first,
unsigned int last);
int flash_driver_write(struct flash_bank *bank,
const uint8_t *buffer, uint32_t offset, uint32_t count);
int flash_driver_read(struct flash_bank *bank,
uint8_t *buffer, uint32_t offset, uint32_t count);
int flash_driver_verify(struct flash_bank *bank,
const uint8_t *buffer, uint32_t offset, uint32_t count);
int flash_write_unlock_verify(struct target *target, struct image *image,
uint32_t *written, bool erase, bool unlock, bool write, bool verify);
/* ... */
#endif