OpenOCD
flash/nand/fileio.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_NAND_FILEIO_H
8 #define OPENOCD_FLASH_NAND_FILEIO_H
9 
10 #include <helper/time_support.h>
11 #include <helper/fileio.h>
12 
14  uint32_t address;
15  uint32_t size;
16 
17  uint8_t *page;
18  uint32_t page_size;
19 
21  uint8_t *oob;
22  uint32_t oob_size;
23 
24  const int *eccpos;
25 
27  struct fileio *fileio;
28 
29  struct duration bench;
30 };
31 
34  struct nand_device *nand, const char *filename, int filemode,
35  struct nand_fileio_state *state);
38 
39 COMMAND_HELPER(nand_fileio_parse_args, struct nand_fileio_state *state,
40  struct nand_device **dev, enum fileio_access filemode,
41  bool need_size, bool sw_ecc);
42 
43 int nand_fileio_read(struct nand_device *nand, struct nand_fileio_state *s);
44 
45 #endif /* OPENOCD_FLASH_NAND_FILEIO_H */
int nand_fileio_cleanup(struct nand_fileio_state *state)
int nand_fileio_start(struct command_invocation *cmd, struct nand_device *nand, const char *filename, int filemode, struct nand_fileio_state *state)
void nand_fileio_init(struct nand_fileio_state *state)
int nand_fileio_read(struct nand_device *nand, struct nand_fileio_state *s)
int nand_fileio_finish(struct nand_fileio_state *state)
COMMAND_HELPER(nand_fileio_parse_args, struct nand_fileio_state *state, struct nand_device **dev, enum fileio_access filemode, bool need_size, bool sw_ecc)
fileio_access
Definition: helper/fileio.h:26
oob_formats
Definition: nand/core.h:170
When run_command is called, a new instance will be created on the stack, filled with the proper value...
Definition: command.h:76
struct duration bench
enum oob_formats oob_format
struct fileio * fileio
uint8_t cmd
Definition: vdebug.c:1
uint8_t state[4]
Definition: vdebug.c:21