Contiki-Inga 3.x
Main Page
Related Pages
Modules
Data Structures
Files
Examples
File List
Globals
cpu
msp430
dev
flash.h
Go to the documentation of this file.
1
/**
2
* \file
3
* Functions for reading and writing MSP430 flash ROM.
4
* \author Adam Dunkels <adam@sics.se>
5
*/
6
7
/* Copyright (c) 2004 Swedish Institute of Computer Science.
8
* All rights reserved.
9
*
10
* Redistribution and use in source and binary forms, with or without
11
* modification, are permitted provided that the following conditions
12
* are met:
13
*
14
* 1. Redistributions of source code must retain the above copyright notice,
15
* this list of conditions and the following disclaimer.
16
* 2. Redistributions in binary form must reproduce the above copyright notice,
17
* this list of conditions and the following disclaimer in the documentation
18
* and/or other materials provided with the distribution.
19
* 3. The name of the author may not be used to endorse or promote products
20
* derived from this software without specific prior written permission.
21
*
22
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
23
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
26
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
28
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
30
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
31
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
*
34
*
35
* Author: Adam Dunkels <adam@sics.se>
36
*
37
*/
38
39
#ifndef FLASH_H_
40
#define FLASH_H_
41
42
/**
43
* Setup function to be called before any of the flash programming functions.
44
*
45
*/
46
void
flash_setup
(
void
);
47
48
/**
49
* Function that is to be called after flashing is done.
50
*/
51
void
flash_done
(
void
);
52
53
/**
54
* Write a 16-bit word to flash ROM.
55
*
56
* This function writes a 16-bit word to flash ROM. The function
57
* flash_setup() must have been called first.
58
*
59
* \param addr A pointer to the address in flash ROM which is to be
60
* written.
61
*
62
* \param word The 16-bit word that is to be written.
63
*/
64
void
flash_write
(
unsigned
short
*addr,
unsigned
short
word);
65
66
/**
67
* Clear a 16-bit word in flash ROM.
68
*
69
* This function clears a 16-bit word in flash ROM. The function
70
* flash_setup() must have been called first.
71
*
72
* \param addr A pointer to the address in flash ROM which is to be
73
* cleared.
74
*/
75
void
flash_clear
(
unsigned
short
*addr);
76
77
#endif
/* FLASH_H_ */
Generated on Thu Apr 24 2014 16:26:15 for Contiki-Inga 3.x by
1.8.3.1