ENTS-tock
Environmental NeTworked Sensor firmware on Tock OS
Loading...
Searching...
No Matches
Storage

Library for interfacing with the MB85RC1MT FRAM chip via TockOS. More...

Modules

 FIFO
 Circular buffer for measurements.
 
 FRAM Definitions
 Definitions for interfacing with FRAM chips Fram interface definitions and helper functions. Supported fram chips implement read and write functions and expose FramInterface type. See fm24cl16b.h.
 

Functions

fram_status mb85rc1mt_write (fram_addr addr, const uint8_t *data, size_t len)
 Write bytes to FRAM at the given address.
 
fram_status mb85rc1mt_read (fram_addr addr, size_t len, uint8_t *data)
 Read bytes from FRAM at the given address.
 
fram_addr mb85rc1mt_size (void)
 Get the total size of FRAM in bytes.
 

Detailed Description

Library for interfacing with the MB85RC1MT FRAM chip via TockOS.

Function Documentation

◆ mb85rc1mt_read()

fram_status mb85rc1mt_read ( fram_addr  addr,
size_t  len,
uint8_t *  data 
)

Read bytes from FRAM at the given address.

Parameters
addrStarting address in FRAM (0 to fram_size()-1)
lenNumber of bytes to read
dataBuffer to read into (must be at least len bytes)
Returns
FRAM_OK on success, FRAM_OUT_OF_RANGE or FRAM_ERROR on failure

Definition at line 165 of file mb85rc1mt.c.

References data, mb85rc1mt_address::dev, FRAM_ERROR, FRAM_OK, i, mb85rc1mt_sleep(), mb85rc1mt_wakeup(), and mb85rc1mt_address::mem.

◆ mb85rc1mt_size()

fram_addr mb85rc1mt_size ( void  )

Get the total size of FRAM in bytes.

Returns
Number of bytes available (131072 for MB85RC1MT)

Definition at line 247 of file mb85rc1mt.c.

◆ mb85rc1mt_write()

fram_status mb85rc1mt_write ( fram_addr  addr,
const uint8_t *  data,
size_t  len 
)

Write bytes to FRAM at the given address.

Parameters
addrStarting address in FRAM (0 to fram_size()-1)
dataPointer to data to write
lenNumber of bytes to write
Returns
FRAM_OK on success, FRAM_OUT_OF_RANGE or FRAM_ERROR on failure

Definition at line 81 of file mb85rc1mt.c.

References buffer, data, mb85rc1mt_address::dev, FRAM_ERROR, FRAM_OK, mb85rc1mt_sleep(), mb85rc1mt_wakeup(), and mb85rc1mt_address::mem.