struct nand_read_write

Defined at line 57 of file fidling/gen/sdk/banjo/fuchsia.hardware.nand/fuchsia.hardware.nand/banjo/c/fuchsia/hardware/nand/c/banjo.h

Declarations

A single operation can read or write an arbitrary number of pages,

including out of band (OOB) data for each page. If either regular

data or OOB is not required, the relevant VMO handle should be set to

ZX_HANDLE_INVALID.

Note that length dictates the number of pages to access, regardless

of the type of data requested: regular data, OOB or both.

The OOB data will be copied to (and from) a contiguous memory range

starting at the given offset. Note that said offset is given in nand

pages even though OOB is just a handful of bytes per page. In other

words, after said offset, the OOB data for each page is located

nand_info.oob_size bytes apart.

For example, to read 5 pages worth of data + OOB, with page size of

2 kB and 16 bytes of OOB per page, setting:

data_vmo = oob_vmo = vmo_handle

length = 5

offset_nand = 20

offset_data_vmo = 0

offset_oob_vmo = 5

will transfer pages [20, 24] to the first 2048 * 5 bytes of the vmo,

followed by 16 * 5 bytes of OOB data starting at offset 2048 * 5.

Public Members

nand_op_t command
zx_handle_t data_vmo
zx_handle_t oob_vmo
uint32_t length
uint32_t offset_nand
uint64_t offset_data_vmo
uint64_t offset_oob_vmo
uint32_t corrected_bit_flips