Contiki-NG

Header file for the cc2538 Coffee port module. More...

#include "contiki.h"
#include "cfs/cfs-coffee.h"
#include "dev/cc2538-dev.h"
#include "dev/flash.h"
#include <stdint.h>

Go to the source code of this file.

Macros

Coffee port constants
#define COFFEE_SECTOR_SIZE   FLASH_PAGE_SIZE
 Logical sector size.
 
#define COFFEE_PAGE_SIZE   (COFFEE_SECTOR_SIZE / 8)
 Logical page size.
 
#define COFFEE_START   CC2538_DEV_FLASH_ADDR
 Start offset of the file system.
 
#define COFFEE_SIZE   0
 Total size in bytes of the file system.
 
#define COFFEE_NAME_LENGTH   40
 Maximal filename length.
 
#define COFFEE_MAX_OPEN_FILES   5
 Number of file cache entries.
 
#define COFFEE_FD_SET_SIZE   5
 Number of file descriptor entries.
 
#define COFFEE_LOG_TABLE_LIMIT   16
 Maximal amount of log table entries read in one batch.
 
#define COFFEE_DYN_SIZE   (COFFEE_SECTOR_SIZE - 50)
 Default reserved file size.
 
#define COFFEE_LOG_SIZE   (4 * COFFEE_PAGE_SIZE)
 Default micro-log size.
 
#define COFFEE_MICRO_LOGS   0
 Whether Coffee will use micro logs.
 
#define COFFEE_APPEND_ONLY   1
 Whether files are expected to be appended to only.
 
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.
 

Typedefs

Coffee port types
typedef int16_t coffee_page_t
 Page.
 

Functions

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

Detailed Description

Header file for the cc2538 Coffee port module.

Definition in file cfs-coffee-arch.h.