Contiki-NG
Loading...
Searching...
No Matches
Storage CFS coffee driver

Files

file  cfs-coffee-arch.c
 storage driver for the gecko.
 
file  cfs-coffee-arch.h
 storage driver for the gecko.
 

Functions

void cfs_coffee_arch_erase (uint16_t sector)
 Erases a device sector.
 
void cfs_coffee_arch_write (const void *buf, unsigned int size, cfs_offset_t offset)
 Writes a buffer to the device.
 
void cfs_coffee_arch_read (void *buf, unsigned int size, cfs_offset_t offset)
 Reads from the device to a buffer.
 

Coffee port types

typedef int16_t coffee_page_t
 Page.
 

Coffee port macros

#define COFFEE_ERASE(sector)    cfs_coffee_arch_erase(sector)
 Erase.
 
#define COFFEE_WRITE(buf, size, offset)    cfs_coffee_arch_write((buf), (size), (offset))
 Write.
 
#define COFFEE_READ(buf, size, offset)    cfs_coffee_arch_read((buf), (size), (offset))
 Read.
 

Detailed Description

Function Documentation

◆ cfs_coffee_arch_erase()

void cfs_coffee_arch_erase ( uint16_t sector)

Erases a device sector.

Parameters
sectorSector to erase

Definition at line 86 of file cfs-coffee-arch.c.

References COFFEE_SECTOR_SIZE.

◆ cfs_coffee_arch_read()

void cfs_coffee_arch_read ( void * buf,
unsigned int size,
cfs_offset_t offset )

Reads from the device to a buffer.

Parameters
bufPointer to the buffer
sizeByte size of the buffer
offsetDevice offset to read from

Definition at line 152 of file cfs-coffee-arch.c.

◆ cfs_coffee_arch_write()

void cfs_coffee_arch_write ( const void * buf,
unsigned int size,
cfs_offset_t offset )

Writes a buffer to the device.

Parameters
bufPointer to the buffer
sizeByte size of the buffer
offsetDevice offset to write to

Definition at line 99 of file cfs-coffee-arch.c.

References COFFEE_PAGE_SIZE.