~ubuntu-branches/ubuntu/raring/avr-libc/raring-proposed

« back to all changes in this revision

Viewing changes to libc/misc/readme_eeprom.txt

  • Committer: Bazaar Package Importer
  • Author(s): Hakan Ardo
  • Date: 2009-10-31 11:52:10 UTC
  • mfrom: (1.1.8 upstream) (4.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091031115210-x0mlijnegkce86fk
Tags: 1:1.6.7-1
* New upstream relese (closes: #544030)
* Added lintian overrides (closes: #553265)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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: readme_eeprom.txt,v 1.1.2.2 2009/06/20 07:23:15 dmix Exp $
 
30
 
 
31
Register usage of internally-used functions, common archs:
 
32
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
33
 
 
34
    eeprom_read_blraw:
 
35
        Input:
 
36
            r27,r26     - data space address (destination)
 
37
            r25,r24     - EEPROM address
 
38
            r21,r20     - number of bytes
 
39
        Scratch:
 
40
            common call-used regs.
 
41
 
 
42
    eeprom_update_r18:
 
43
        Input:
 
44
            r18         - byte to write
 
45
            r25,r24     - EEPROM address
 
46
        Output:
 
47
            r25,r24     - decremented EEPROM address
 
48
        Scratch:
 
49
            r0
 
50
 
 
51
    eeprom_update_byte:
 
52
        Input:
 
53
            r22         - byte to write
 
54
            r25,r24     - EEPROM address
 
55
        Output:
 
56
            r25,r24     - decremented EEPROM address
 
57
        Scratch:
 
58
            r18,r0
 
59
    
 
60
    eeprom_write_r18:
 
61
        Input:
 
62
            r18         - byte to write
 
63
            r25,r24     - EEPROM address
 
64
        Output:
 
65
            r25,r24     - incremented EEPROM address
 
66
        Scratch:
 
67
            r0
 
68
    
 
69
    eeprom_write_byte:
 
70
        Input:
 
71
            r22         - byte to write
 
72
            r25,r24     - EEPROM address
 
73
        Output:
 
74
            r25,r24     - incremented EEPROM address
 
75
        Scratch:
 
76
            r18,r0
 
77
 
 
78
 
 
79
Register usage of internally-used functions, XMEGA arch:
 
80
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
81
 
 
82
    eeprom_mapen:
 
83
        Input:
 
84
            r25,r24     - EEPROM address
 
85
        Output:
 
86
            ZH,ZL       - EEPROM address + 0x2000 (to use mapping)
 
87
        Scratch:
 
88
            r19
 
89
 
 
90
    eeprom_update_r18:
 
91
        Input:
 
92
            r18         - byte to write
 
93
            r25,r24     - EEPROM address
 
94
        Output:
 
95
            r25,r24     - decremented EEPROM address
 
96
        Scratch:
 
97
            r31,r30,r19,r18,r0
 
98
 
 
99
    eeprom_update_byte:
 
100
        Input:
 
101
            r22         - byte to write
 
102
            r25,r24     - EEPROM address
 
103
        Output:
 
104
            r25,r24     - decremented EEPROM address
 
105
        Scratch:
 
106
            r31,r30,r19,r18,r0
 
107
 
 
108
    eeprom_write_r18:
 
109
        Input:
 
110
            r18         - byte to write
 
111
            r25,r24     - EEPROM address
 
112
        Output:
 
113
            r25,r24     - incremented EEPROM address
 
114
        Scratch:
 
115
            r31,r30,r19,r18
 
116
 
 
117
    eeprom_write_byte:
 
118
        Input:
 
119
            r22         - byte to write
 
120
            r25,r24     - EEPROM address
 
121
        Output:
 
122
            r25,r24     - incremented EEPROM address
 
123
        Scratch:
 
124
            r31,r30,r19,r18