Contiki 2.5
Functions
infomem.c File Reference
#include <string.h>
#include <signal.h>
#include <stdarg.h>
#include "contiki-conf.h"
#include <msp430/flash.h>
#include "infomem.h"

Go to the source code of this file.

Functions

void infomem_read (void *buffer, unsigned int offset, unsigned char size)
 Read bytes from infomemory. More...
 
bool infomem_write (unsigned int offset, unsigned char count,...)
 Write bytes to infomemory. More...
 

Function Documentation

void infomem_read ( void *  buffer,
unsigned int  offset,
unsigned char  size 
)

Read bytes from infomemory.

Parameters
[out]bufferPointer to buffer for read data
[in]offsetOffset in infomemory (0-254)
[in]sizeNumber of bytes to read

Definition at line 61 of file infomem.c.

bool infomem_write ( unsigned int  offset,
unsigned char  count,
  ... 
)

Write bytes to infomemory.

Parameters
[in]offsetOffset in infomemory (0-254)
[in]countNumber of items following each item is a pair pointer, length

Example: Infomem_write( 0, 2, &a,3, &b,1 );

Note
: The MSP430 has two consecutive blocks of infomemory. Each is 128 bytes large. The offset is the relative address starting at the beginning of the first block. You can write an arbitrary number of bytes at any offset, but this function cannot write across the two blocks of infomemory.

Definition at line 68 of file infomem.c.

References FALSE, and TRUE.