AVR Libc Home Page |  | AVR Libc Development Pages
Main Page | User Manual | Library Reference | FAQ | Alphabetical Index | Example Projects

eedef.h
1 /* Copyright (c) 2009 Dmitry Xmelkov
2 All rights reserved.
3
4 Redistribution and use in source and binary forms, with or without
5 modification, are permitted provided that the following conditions are met:
6
7 * Redistributions of source code must retain the above copyright
8 notice, this list of conditions and the following disclaimer.
9 * Redistributions in binary form must reproduce the above copyright
10 notice, this list of conditions and the following disclaimer in
11 the documentation and/or other materials provided with the
12 distribution.
13 * Neither the name of the copyright holders nor the names of
14 contributors may be used to endorse or promote products derived
15 from this software without specific prior written permission.
16
17 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 POSSIBILITY OF SUCH DAMAGE. */
28
29 /* $Id: eedef.h 1983 2009-06-05 23:16:05Z dmix $ */
30
31 #ifndef _EEDEF_H_
32 #define _EEDEF_H_ 1
33
34 #ifndef __DOXYGEN__
35
36 /* Internal functions redefinition. */
37 #define eeprom_read_blraw _EEPROM_CONCAT2 (__eerd_blraw, _EEPROM_SUFFIX)
38 #define eeprom_write_r18 _EEPROM_CONCAT2 (__eewr_r18, _EEPROM_SUFFIX)
39 #define eeprom_update_r18 _EEPROM_CONCAT2 (__eeupd_r18, _EEPROM_SUFFIX)
40
41 /* EEPROM address arg for a set of byte/word/dword functions and for
42 the internal eeprom_read_blraw(). */
43 #define addr_lo r24
44 #define addr_hi r25
45
46 /* Number of bytes arg for all block read/write functions, include
47 internal. */
48 #define n_lo r20
49 #define n_hi r21
50
51 #if __AVR_XMEGA__
52
53 # define NVM_BASE NVM_ADDR0
54
55 #else
56
57 # if !defined (EECR) && defined (DEECR) /* AT86RF401 */
58 # define EECR DEECR
59 # define EEARL DEEAR
60 # define EEDR DEEDR
61 # endif
62
63 # if !defined (EERE) && defined (EER) /* AT86RF401 */
64 # define EERE EER
65 # endif
66
67 # if !defined (EEWE) && defined (EEPE) /* A part of Mega and Tiny */
68 # define EEWE EEPE
69 # endif
70 # if !defined (EEWE) && defined (EEL) /* AT86RF401 */
71 # define EEWE EEL
72 # endif
73
74 # if !defined (EEMWE) && defined (EEMPE) /* A part of Mega and Tiny */
75 # define EEMWE EEMPE
76 # endif
77 # if !defined (EEMWE) && defined (EEU) /* AT86RF401 */
78 # define EEMWE EEU
79 # endif
80
81 # if !_SFR_IO_REG_P (EECR) \
82 || !_SFR_IO_REG_P (EEDR) \
83 || !_SFR_IO_REG_P (EEARL) \
84 || (defined (EEARH) && !_SFR_IO_REG_P (EEARH))
85 # error
86 # endif
87
88 #endif /* !__AVR_XMEGA__ */
89 #endif /* !__DOXYGEN__ */
90 #endif /* !_EEDEF_H_ */

Automatically generated by Doxygen 1.8.3.1 on Sat Sep 14 2013.