OpenOCD
nor/imp.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 /***************************************************************************
4  * Copyright (C) 2009 Zachary T Welch <zw@superlucidity.net> *
5  ***************************************************************************/
6 
7 #ifndef OPENOCD_FLASH_NOR_IMP_H
8 #define OPENOCD_FLASH_NOR_IMP_H
9 
10 #include <stdbool.h>
11 
12 /* this is an internal header */
13 #include "core.h"
14 #include "driver.h"
15 /* almost all drivers will need this file */
16 #include <target/target.h>
17 
22 void flash_bank_add(struct flash_bank *bank);
23 
27 struct flash_bank *flash_bank_list(void);
28 
29 int flash_driver_erase(struct flash_bank *bank, unsigned int first,
30  unsigned int last);
31 int flash_driver_protect(struct flash_bank *bank, int set, unsigned int first,
32  unsigned int last);
34  const uint8_t *buffer, uint32_t offset, uint32_t count);
36  uint8_t *buffer, uint32_t offset, uint32_t count);
38  const uint8_t *buffer, uint32_t offset, uint32_t count);
39 
40 /* write (optional verify) an image to flash memory of the given target */
42  uint32_t *written, bool erase, bool unlock, bool write, bool verify);
43 
44 #endif /* OPENOCD_FLASH_NOR_IMP_H */
uint8_t bank
Definition: esirisc.c:135
Upper level NOR flash interfaces.
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_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)
void flash_bank_add(struct flash_bank *bank)
Adds a new NOR bank to the global list of banks.
int flash_driver_erase(struct flash_bank *bank, unsigned int first, unsigned int last)
struct flash_bank * flash_bank_list(void)
int flash_write_unlock_verify(struct target *target, struct image *image, uint32_t *written, bool erase, bool unlock, bool write, bool verify)
Provides details of a flash bank, available either on-chip or through a major interface.
Definition: nor/core.h:75
Definition: image.h:48
Definition: target.h:120
uint8_t offset[4]
Definition: vdebug.c:9
uint8_t count[4]
Definition: vdebug.c:22