Subversion Repositories idreammicro-avr

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
65 jlesech 1
/**************************************************************************//**
2
 * \brief EEPROM library
3
 * \author Copyright (C) 2011  Julien Le Sech - www.idreammicro.com
4
 * \version 1.0
5
 * \date 20111017
6
 *
7
 * This file is part of the iDreamMicro library.
8
 *
9
 * This library is free software: you can redistribute it and/or modify it under
10
 * the terms of the GNU Lesser General Public License as published by the Free
11
 * Software Foundation, either version 3 of the License, or (at your option) any
12
 * later version.
13
 *
14
 * This library is distributed in the hope that it will be useful, but WITHOUT
15
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
17
 * details.
18
 *
19
 * You should have received a copy of the GNU Lesser General Public License
20
 * along with this program. If not, see http://www.gnu.org/licenses/
21
 ******************************************************************************/
22
 
23
/**************************************************************************//**
24
 * \headerfile eeprom.h
25
 ******************************************************************************/
26
 
27
#ifndef H__IDREAMMICRO__EEPROM__H
28
#define H__IDREAMMICRO__EEPROM__H
29
 
30
#ifdef _cplusplus
31
extern "C"{
32
#endif
33
 
34
/******************************************************************************
35
 * Header file inclusions.
36
 ******************************************************************************/
37
 
38
#include <stdint.h>
39
 
40
/******************************************************************************
41
 * Public function definitions.
42
 ******************************************************************************/
43
 
44
/**************************************************************************//**
45
 * \fn void eeprom__write_byte(
46
 * uint16_t address,
47
 * uint8_t  data)
48
 *
49
 * \brief Write a byte in EEPROM.
50
 *
51
 * \param   address Address.
52
 * \param   data    Data to write.
53
 ******************************************************************************/
54
void
55
eeprom__write_byte
56
(
57
    uint16_t    address,
58
    uint8_t     data
59
);
60
 
61
/**************************************************************************//**
62
 * \fn void eeprom__write_bytes(
63
 * uint16_t address,
64
 * uint16_t size,
65
 * uint8_t* p_data)
66
 *
67
 * \brief Write bytes into EEPOM.
68
 *
69
 * \param       address Address.
70
 * \param       size    Data size.
71
 * \param[in]   p_data  Data to write.
72
 ******************************************************************************/
73
void
74
eeprom__write_bytes
75
(
76
    uint16_t    address,
77
    uint16_t    size,
78
    uint8_t*    p_data
79
);
80
 
81
/**************************************************************************//**
82
 * \fn uint8_t eeprom__read_byte(
83
 * uint16_t address)
84
 *
85
 * \brief Read data into EEPROM.
86
 *
87
 * \param   address Address of data to read.
88
 *
89
 * \return Read data.
90
 ******************************************************************************/
91
uint8_t
92
eeprom__read_byte
93
(
94
    uint16_t    address
95
);
96
 
97
/**************************************************************************//**
98
 * \fn void eeprom__read_bytes(
99
 * uint16_t address,
100
 * uint16_t size,
101
 * uint8_t* p_data)
102
 *
103
 * \brief Read bytes from EEPROM.
104
 *
105
 * \param   address     Address to read.
106
 * \param   size        Data size to read.
107
 * \param[in]   p_data  Data buffer.
108
 ******************************************************************************/
109
void
110
eeprom__read_bytes
111
(
112
    uint16_t    address,
113
    uint16_t    size,
114
    uint8_t*    p_data
115
);
116
 
117
#ifdef _cplusplus
118
}
119
#endif
120
 
121
#endif /* H__IDREAMMICRO__EEPROM__H */