flash.c File Reference

Functions for reading and writing flash ROM. More...

#include "contiki.h"
#include <stdlib.h>
#include <io.h>
#include <signal.h>
#include "dev/flash.h"
#include "dev/watchdog.h"

Go to the source code of this file.

Functions

void flash_setup (void)
 Setup function to be called before any of the flash programming functions.
void flash_done (void)
 Function that is to be called after flashing is done.
void flash_clear (unsigned short *ptr)
 Clear a 16-bit word in flash ROM.
void flash_write (unsigned short *ptr, unsigned short word)
 Write a 16-bit word to flash ROM.

Detailed Description

Functions for reading and writing flash ROM.

Author:
Adam Dunkels <adam@sics.se>

Definition in file flash.c.


Function Documentation

void flash_clear ( unsigned short *  addr  ) 

Clear a 16-bit word in flash ROM.

This function clears a 16-bit word in flash ROM. The function flash_setup() must have been called first.

Parameters:
addr A pointer to the address in flash ROM which is to be cleared.

Definition at line 96 of file flash.c.

Referenced by elfloader_arch_write_rom().

void flash_write ( unsigned short *  addr,
unsigned short  word 
)

Write a 16-bit word to flash ROM.

This function writes a 16-bit word to flash ROM. The function flash_setup() must have been called first.

Parameters:
addr A pointer to the address in flash ROM which is to be written.
word The 16-bit word that is to be written.

Definition at line 108 of file flash.c.

Referenced by elfloader_arch_write_rom().


Generated on Mon Apr 11 14:23:47 2011 for Contiki 2.5 by  doxygen 1.6.1