Nut/OS  5.0.5
API Reference
_NUTBLOCKIO Struct Reference

Generic block I/O device interface structure. More...

#include <blockdev.h>

Collaboration diagram for _NUTBLOCKIO:
[legend]

Data Fields

void * blkio_info
 Device specific information.
uint32_t blkio_blk_cnt
 Total number of blocks on this device.
uint32_t blkio_blk_siz
 Number of bytes per block.
uint32_t blkio_vol_bot
 First block for file system mount.
uint32_t blkio_vol_top
 Number of blocks reserved on top of file system mount.
int(* blkio_read )(NUTDEVICE *, uint32_t, void *, int)
 Read from block I/O device, starting at the specified block.
int(* blkio_write )(NUTDEVICE *, uint32_t, const void *, int)
 Write to block I/O device, starting at the specified block.
int(* blkio_write_P )(NUTDEVICE *, uint32_t, PGM_P, int)
 Write program memory to block I/O device, starting at the specified block.
int(* blkio_ioctl )(NUTDEVICE *, int, void *)
 Control functions.

Detailed Description

Generic block I/O device interface structure.

This is a virtual structure, used by the generic block I/O device driver.

Note:
Any real implementation must start with the same layout. If this structure is changed, we must update all implementations.

Field Documentation

Total number of blocks on this device.

Referenced by At25dfInit(), NutBlockDeviceOpen(), and SpiAt45dInit().

Number of bytes per block.

Referenced by At25dfInit(), NutBlockDeviceOpen(), and SpiAt45dInit().

First block for file system mount.

Referenced by NutBlockDeviceOpen().

Number of blocks reserved on top of file system mount.

Referenced by NutBlockDeviceOpen().

int(* _NUTBLOCKIO::blkio_read)(NUTDEVICE *, uint32_t, void *, int)

Read from block I/O device, starting at the specified block.

Referenced by NutBlockDeviceRead().

int(* _NUTBLOCKIO::blkio_write)(NUTDEVICE *, uint32_t, const void *, int)

Write to block I/O device, starting at the specified block.

Referenced by NutBlockDeviceWrite(), and NutBlockDeviceWrite_P().

Write program memory to block I/O device, starting at the specified block.

Referenced by NutBlockDeviceWrite_P().

int(* _NUTBLOCKIO::blkio_ioctl)(NUTDEVICE *, int, void *)

Control functions.

Referenced by NutBlockDeviceIOCtl().


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