# SFBEeprom.h

Go to the documentation of this file.

    00001 /*                                              -*- mode:C++; fill-column:100 -*-
    00002   SFBEeprom.h - Support for I/O with the EEPROM
    00003   Copyright (C) 2009 The Regents of the University of New Mexico.  All rights reserved.
    00004
    00005   This library is free software; you can redistribute it and/or
    00006   modify it under the terms of the GNU Lesser General Public
    00007   License as published by the Free Software Foundation; either
    00008   version 2.1 of the License, or (at your option) any later version.
    00009
    00010   This library is distributed in the hope that it will be useful,
    00011   but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00013   Lesser General Public License for more details.
    00014
    00015   You should have received a copy of the GNU General Public License
    00016   along with this library; if not, write to the Free Software
    00017   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
    00018   USA
    00019 */
    00020
    00105 #ifndef SFBEEPROM_H_
    00106 #define SFBEEPROM_H_
    00107
    00108 #include "SFBTypes.h"
    00109
    00127 extern void eepromWrite(u32 addr, const u8 * source, u32 length) ;
    00128
    00144 extern void eepromRead(u32 addr, u8 * dest, u32 length) ;
    00145
    00156 extern void eepromWait(bool busyWait = false) ;
    00157
    00163 extern u32 eepromSize() ;
    00164
    00165 #define EEPROM_SIZE_BYTES (1<<14)
    00166 #define EEPROM_BYTES_PER_PAGE 64
    00167 #define EEPROM_RESERVED_PAGES 2
    00168 #define EEPROM_RESERVED_BYTES (EEPROM_RESERVED_PAGES*EEPROM_BYTES_PER_PAGE)
    00190 extern void eepromWriteReserved(const u32 addr, const u8 * data, const u32 length) ;
    00191
    00207 extern void eepromReadReserved(const u32 addr, u8 * data,const u32 length) ;
    00208
    00215 extern void eeprom_startup_initialization() ;
    00216
    00217
    00218 #endif /*SFBEEPROM_H_*/