ringfs
 All Data Structures Files Functions Variables Enumerations Enumerator Macros Groups Pages
Data Fields
ringfs_flash_partition Struct Reference

Flash memory+parition descriptor. More...

#include <ringfs.h>

Data Fields

int sector_size
 Sector size, in bytes. More...
 
int sector_offset
 Partition offset, in sectors. More...
 
int sector_count
 Partition size, in sectors. More...
 
int(* sector_erase )(int address)
 Erase a sector. More...
 
ssize_t(* program )(int address, const void *data, size_t size)
 Program flash memory bits by toggling them from 1 to 0. More...
 
ssize_t(* read )(int address, void *data, size_t size)
 Read flash memory. More...
 

Detailed Description

Flash memory+parition descriptor.

Definition at line 23 of file ringfs.h.

Field Documentation

ssize_t(* ringfs_flash_partition::program)(int address, const void *data, size_t size)

Program flash memory bits by toggling them from 1 to 0.

Parameters
addressStart address, in bytes.
dataData to program.
sizeSize of data.
Returns
size on success, -1 on failure.

Definition at line 42 of file ringfs.h.

ssize_t(* ringfs_flash_partition::read)(int address, void *data, size_t size)

Read flash memory.

Parameters
addressStart address, in bytes.
dataBuffer to store read data.
sizeSize of data.
Returns
size on success, -1 on failure.

Definition at line 50 of file ringfs.h.

int ringfs_flash_partition::sector_count

Partition size, in sectors.

Definition at line 27 of file ringfs.h.

int(* ringfs_flash_partition::sector_erase)(int address)

Erase a sector.

Parameters
addressAny address inside the sector.
Returns
Zero on success, -1 on failure.

Definition at line 34 of file ringfs.h.

int ringfs_flash_partition::sector_offset

Partition offset, in sectors.

Definition at line 26 of file ringfs.h.

int ringfs_flash_partition::sector_size

Sector size, in bytes.

Definition at line 25 of file ringfs.h.


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