Loading...
Searching...
No Matches
nvram Struct Reference

Device descriptor for generic NVRAM devices. More...

Detailed Description

Device descriptor for generic NVRAM devices.

Definition at line 48 of file nvram.h.

#include <nvram.h>

Data Fields

int(* read )(struct nvram *dev, uint8_t *dst, uint32_t src, size_t size)
 Pointer to device-specific read function.
 
int(* write )(struct nvram *dev, const uint8_t *src, uint32_t dst, size_t size)
 Pointer to device-specific write function.
 
size_t size
 Device capacity.
 
void * extra
 Device-specific parameters, if any.
 

Field Documentation

◆ extra

void* nvram::extra

Device-specific parameters, if any.

Definition at line 83 of file nvram.h.

◆ read

int(* nvram::read) (struct nvram *dev, uint8_t *dst, uint32_t src, size_t size)

Pointer to device-specific read function.

Copy data from system memory to NVRAM.

Parameters
[in]devPointer to NVRAM device descriptor
[out]dstPointer to the first byte in the system memory address space
[in]srcStarting address in the NVRAM device address space
[in]lenNumber of bytes to copy
Returns
Number of bytes read on success
<0 on errors

Definition at line 62 of file nvram.h.

◆ size

size_t nvram::size

Device capacity.

Definition at line 80 of file nvram.h.

◆ write

int(* nvram::write) (struct nvram *dev, const uint8_t *src, uint32_t dst, size_t size)

Pointer to device-specific write function.

Copy data from NVRAM to system memory.

Parameters
[in]devPointer to NVRAM device descriptor
[in]srcPointer to the first byte in the system memory address space
[in]dstStarting address in the NVRAM device address space
[in]lenNumber of bytes to copy
Returns
Number of bytes written on success
<0 on errors

Definition at line 77 of file nvram.h.


The documentation for this struct was generated from the following file: