Subversion Repositories HomeAutomation

Rev

Details | Last modification | View Log | SVN | RSS feed

Rev Author Line No. Line
1253 linlun 1
/*! \file i2ceeprom.h \brief Interface for standard I2C EEPROM memories. */
2
//*****************************************************************************
3
//
4
// File Name    : 'i2ceeprom.h'
5
// Title        : Interface for standard I2C EEPROM memories
6
// Author       : Pascal Stang - Copyright (C) 2003
7
// Created      : 2003.04.23
8
// Revised      : 2003.04.23
9
// Version      : 0.1
10
// Target MCU   : Atmel AVR series
11
// Editor Tabs  : 4
12
//
13
/// \ingroup driver_hw
14
/// \defgroup i2ceeprom Interface for standard I2C EEPROM memories (i2ceeprom.c)
15
/// \code #include "i2ceeprom.h" \endcode
16
/// \par Overview
17
///     This library provides functions for reading and writing standard
18
/// 24Cxxx/24LCxxx I2C EEPROM memories.  Memory sizes up to 64Kbytes are
19
/// supported.  Future revisions may include page-write support.
20
//
21
// This code is distributed under the GNU Public License
22
//      which can be found at http://www.gnu.org/licenses/gpl.txt
23
//
24
//*****************************************************************************
25
 
26
#ifndef I2CEEPROM_H
27
#define I2CEEPROM_H
28
 
29
#include <avr/io.h>
30
#include <avr/interrupt.h>
31
#include <stdio.h>
32
//#include <global.h>
33
 
34
// functions
35
 
36
//! Initialize I2C EEPROM interface
37
void i2ceepromInit(void);
38
 
39
//! In the I2C EEPROM at [i2cAddr], read a byte from memory location [memAddr]
40
uint8_t i2ceepromReadByte(uint8_t i2cAddr, uint16_t memAddr);
41
 
42
//! In the I2C EEPROM at [i2cAddr], write a byte [data] to the memory location [memAddr]
43
void i2ceepromWriteByte(uint8_t i2cAddr, uint16_t memAddr, uint8_t data);
44
 
45
#endif