Contiki 2.5
Functions
mfg-token.c File Reference

Cortex-M3 Manufacturing-Token system. More...

#include "error.h"
#include "hal/micro/cortexm3/flash.h"
#include "mfg-token.h"
#include "hal/micro/cortexm3/token-manufacturing.h"

Go to the source code of this file.

Functions

void halInternalGetMfgTokenData (void *data, int16u ID, int8u index, int8u len)
 Copies the token value from non-volatile storage into a RAM location. More...
 
void halInternalSetMfgTokenData (int16u token, void *data, int8u len)
 Sets the value of a token in non-volatile storage. More...
 

Detailed Description

Cortex-M3 Manufacturing-Token system.

Definition in file mfg-token.c.

Function Documentation

void halInternalGetMfgTokenData ( void *  data,
int16u  token,
int8u  index,
int8u  len 
)

Copies the token value from non-volatile storage into a RAM location.

This is the internal function that the exposed API (halCommonGetMfgToken) expands out to. The API simplifies the access into this function by hiding the size parameter.

Parameters
data,:A pointer to where the data being read should be placed.
token,:The name of the token to get data from. On this platform that name is defined as an address.
index,:The index to access. If the token being accessed is not an indexed token, this parameter is set by the API to be 0x7F.
len,:The length of the token being worked on. This value is automatically set by the API to be the size of the token.

Definition at line 32 of file mfg-token.c.

void halInternalSetMfgTokenData ( int16u  token,
void *  data,
int8u  len 
)

Sets the value of a token in non-volatile storage.

This is the internal function that the exposed API (halCommonSetMfgToken) expands out to. The API simplifies the access into this function by hiding the size parameter.

NOTE: CIB manufacturing tokens can only be written by on-chip code if the token is currently unprogrammed.

REMEMBER: The flash hardware requires writing to 16bit aligned addresses with a length that is multiples of 16bits.

Parameters
token,:The name of the token to get data from. On this platform that name is defined as an address.
data,:A pointer to the data being written.
len,:The length of the token being worked on. This value is automatically set by the API to be the size of the token.

Definition at line 77 of file mfg-token.c.

References halInternalFlashWrite().