Project

General

Profile

Statistics
| Branch: | Revision:

root / arduino-1.0 / libraries / EEPROM / EEPROM.cpp @ 58d82c77

History | View | Annotate | Download (1.77 KB)

1 58d82c77 Tom Mullins
/*
2
  EEPROM.cpp - EEPROM library
3
  Copyright (c) 2006 David A. Mellis.  All right reserved.
4

5
  This library is free software; you can redistribute it and/or
6
  modify it under the terms of the GNU Lesser General Public
7
  License as published by the Free Software Foundation; either
8
  version 2.1 of the License, or (at your option) any later version.
9

10
  This library is distributed in the hope that it will be useful,
11
  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
  Lesser General Public License for more details.
14

15
  You should have received a copy of the GNU Lesser General Public
16
  License along with this library; if not, write to the Free Software
17
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
*/
19
20
/******************************************************************************
21
 * Includes
22
 ******************************************************************************/
23
24
#include <avr/eeprom.h>
25
#include "Arduino.h"
26
#include "EEPROM.h"
27
28
/******************************************************************************
29
 * Definitions
30
 ******************************************************************************/
31
32
/******************************************************************************
33
 * Constructors
34
 ******************************************************************************/
35
36
/******************************************************************************
37
 * User API
38
 ******************************************************************************/
39
40
uint8_t EEPROMClass::read(int address)
41
{
42
        return eeprom_read_byte((unsigned char *) address);
43
}
44
45
void EEPROMClass::write(int address, uint8_t value)
46
{
47
        eeprom_write_byte((unsigned char *) address, value);
48
}
49
50
EEPROMClass EEPROM;