diff --git a/.gitignore b/.gitignore index 4f67165..4e35139 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ VStudio/.vs *.db *.log + +desktop\.ini diff --git a/EEPROMextent.zip b/EEPROMextent.zip index 8fce703..73e51f0 100644 Binary files a/EEPROMextent.zip and b/EEPROMextent.zip differ diff --git a/History/EEPROMextent.1.2.1.zip b/History/EEPROMextent.1.2.1.zip new file mode 100644 index 0000000..73e51f0 Binary files /dev/null and b/History/EEPROMextent.1.2.1.zip differ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/LICENSE @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/WhatsNew.TXT b/WhatsNew.TXT index 2cf8006..bb34419 100644 --- a/WhatsNew.TXT +++ b/WhatsNew.TXT @@ -3,6 +3,13 @@ This is a library for Arduino to read/write complex data to EEPROM. Whats New ? +15/07/2018 V1.2.1 + - Correction du format de Keywords.txt + - Ajout du fichier LICENSE + + - Fix Keywords.txt format. + - Add of LICENSE file + 24/11/2017 V1.2.0 - Mise en forme du numéro de version en 'semver' (Semantic Versioning 2.0.0). diff --git a/extras/Doc/CircularBuffer_8cpp_source.html b/extras/Doc/CircularBuffer_8cpp_source.html new file mode 100644 index 0000000..12e0851 --- /dev/null +++ b/extras/Doc/CircularBuffer_8cpp_source.html @@ -0,0 +1,119 @@ + + + + + + + +EEPROMextent: D:/Mes documents/Trusty/Arduino/Libraries/EEPROMextent/src/CircularBuffer.cpp Source File + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EEPROMextent +
+
Arduino EEPROM library
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
CircularBuffer.cpp
+
+
+
+
1 /*************************************************************
2 project: <EEPROMextent>
3 author: <Thierry PARIS>
4 description: <Class for a circular buffer of data stored in EEPROM>
5 *************************************************************/
6 
7 #include "CircularBuffer.hpp"
8 
9 /*
10 A circular buffer is a way to reduce the use of each EEPROM cell,
11 and improve life time of the full EEPROM memory.
12 An index of bytes is stored at the beginning of the area.
13 Each index represents a data area.
14 
15 |0|1|2|3|4||---0---|---1---|---2---|---3---|---4---|
16 */
17 
18 byte CircularBuffer::FindEnd()
19 {
20  /*
21  prev is the previous value from the item in the list
22  |..|..|prev|i|..|..|
23 
24  we begin with the first item of the list. In this case, the previous is the last one:
25  |i|..|..|..|..|prev|
26  */
27 
28  int prevpos = this->startListPos + this->replicaNumber - 1;
29  byte prev = EEPROMextent.readByte(prevpos);
30 
31  for (int i = 0; i < this->replicaNumber; i++)
32  {
33  int pos = this->startListPos + i;
34 
35  // Checks it the current value is really the previous value + 1 :
36  // 4 must be 3+1, 0 must be 255 + 1 !
37  if (prev + 1 != EEPROMextent.readByte(pos))
38  return prevpos - this->startListPos;
39 
40  prev = EEPROMextent.readByte(pos);
41  prevpos = pos;
42  }
43 
44  // Should never reach this code !
45 
46  return 255;
47 }
48 
49 void * CircularBuffer::read(void* outpData)
50 {
51  byte place = this->FindEnd();
52  eeprom_read_block((uint8_t *)outpData, (const uint8_t *)INT64 (this->startListPos + this->replicaNumber + (this->elementSize * place)), this->elementSize);
53 
54  return outpData;
55 }
56 
57 void CircularBuffer::write(void* inpData, bool inUpdate)
58 {
59  byte place = this->FindEnd();
60  byte itemNb = EEPROMextent.readByte(this->startListPos + place);
61 
62  place++;
63  if (place >= this->replicaNumber)
64  place = 0;
65 
66  if (inUpdate)
67  {
68  EEPROMextent.updateByte(this->startListPos + place, ++itemNb);
69  eeprom_update_block((const uint8_t *)inpData, (uint8_t *)INT64 (this->startListPos + this->replicaNumber + (this->elementSize * place)), this->elementSize);
70  }
71  else
72  {
73  EEPROMextent.writeByte(this->startListPos + place, ++itemNb);
74  eeprom_write_block((const uint8_t *)inpData, (uint8_t *)INT64 (this->startListPos + this->replicaNumber + (this->elementSize * place)), this->elementSize);
75  }
76 }
77 
79 {
80  EEPROMextent.clear(this->startListPos, (this->elementSize + 1) * this->replicaNumber);
81 }
82 
84 {
85  byte place = this->FindEnd();
86  return this->startListPos + this->replicaNumber + (this->elementSize * place);
87 }
88 
90 {
91  byte place = this->FindEnd();
92  byte itemNb = EEPROMextent.readByte(this->startListPos + place);
93 
94  place++;
95  if (place >= this->replicaNumber)
96  place = 0;
97 
98  EEPROMextent.updateByte(this->startListPos + place, ++itemNb);
99 
100  return this->startListPos + this->replicaNumber + (this->elementSize * place);
101 }
102 
103 #ifdef VISUALSTUDIO
104 //#include "Serial.hpp"
105 #endif
106 
107 #ifdef EEPROMEXTENT_DEBUG_MODE
108 void CircularBuffer::printStatus()
109 {
110  Serial.print(F("CB Status : "));
111  for (int i = 0; i < this->replicaNumber; i++)
112  {
113  Serial.print(F("|"));
114  Serial.print(EEPROMextent.readByte(this->startListPos + i));
115  }
116  Serial.println(F("|"));
117 }
118 #endif
119 
120 
121 
+
void updateByte(int address, uint8_t value)
Definition: EEPROMextent.h:85
+
void write(void *inpObject, bool inUpdate = false)
+
void clear(int address, int inSize, byte inFillCharacter = 0)
+
void clear() const
+
void writeByte(int address, uint8_t value)
Definition: EEPROMextent.h:76
+
void * read(void *outpObject)
+ +
uint8_t readByte(int address)
Definition: EEPROMextent.h:68
+
+
+ + + + diff --git a/extras/Doc/CircularBuffer_8hpp_source.html b/extras/Doc/CircularBuffer_8hpp_source.html index f6cd81b..15ecae7 100644 --- a/extras/Doc/CircularBuffer_8hpp_source.html +++ b/extras/Doc/CircularBuffer_8hpp_source.html @@ -9,6 +9,20 @@ + + + + + + + + + @@ -22,49 +36,84 @@
Arduino EEPROM library
+
+ + + + + + +
+ - +
+ - + +
+ +
+
+ + +
+ +
+
CircularBuffer.hpp
-
1 //-------------------------------------------------------------------
2 #ifndef __EEPROM_CircularBuffer_H__
3 #define __EEPROM_CircularBuffer_H__
4 //-------------------------------------------------------------------
5 
6 #include "EEPROMextent.h"
7 
31 {
32 private:
33  int StartListPos;
34  byte ItemSize;
35  byte ReplicaNumber;
36 
37 public:
39  CircularBuffer() { this->ItemSize = 0; this->ReplicaNumber = 0; this->StartListPos = 0; }
40 
47  int begin(int inStartListPos, byte inElementSize, byte inReplicaNumber)
48  {
49  this->StartListPos = inStartListPos; this->ItemSize = inItemSize; this->ReplicaNumber = inReplicaNumber;
50  return (this->ItemSize + 1) * this->ReplicaNumber;
51  }
52 
57  void *read(void* outpObject);
63  void write(void* inpObject, bool inUpdate = false);
67  inline void update(void *inpObject) { write(inpObject, true); }
68 
72  int getStartRead();
76  int startWrite();
77 
79  void clear() const;
80 
81 #ifdef EEPROMEXTENT_DEBUG_MODE
82 
83  void printStatus();
84 #endif
85 
86 private:
87  byte FindEnd();
88 };
89 
90 //-------------------------------------------------------------------
91 #endif
92 //-------------------------------------------------------------------
int startWrite()
Definition: CircularBuffer.cpp:89
-
int getStartRead()
Definition: CircularBuffer.cpp:83
-
void update(void *inpObject)
Definition: CircularBuffer.hpp:67
-
void write(void *inpObject, bool inUpdate = false)
Definition: CircularBuffer.cpp:57
-
void * read(void *outpObject)
Definition: CircularBuffer.cpp:49
-
int begin(int inStartListPos, byte inElementSize, byte inReplicaNumber)
Definition: CircularBuffer.hpp:47
-
void clear() const
Definition: CircularBuffer.cpp:78
-
CircularBuffer()
Definition: CircularBuffer.hpp:39
-
Definition: CircularBuffer.hpp:30
+
1 //-------------------------------------------------------------------
2 #ifndef __EEPROM_CircularBuffer_H__
3 #define __EEPROM_CircularBuffer_H__
4 //-------------------------------------------------------------------
5 
6 #include "arduino.h"
7 #include "EEPROMextent.h"
8 
32 {
33 private:
34  int startListPos;
35  byte elementSize;
36  byte replicaNumber;
37 
38 public:
40  CircularBuffer() { this->elementSize = 0; this->replicaNumber = 0; this->startListPos = 0; }
41 
48  int begin(int inStartListPos, byte inElementSize, byte inReplicaNumber)
49  {
50  this->startListPos = inStartListPos; this->elementSize = inElementSize; this->replicaNumber = inReplicaNumber;
51  return (this->elementSize + 1) * this->replicaNumber;
52  }
53 
58  void *read(void* outpObject);
64  void write(void* inpObject, bool inUpdate = false);
68  inline void update(void *inpObject) { write(inpObject, true); }
69 
73  int getStartRead();
77  int startWrite();
78 
80  void clear() const;
81 
82 #ifdef EEPROMEXTENT_DEBUG_MODE
83 
84  void printStatus();
85 #endif
86 
87 private:
88  byte FindEnd();
89 };
90 
91 //-------------------------------------------------------------------
92 #endif
93 //-------------------------------------------------------------------
+ +
void update(void *inpObject)
+
int begin(int inStartListPos, byte inElementSize, byte inReplicaNumber)
+
void clear() const
+
void * read(void *outpObject)
+ +
void write(void *inpObject, bool inUpdate = false)
+
+
- + diff --git a/extras/Doc/Config/DoxyPressApp.json b/extras/Doc/Config/DoxyPressApp.json index 2f76af6..4d18e1b 100644 --- a/extras/Doc/Config/DoxyPressApp.json +++ b/extras/Doc/Config/DoxyPressApp.json @@ -21,7 +21,7 @@ "extract-private": false, "extract-static": false, "file-version-filter": "", - "force-local-includes": false, + "force-local-includes": true, "full-path-names": true, "generate-bug-list": true, "generate-deprecate-list": true, @@ -56,11 +56,11 @@ "" ], "qt-auto-brief": false, - "repeat-brief": true, + "repeat-brief": false, "separate-member-pages": false, "short-names": false, "show-file-page": true, - "show-grouped-members-inc": false, + "show-grouped-members-inc": true, "show-include-files": true, "show-namespace-page": true, "show-used-files": true, @@ -165,7 +165,7 @@ "strip-from-path": [ "" ], - "tab-size": 4 + "tab-size": 2 }, "index": { "alpha-index": true, @@ -203,7 +203,7 @@ "image-path": [ "" ], - "input-encoding": "UTF-8", + "input-encoding": "ISO-8859-1", "input-patterns": [ "*.as", "*.c", @@ -289,13 +289,13 @@ "generate-eclipse": false }, "output-html": { - "disable-index": false, + "disable-index": true, "enum-values-per-line": 4, - "external-links-in-window": false, + "external-links-in-window": true, "formula-fontsize": 10, "formula-transparent": true, "generate-html": true, - "generate-treeview": false, + "generate-treeview": true, "ghostscript": "", "html-colorstyle-gamma": 80, "html-colorstyle-hue": 18, @@ -309,7 +309,7 @@ "html-header": "", "html-index-num-entries": 100, "html-output": "..", - "html-search": false, + "html-search": true, "html-stylesheets": [ "" ], @@ -417,7 +417,7 @@ ], "macro-expansion": false, "predefined-macros": [ - "" + "DOXYGEN_SPECIFIC=" ], "search-includes": true, "skip-function-macros": true @@ -437,7 +437,7 @@ "ref-by-relation": false, "ref-link-source": true, "ref-relation": false, - "source-code": false, + "source-code": true, "source-tooltips": true, "strip-code-comments": true, "suffix-exclude-navtree": [ diff --git a/extras/Doc/EEPROM__ItemList_8cpp_source.html b/extras/Doc/EEPROM__ItemList_8cpp_source.html new file mode 100644 index 0000000..10056b2 --- /dev/null +++ b/extras/Doc/EEPROM__ItemList_8cpp_source.html @@ -0,0 +1,122 @@ + + + + + + + +EEPROMextent: D:/Mes documents/Trusty/Arduino/Libraries/EEPROMextent/src/EEPROM_ItemList.cpp Source File + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EEPROMextent +
+
Arduino EEPROM library
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
EEPROM_ItemList.cpp
+
+
+
+
1 /*************************************************************
2 project: <EEPROMextent>
3 author: <Thierry PARIS>
4 description: <Class for a full hierarchical list of items of the same size stored in EEPROM>
5 *************************************************************/
6 
7 #include "EEPROM_ItemList.hpp"
8 
9 /*
10 The item list area of the EEPROM is a long list of items of the same size.
11 Each item can be identified by a type.
12 Each item has its own structure, but is stored in a 'slot' of EEPROM_ItemList::ItemSize.
13 Each item slot begins with two bytes : the type, and the owner (255 if null)
14 This owner gives the ability to build a hierarchical item tree !
15 The owner id is in reality the address of the slot of the owner !
16 */
17 
18 void EEPROM_ItemListClass::FreeItem(byte inSlotNumber)
19 {
20  // Replace the type by '0' : free slot !
21  EEPROMextent.updateByte(GetItemPosRaw(inSlotNumber), 0);
22  FreeOwnedItems(inSlotNumber);
23 }
24 
25 void EEPROM_ItemListClass::FreeOwnedItems(byte inOwnerSlotNumber)
26 {
27  int slot = 0;
28  for (int pos = this->startListPos; pos < this->startListPos + this->listSize; pos += itemSize)
29  {
30  if (EEPROMextent.readByte(pos) == 0)
31  continue;
32  if (EEPROMextent.readByte(pos + 1) == inOwnerSlotNumber)
33  {
34  // Replace the type by '0' : free slot !
35  EEPROMextent.updateByte(pos, 0);
36  // also remove the owned items, and their owned items in turn...
37  FreeItem(slot);
38  }
39  slot++;
40  }
41 }
42 
43 byte EEPROM_ItemListClass::FindItem(byte inType, byte inStartSlotNumber, byte inOwnerId)
44 {
45  byte slot = inStartSlotNumber;
46 
47  for (int pos = startListPos + (inStartSlotNumber * itemSize); pos < this->startListPos + this->listSize; pos += itemSize)
48  {
49  if (EEPROMextent.readByte(pos) == inType)
50  if (inOwnerId == 255 || EEPROMextent.readByte(pos + 1) == inOwnerId)
51  return slot;
52  slot++;
53  }
54 
55  return 255;
56 }
57 
59 {
60  byte nb = 0;
61 
62  for (int pos = startListPos; pos < this->startListPos + this->listSize; pos += itemSize)
63  if (inType == 0 || EEPROMextent.readByte(pos) == inType)
64  nb++;
65 
66  return nb;
67 }
68 
70 {
71  byte nb = 0;
72 
73  for (int pos = startListPos; pos < this->startListPos + this->listSize; pos += itemSize)
74  if (EEPROMextent.readByte(pos) != 0 && EEPROMextent.readByte(pos + 1) == inOwnerId)
75  nb++;
76 
77  return nb;
78 }
79 
81 {
82  byte slot = 0;
83 
84  for (int pos = startListPos; pos < this->startListPos + this->listSize; pos += itemSize)
85  {
86  byte val = EEPROMextent.readByte(pos);
87  if (val == 0)
88  return slot;
89  slot++;
90  }
91 
92  return 255;
93 }
94 
95 int EEPROM_ItemListClass::SaveItemPrefix(byte inSlotNumber, byte inType, byte inOwner)
96 {
97  int pos = GetItemPosRaw(inSlotNumber);
98  EEPROMextent.updateByte(pos++, inType);
99  EEPROMextent.updateByte(pos++, inOwner);
100  return pos;
101 }
102 
104 {
105  EEPROMextent.clear(this->startListPos, this->listSize);
106 }
107 
108 
109 
void clear(int address, int inSize, byte inFillCharacter = 0)
+ +
byte CountItems(byte inType)
+
int GetItemPosRaw(byte inSlotNumber)
+
void FreeItem(byte inSlotNumber)
+
byte CountOwnedItems(byte inOwnerId)
+
void updateByte(int address, uint8_t value)
Definition: EEPROMextent.h:85
+
int SaveItemPrefix(byte inSlotNumber, byte inType, byte inOwner)
+
void FreeOwnedItems(byte inOwnerSlotNumber)
+
uint8_t readByte(int address)
Definition: EEPROMextent.h:68
+
byte FindItem(byte inType, byte inStartSlotNumber = 0, byte inOwnerId = 255)
+ +
+
+ + + + diff --git a/extras/Doc/EEPROM__ItemList_8hpp_source.html b/extras/Doc/EEPROM__ItemList_8hpp_source.html index 5c52c7a..6f32e4f 100644 --- a/extras/Doc/EEPROM__ItemList_8hpp_source.html +++ b/extras/Doc/EEPROM__ItemList_8hpp_source.html @@ -9,6 +9,20 @@ + + + + + + + + + @@ -22,56 +36,92 @@
Arduino EEPROM library
+
+ + + + + + +
+
- +
+ - + +
+ +
+
+ + +
+ +
+
EEPROM_ItemList.hpp
-
1 //-------------------------------------------------------------------
2 #ifndef __EEPROM_ItemList_H__
3 #define __EEPROM_ItemList_H__
4 //-------------------------------------------------------------------
5 
6 #define EEPROMLIST_EMPTY_OWNER 255
7 
8 #include "EEPROMextent.h"
9 
31 {
32 private:
33  int StartListPos;
34  byte ItemSize;
35  int ListSize;
36 
37 public:
39  EEPROM_ItemListClass() { this->ItemSize = 0; this->ListSize = 0; this->StartListPos = 0; }
40 
46  void begin(int inStartListPos, byte inItemSize, int inListSize) { this->StartListPos = inStartListPos; this->ItemSize = inItemSize; this->ListSize = inListSize; }
47 
51  void FreeItem(byte inSlotNumber);
55  void FreeOwnedItems(byte inOwnerSlotNumber);
56 
61  inline int GetItemPos(byte inSlotNumber)
62  {
63  return GetItemPosRaw(inSlotNumber) + 2;
64  }
65 
70  inline int GetItemPosRaw(byte inSlotNumber)
71  {
72  return (inSlotNumber * ItemSize) + StartListPos;
73  }
74 
79  inline byte GetSlotFromPos(int inPosition)
80  {
81  return (inPosition - StartListPos) / ItemSize;
82  }
83 
88  inline byte GetItemType(byte inSlotNumber)
89  {
90  return EEPROMextent.read(GetItemPosRaw(inSlotNumber));
91  }
92 
97  inline byte GetItemOwner(byte inSlotNumber)
98  {
99  return EEPROMextent.read(GetItemPosRaw(inSlotNumber) + 1);
100  }
101 
108  int SaveItemPrefix(byte inSlotNumber, byte inType, byte inOwner);
109 
113  byte GetFirstFreeSlot();
114 
121  byte FindItem(byte inType, byte inStartSlotNumber = 0, byte inOwnerId = 255);
122 
127  byte CountItems(byte inType);
128 
133  byte CountOwnedItems(byte inOwnerId);
134 
137  void clear() const;
138 };
139 
140 //-------------------------------------------------------------------
141 #endif
142 //-------------------------------------------------------------------
void clear() const
Definition: EEPROM_ItemList.cpp:103
-
byte CountOwnedItems(byte inOwnerId)
Definition: EEPROM_ItemList.cpp:69
-
int SaveItemPrefix(byte inSlotNumber, byte inType, byte inOwner)
Definition: EEPROM_ItemList.cpp:95
-
Definition: EEPROM_ItemList.hpp:30
-
byte GetItemType(byte inSlotNumber)
Definition: EEPROM_ItemList.hpp:88
-
byte GetItemOwner(byte inSlotNumber)
Definition: EEPROM_ItemList.hpp:97
-
EEPROM_ItemListClass()
Definition: EEPROM_ItemList.hpp:39
-
byte FindItem(byte inType, byte inStartSlotNumber = 0, byte inOwnerId = 255)
Definition: EEPROM_ItemList.cpp:43
-
void begin(int inStartListPos, byte inItemSize, int inListSize)
Definition: EEPROM_ItemList.hpp:46
-
void FreeOwnedItems(byte inOwnerSlotNumber)
Definition: EEPROM_ItemList.cpp:25
-
void FreeItem(byte inSlotNumber)
Definition: EEPROM_ItemList.cpp:18
-
byte CountItems(byte inType)
Definition: EEPROM_ItemList.cpp:58
-
byte GetFirstFreeSlot()
Definition: EEPROM_ItemList.cpp:80
-
int GetItemPos(byte inSlotNumber)
Definition: EEPROM_ItemList.hpp:61
-
byte GetSlotFromPos(int inPosition)
Definition: EEPROM_ItemList.hpp:79
-
int GetItemPosRaw(byte inSlotNumber)
Definition: EEPROM_ItemList.hpp:70
+
1 //-------------------------------------------------------------------
2 #ifndef __EEPROM_ItemList_H__
3 #define __EEPROM_ItemList_H__
4 //-------------------------------------------------------------------
5 
6 #define EEPROMLIST_EMPTY_OWNER 255
7 
8 #include "arduino.h"
9 #include "EEPROMextent.h"
10 
32 {
33 protected:
34  int startListPos;
35  byte itemSize;
36  int listSize;
37 
38 public:
40  EEPROM_ItemListClass() { this->itemSize = 0; this->listSize = 0; this->startListPos = 0; }
41 
47  void begin(int inStartListPos, byte inItemSize, int inListSize) { this->startListPos = inStartListPos; this->itemSize = inItemSize; this->listSize = inListSize; }
48 
52  void FreeItem(byte inSlotNumber);
56  void FreeOwnedItems(byte inOwnerSlotNumber);
57 
62  inline int GetItemPos(byte inSlotNumber)
63  {
64  return GetItemPosRaw(inSlotNumber) + 2;
65  }
66 
71  inline int GetItemPosRaw(byte inSlotNumber)
72  {
73  return (inSlotNumber * itemSize) + startListPos;
74  }
75 
80  inline byte GetSlotFromPos(int inPosition)
81  {
82  return (inPosition - startListPos) / itemSize;
83  }
84 
89  inline byte GetItemType(byte inSlotNumber)
90  {
91  return EEPROMextent.readByte(GetItemPosRaw(inSlotNumber));
92  }
93 
98  inline byte GetItemOwner(byte inSlotNumber)
99  {
100  return EEPROMextent.readByte(GetItemPosRaw(inSlotNumber) + 1);
101  }
102 
109  int SaveItemPrefix(byte inSlotNumber, byte inType, byte inOwner);
110 
114  byte GetFirstFreeSlot();
115 
122  byte FindItem(byte inType, byte inStartSlotNumber = 0, byte inOwnerId = 255);
123 
128  byte CountItems(byte inType);
129 
134  byte CountOwnedItems(byte inOwnerId);
135 
138  void clear() const;
139 };
140 
141 //-------------------------------------------------------------------
142 #endif
143 //-------------------------------------------------------------------
+
byte CountItems(byte inType)
+
byte FindItem(byte inType, byte inStartSlotNumber = 0, byte inOwnerId = 255)
+
int SaveItemPrefix(byte inSlotNumber, byte inType, byte inOwner)
+
byte GetItemOwner(byte inSlotNumber)
+
uint8_t readByte(int address)
Definition: EEPROMextent.h:68
+
byte GetItemType(byte inSlotNumber)
+
byte GetSlotFromPos(int inPosition)
+
void FreeOwnedItems(byte inOwnerSlotNumber)
+
byte CountOwnedItems(byte inOwnerId)
+
void FreeItem(byte inSlotNumber)
+ +
int GetItemPos(byte inSlotNumber)
+
void begin(int inStartListPos, byte inItemSize, int inListSize)
+
int GetItemPosRaw(byte inSlotNumber)
+ +
+
- + diff --git a/extras/Doc/EEPROMextent_8cpp_source.html b/extras/Doc/EEPROMextent_8cpp_source.html new file mode 100644 index 0000000..c37a990 --- /dev/null +++ b/extras/Doc/EEPROMextent_8cpp_source.html @@ -0,0 +1,115 @@ + + + + + + + +EEPROMextent: D:/Mes documents/Trusty/Arduino/Libraries/EEPROMextent/src/EEPROMextent.cpp Source File + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EEPROMextent +
+
Arduino EEPROM library
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
EEPROMextent.cpp
+
+
+
+
1 /*************************************************************
2 project: <EEPROMextent>
3 author: <Thierry PARIS>
4 description: <Class for basic EEPROM functions>
5 *************************************************************/
6 
7 #include "arduino.h"
8 #include "EEPROMextent.h"
9 
10 EEPROMextentClass EEPROMextent;
11 
12 char *EEPROMextentClass::readString(int ee, char *outData, int inSize)
13 {
14  byte* p = (byte*)outData;
15  for (int i = 0; i < inSize; i++)
16  {
17  *p = eeprom_read_byte((uint8_t *) INT64 ee++);
18 
19  if (*p == 0)
20  break;
21  p++;
22  }
23 
24  return outData;
25 }
26 
27 int EEPROMextentClass::writeString(int ee, const char *inData)
28 {
29  const byte* p = (const byte*)inData;
30  int i;
31 
32  for (i = 0;; i++)
33  {
34  const byte b = *p;
35  eeprom_write_byte((uint8_t *) INT64 ee++, b), ++p;
36 
37  if (b == 0)
38  return i + 1;
39  }
40 
41  return i;
42 }
43 
44 int EEPROMextentClass::updateString(int ee, const char *inData)
45 {
46  const byte* p = (const byte*)inData;
47  int i;
48 
49  for (i = 0;; i++)
50  {
51  const byte b = *p;
52  eeprom_update_byte((uint8_t *) INT64 ee++, b), ++p;
53 
54  if (b == 0)
55  return i + 1;
56  }
57 
58  return i;
59 }
60 
61 void EEPROMextentClass::clear(int inStartingAddress, int inSize, byte inFillCharacter)
62 {
63  for (int i = inStartingAddress; i < inStartingAddress + inSize; i++)
64  eeprom_update_byte((uint8_t *)INT64 i, inFillCharacter);
65 }
void clear(int address, int inSize, byte inFillCharacter = 0)
+
int updateString(int address, const char *inString)
+
int writeString(int address, const char *inString)
+
char * readString(int address, char *outString, int inMaxLen)
+
Main class for basic functions.
Definition: EEPROMextent.h:58
+
+
+ + + + diff --git a/extras/Doc/EEPROMextent_8h_source.html b/extras/Doc/EEPROMextent_8h_source.html index 0ce35be..773d00b 100644 --- a/extras/Doc/EEPROMextent_8h_source.html +++ b/extras/Doc/EEPROMextent_8h_source.html @@ -9,6 +9,20 @@ + + + + + + + + + @@ -22,51 +36,86 @@
Arduino EEPROM library
+
+ + + + + + +
+
- +
+ - + +
+ +
+
+ + +
+ +
+
EEPROMextent.h
-
1 /*
2 EEPROMextent.h - EEPROMextent library
3 Copyright (c) 2015 Thierry Paris. All right reserved.
4 
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9 
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14 
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19 
39 #ifndef __EEPROMextent_h__
40 #define __EEPROMextent_h__
41 
42 #ifndef VISUALSTUDIO
43 #include <avr/eeprom.h>
44 #include <inttypes.h>
45 //#include <EEPROM.h>
46 #define INT64
47 #else
48 #include <EEPROM.h>
49 #define INT64 (__int64)
50 #endif
51 
52 #include "arduino.h"
53 
55 // Remove the '//' at the beginning of the line to be in
56 // debug mode.
57 //#define EEPROMEXTENT_DEBUG_MODE
58 
61 {
62 public:
70  inline uint8_t readByte(int address) { return eeprom_read_byte((uint8_t *)INT64 address); }
78  inline void writeByte(int address, uint8_t value) { eeprom_write_byte((uint8_t *)INT64 address, value); }
87  inline void updateByte(int address, uint8_t value) { eeprom_update_byte((uint8_t *)INT64 address, value); }
88 
89 #ifdef VISUALSTUDIO
91 #endif
92 
101  template <class T> int readAnything(int address, T& value)
102  {
103  eeprom_read_block((byte*)(void*)&value, (const uint8_t *)INT64 ee, sizeof(value));
104  return sizeof(value);
105  }
106 
115  template <class T> int writeAnything(int address, const T& value)
116  {
117  eeprom_write_block((const byte*)(const void*)&value, (uint8_t *)INT64 ee, sizeof(value));
118  return sizeof(value);
119  }
120 
133  template <class T> int updateAnything(int address, const T& value)
134  {
135  eeprom_update_block((const byte*)(const void*)&value, (uint8_t *)INT64 ee, sizeof(value));
136  return sizeof(value);
137  }
138 
148  char *readString(int address, char *outString, int inMaxLen);
157  int writeString(int address, const char *inString);
169  int updateString(int address, const char *inString);
170 
178  void clear(int address, int inSize, byte inFillCharacter = 0);
179 };
180 
181 extern EEPROMextentClass EEPROMextent;
182 
183 #include "EEPROM_ItemList.hpp"
184 #include "CircularBuffer.hpp"
185 
186 #endif
void clear(int address, int inSize, byte inFillCharacter = 0)
Definition: EEPROMextent.cpp:60
-
int updateString(int address, const char *inString)
Definition: EEPROMextent.cpp:43
-
int writeString(int address, const char *inString)
Definition: EEPROMextent.cpp:26
-
int updateAnything(int address, const T &value)
Definition: EEPROMextent.h:133
-
int writeAnything(int address, const T &value)
Definition: EEPROMextent.h:115
-
void updateByte(int address, uint8_t value)
Definition: EEPROMextent.h:87
-
char * readString(int address, char *outString, int inMaxLen)
Definition: EEPROMextent.cpp:11
-
int readAnything(int address, T &value)
Definition: EEPROMextent.h:101
-
void writeByte(int address, uint8_t value)
Definition: EEPROMextent.h:78
-
uint8_t readByte(int address)
Definition: EEPROMextent.h:70
-
Main class for basic functions.
Definition: EEPROMextent.h:60
+
1 /*
2 EEPROMextent.h - EEPROMextent library
3 Copyright (c) 2015 Thierry Paris. All right reserved.
4 
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9 
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14 
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19 
39 #ifndef __EEPROMextent_h__
40 #define __EEPROMextent_h__
41 
42 #ifndef VISUALSTUDIO
43 #include <avr/eeprom.h>
44 #include <inttypes.h>
45 //#include <EEPROM.h>
46 #define INT64
47 #else
48 #include <EEPROM.h>
49 #define INT64 (__int64)
50 #endif
51 
53 // Remove the '//' at the beginning of the line to be in
54 // debug mode.
55 //#define EEPROMEXTENT_DEBUG_MODE
56 
59 {
60 public:
68  inline uint8_t readByte(int address) { return eeprom_read_byte((uint8_t *)INT64 address); }
76  inline void writeByte(int address, uint8_t value) { eeprom_write_byte((uint8_t *)INT64 address, value); }
85  inline void updateByte(int address, uint8_t value) { eeprom_update_byte((uint8_t *)INT64 address, value); }
86 
87 #ifdef VISUALSTUDIO
89 #endif
90 
99  template <class T> int readAnything(int address, T& value)
100  {
101  eeprom_read_block((byte*)(void*)&value, (const uint8_t *)INT64 address, sizeof(value));
102  return sizeof(value);
103  }
104 
113  template <class T> int writeAnything(int address, const T& value)
114  {
115  eeprom_write_block((const byte*)(const void*)&value, (uint8_t *)INT64 address, sizeof(value));
116  return sizeof(value);
117  }
118 
131  template <class T> int updateAnything(int address, const T& value)
132  {
133  eeprom_update_block((const byte*)(const void*)&value, (uint8_t *)INT64 address, sizeof(value));
134  return sizeof(value);
135  }
136 
146  char *readString(int address, char *outString, int inMaxLen);
155  int writeString(int address, const char *inString);
167  int updateString(int address, const char *inString);
168 
176  void clear(int address, int inSize, byte inFillCharacter = 0);
177 };
178 
179 extern EEPROMextentClass EEPROMextent;
180 
181 #include "EEPROM_ItemList.hpp"
182 #include "CircularBuffer.hpp"
183 
184 #endif
void clear(int address, int inSize, byte inFillCharacter = 0)
+
int updateString(int address, const char *inString)
+
int writeString(int address, const char *inString)
+
int updateAnything(int address, const T &value)
Definition: EEPROMextent.h:131
+
int writeAnything(int address, const T &value)
Definition: EEPROMextent.h:113
+
void updateByte(int address, uint8_t value)
Definition: EEPROMextent.h:85
+
char * readString(int address, char *outString, int inMaxLen)
+
int readAnything(int address, T &value)
Definition: EEPROMextent.h:99
+
void writeByte(int address, uint8_t value)
Definition: EEPROMextent.h:76
+
uint8_t readByte(int address)
Definition: EEPROMextent.h:68
+
Main class for basic functions.
Definition: EEPROMextent.h:58
+
- + diff --git a/extras/Doc/annotated.html b/extras/Doc/annotated.html index 5a8d34b..c88cfa2 100644 --- a/extras/Doc/annotated.html +++ b/extras/Doc/annotated.html @@ -9,6 +9,20 @@ + + + + + + + + + @@ -22,27 +36,59 @@
Arduino EEPROM library
+
+ + + + + + +
+
- +
+ - +
+ +
+ +
+
+ + +
+ +
+
Class List
@@ -58,10 +104,14 @@
+ - + diff --git a/extras/Doc/classCircularBuffer-members.html b/extras/Doc/classCircularBuffer-members.html index 63298c1..3b96518 100644 --- a/extras/Doc/classCircularBuffer-members.html +++ b/extras/Doc/classCircularBuffer-members.html @@ -9,6 +9,20 @@ + + + + + + + + + @@ -22,27 +36,59 @@
Arduino EEPROM library
+
+ + + + + + +
+ - +
+ - +
+ +
+ +
+
+ + +
+ +
+
CircularBuffer Member List
@@ -61,10 +107,14 @@ update(void *inpObject)CircularBufferinline write(void *inpObject, bool inUpdate = false)CircularBuffer
+
- + diff --git a/extras/Doc/classCircularBuffer.html b/extras/Doc/classCircularBuffer.html index c532278..3f03d4e 100644 --- a/extras/Doc/classCircularBuffer.html +++ b/extras/Doc/classCircularBuffer.html @@ -9,6 +9,20 @@ + + + + + + + + + @@ -22,27 +36,59 @@
Arduino EEPROM library
+
+ + + + + + +
+ - +
+ - +
+ +
+ +
+
+ + +
+ +
+
Public Member Functions | @@ -53,7 +99,7 @@
-

#include <CircularBuffer.hpp>

+

#include "CircularBuffer.hpp"

@@ -81,7 +127,9 @@

A circular buffer is a way to reduce the use of each EEPROM cell, and improve life time of the full EEPROM memory. An index of bytes is stored at the beginning of the area. Each index represents a data area.

|0|1|2|3|4||---0---|---1---|---2---|---3---|---4---|
-

Constructor & Destructor Documentation

+ +

Definition at line 31 of file CircularBuffer.hpp.

+

Constructor & Destructor Documentation

@@ -104,6 +152,8 @@

Basic constructor.

+

Definition at line 40 of file CircularBuffer.hpp.

+

Member Function Documentation

@@ -154,6 +204,8 @@

Member Function Documentation

Returns
Number of EEPROM bytes reserved for the circular buffer.
+

Definition at line 48 of file CircularBuffer.hpp.

+ @@ -170,6 +222,8 @@

Member Function Documentation

Fill with 0s the area reserved for the buffer. Use with care !

+

Definition at line 78 of file CircularBuffer.cpp.

+
@@ -186,6 +240,8 @@

Member Function Documentation

If data cannot be loaded with a single call to a 'read', this function can be called to know where to read the current good element.

Returns
EEPROM address to start reading data.
+

Definition at line 83 of file CircularBuffer.cpp.

+
@@ -209,6 +265,8 @@

Member Function Documentation

Returns
outpObject address.
+

Definition at line 49 of file CircularBuffer.cpp.

+ @@ -225,6 +283,8 @@

Member Function Documentation

If data cannot be stored with a single call to a 'write', this function can be called to prepare the saving of the next good element.

Returns
EEPROM address to start writing data. Be careful, do not store more bytes than the inElementSize given during begin() call !
+

Definition at line 89 of file CircularBuffer.cpp.

+
@@ -255,6 +315,8 @@

Member Function Documentation

+

Definition at line 68 of file CircularBuffer.hpp.

+ @@ -288,17 +350,24 @@

Member Function Documentation

+

Definition at line 57 of file CircularBuffer.cpp.

+
The documentation for this class was generated from the following files:
  • D:/Mes documents/Trusty/Arduino/Libraries/EEPROMextent/src/CircularBuffer.hpp
  • -
  • D:/Mes documents/Trusty/Arduino/Libraries/EEPROMextent/src/CircularBuffer.cpp
  • +
  • D:/Mes documents/Trusty/Arduino/Libraries/EEPROMextent/src/CircularBuffer.cpp
+ - + diff --git a/extras/Doc/classEEPROM__ItemListClass-members.html b/extras/Doc/classEEPROM__ItemListClass-members.html index 0d37b6a..e2ac67a 100644 --- a/extras/Doc/classEEPROM__ItemListClass-members.html +++ b/extras/Doc/classEEPROM__ItemListClass-members.html @@ -9,6 +9,20 @@ + + + + + + + + + @@ -22,27 +36,59 @@
Arduino EEPROM library
+

Public Member Functions

+ + + + + + +
+
- +
+ - +
+ +
+ +
+
+ + +
+ +
+
EEPROM_ItemListClass Member List
@@ -67,11 +113,18 @@ SaveItemPrefix(byte inSlotNumber, byte inType, byte inOwner)EEPROM_ItemListClass begin(int inStartListPos, byte inItemSize, int inListSize)EEPROM_ItemListClassinline clear() const EEPROM_ItemListClass + itemSize (defined in EEPROM_ItemListClass)EEPROM_ItemListClassprotected + listSize (defined in EEPROM_ItemListClass)EEPROM_ItemListClassprotected + startListPos (defined in EEPROM_ItemListClass)EEPROM_ItemListClassprotected
+
- + diff --git a/extras/Doc/classEEPROM__ItemListClass.html b/extras/Doc/classEEPROM__ItemListClass.html index d8727fe..d0a22b5 100644 --- a/extras/Doc/classEEPROM__ItemListClass.html +++ b/extras/Doc/classEEPROM__ItemListClass.html @@ -9,6 +9,20 @@ + + + + + + + + + @@ -22,30 +36,63 @@
Arduino EEPROM library
+
+ + + + + + +
+
- +
+ - +
+ +
+ +
+
+ + +
+ +
+
EEPROM_ItemListClass Class Reference
@@ -53,7 +100,7 @@
-

#include <EEPROM_ItemList.hpp>

+

#include "EEPROM_ItemList.hpp"

@@ -87,6 +134,18 @@ +

Public Member Functions

 
void clear () const
 
+ + + + + + +

+Protected Attributes

+int startListPos
 
+byte itemSize
 
+int listSize
 

Detailed Description

This class can be used to save heterogeneous items form a hierarchical list..

@@ -96,6 +155,8 @@ |TPitem|TPitem|TPitem|........|TPitem| +------+------+------+--------+------+

Each item starts with a type on a byte (the 'T' in the schema). A type at 0 means empty slot. The following byte 'P' gives an optionnal parent slot number. A parent at 255 means no parent. And finaly, the item itself fill the rest of the 'slot' place. Parent and children can be separated and even saved in a random order...

+ +

Definition at line 31 of file EEPROM_ItemList.hpp.

Constructor & Destructor Documentation

@@ -119,6 +180,8 @@

Default constructor.

+

Definition at line 40 of file EEPROM_ItemList.hpp.

+

Member Function Documentation

@@ -168,6 +231,8 @@

Member Function Documentation

+

Definition at line 47 of file EEPROM_ItemList.hpp.

+
@@ -184,6 +249,8 @@

Member Function Documentation

Clears all the EEPROM memory area reserved for this list.

+

Definition at line 103 of file EEPROM_ItemList.cpp.

+
@@ -207,6 +274,8 @@

Member Function Documentation

Returns
Number of items of the given type, or total number of items if inType is 0.
+

Definition at line 58 of file EEPROM_ItemList.cpp.

+ @@ -230,6 +299,8 @@

Member Function Documentation

Returns
Number of items with inOwnerId as parent.
+

Definition at line 69 of file EEPROM_ItemList.cpp.

+ @@ -271,6 +342,8 @@

Member Function Documentation

Returns
First slot number corresponding to the criterias or 255 if nothing found.
+

Definition at line 43 of file EEPROM_ItemList.cpp.

+ @@ -293,6 +366,8 @@

Member Function Documentation

+

Definition at line 18 of file EEPROM_ItemList.cpp.

+ @@ -315,6 +390,8 @@

Member Function Documentation

+

Definition at line 25 of file EEPROM_ItemList.cpp.

+ @@ -331,6 +408,8 @@

Member Function Documentation

Gets the first free slot number.

Returns
First free slot address or 255 if nothing free.
+

Definition at line 80 of file EEPROM_ItemList.cpp.

+
@@ -362,6 +441,8 @@

Member Function Documentation

Returns
Parent id (byte 'P') of the slot item, 255 if no parent.
+

Definition at line 98 of file EEPROM_ItemList.hpp.

+ @@ -393,6 +474,8 @@

Member Function Documentation

Returns
EEPROM address of the given slot item, AFTER the type and parent bytes.
+

Definition at line 62 of file EEPROM_ItemList.hpp.

+ @@ -424,6 +507,8 @@

Member Function Documentation

Returns
EEPROM address of the type byte of the given slot.
+

Definition at line 71 of file EEPROM_ItemList.hpp.

+ @@ -455,6 +540,8 @@

Member Function Documentation

Returns
Type (byte 'T') of the slot item.
+

Definition at line 89 of file EEPROM_ItemList.hpp.

+ @@ -486,6 +573,8 @@

Member Function Documentation

Returns
Slot number.
+

Definition at line 80 of file EEPROM_ItemList.hpp.

+ @@ -527,17 +616,24 @@

Member Function Documentation

Returns
EEPROM address to start writing the item.
+

Definition at line 95 of file EEPROM_ItemList.cpp.

+
The documentation for this class was generated from the following files:
  • D:/Mes documents/Trusty/Arduino/Libraries/EEPROMextent/src/EEPROM_ItemList.hpp
  • -
  • D:/Mes documents/Trusty/Arduino/Libraries/EEPROMextent/src/EEPROM_ItemList.cpp
  • +
  • D:/Mes documents/Trusty/Arduino/Libraries/EEPROMextent/src/EEPROM_ItemList.cpp
+ - + diff --git a/extras/Doc/classEEPROMextentClass-members.html b/extras/Doc/classEEPROMextentClass-members.html index 21dc2bf..b4a764f 100644 --- a/extras/Doc/classEEPROMextentClass-members.html +++ b/extras/Doc/classEEPROMextentClass-members.html @@ -9,6 +9,20 @@ + + + + + + + + + @@ -22,27 +36,59 @@
Arduino EEPROM library
+
+ + + + + + +
+ - +
+ - +
+ +
+ +
+
+ + +
+ +
+
EEPROMextentClass Member List
@@ -63,10 +109,14 @@ writeByte(int address, uint8_t value)EEPROMextentClassinline writeString(int address, const char *inString)EEPROMextentClass
+
- + diff --git a/extras/Doc/classEEPROMextentClass.html b/extras/Doc/classEEPROMextentClass.html index 6975559..e93128f 100644 --- a/extras/Doc/classEEPROMextentClass.html +++ b/extras/Doc/classEEPROMextentClass.html @@ -9,6 +9,20 @@ + + + + + + + + + @@ -22,27 +36,59 @@
Arduino EEPROM library
+
+ + + + + + +
+ - +
+ - +
+ +
+ +
+
+ + +
+ +
+
Public Member Functions | @@ -56,7 +102,7 @@

Main class for basic functions. More...

-

#include <EEPROMextent.h>

+

#include "EEPROMextent.h"

@@ -85,7 +131,8 @@

Public Member Functions

 

Detailed Description

-

Main class for basic functions.

+
+

Definition at line 58 of file EEPROMextent.h.

Member Function Documentation

@@ -125,6 +172,8 @@ +

Definition at line 61 of file EEPROMextent.cpp.

+
@@ -172,6 +221,8 @@
updateAnything()
+

Definition at line 99 of file EEPROMextent.h.

+
@@ -206,6 +257,8 @@
updateByte()
+

Definition at line 68 of file EEPROMextent.h.

+
@@ -250,6 +303,8 @@
updateString()
+

Definition at line 12 of file EEPROMextent.cpp.

+ @@ -298,6 +353,8 @@
updateAnything()
+

Definition at line 131 of file EEPROMextent.h.

+ @@ -342,6 +399,8 @@
updateByte()
+

Definition at line 85 of file EEPROMextent.h.

+ @@ -379,6 +438,8 @@
updateString()
+

Definition at line 44 of file EEPROMextent.cpp.

+ @@ -426,6 +487,8 @@
updateAnything()
+

Definition at line 113 of file EEPROMextent.h.

+ @@ -470,6 +533,8 @@
updateByte()
+

Definition at line 76 of file EEPROMextent.h.

+ @@ -507,17 +572,24 @@
updateString()
+

Definition at line 27 of file EEPROMextent.cpp.

+
The documentation for this class was generated from the following files:
  • D:/Mes documents/Trusty/Arduino/Libraries/EEPROMextent/src/EEPROMextent.h
  • -
  • D:/Mes documents/Trusty/Arduino/Libraries/EEPROMextent/src/EEPROMextent.cpp
  • +
  • D:/Mes documents/Trusty/Arduino/Libraries/EEPROMextent/src/EEPROMextent.cpp
+ - + diff --git a/extras/Doc/classes.html b/extras/Doc/classes.html index bf98fc4..1bbe987 100644 --- a/extras/Doc/classes.html +++ b/extras/Doc/classes.html @@ -9,6 +9,20 @@ + + + + + + + + + @@ -22,27 +36,59 @@
Arduino EEPROM library
+
+ + + + + + +
+ - +
+ - +
+ +
+ +
+
+ + +
+ +
+
Class Index
@@ -60,10 +106,14 @@
c | e
+
- + diff --git a/extras/Doc/dir_d41d8cd98f00b204e9800998ecf8427e.html b/extras/Doc/dir_d41d8cd98f00b204e9800998ecf8427e.html index 4fafb03..571ed0d 100644 --- a/extras/Doc/dir_d41d8cd98f00b204e9800998ecf8427e.html +++ b/extras/Doc/dir_d41d8cd98f00b204e9800998ecf8427e.html @@ -9,6 +9,20 @@ + + + + + + + + + @@ -22,24 +36,59 @@
Arduino EEPROM library
+
+ + + + + + +
+ - +
+ +
- -
+ +
+ +
+
+ + +
+ +
+
src Directory Reference
@@ -47,10 +96,15 @@
+
- + diff --git a/extras/Doc/dynsections.js b/extras/Doc/dynsections.js index 85e1836..1e6bf07 100644 --- a/extras/Doc/dynsections.js +++ b/extras/Doc/dynsections.js @@ -95,3 +95,10 @@ function toggleInherit(id) } } + +$(document).ready(function() { + $('.code,.codeRef').each(function() { + $(this).data('powertip',$('#'+$(this).attr('href').replace(/.*\//,'').replace(/[^a-z_A-Z0-9]/g,'_')).html()); + $(this).powerTip({ placement: 's', smartPlacement: true, mouseOnToPopup: true }); + }); +}); diff --git a/extras/Doc/files.html b/extras/Doc/files.html index bd52310..c7bb2b8 100644 --- a/extras/Doc/files.html +++ b/extras/Doc/files.html @@ -9,6 +9,20 @@ + + + + + + + + + @@ -22,25 +36,59 @@
Arduino EEPROM library
+
+ + + + + + +
+ - +
+ - +
+ +
+ +
+
+ + +
+ +
+
File List
@@ -54,10 +102,14 @@
+ - + diff --git a/extras/Doc/filesource.html b/extras/Doc/filesource.html index 1fa04d2..aaa60e4 100644 --- a/extras/Doc/filesource.html +++ b/extras/Doc/filesource.html @@ -9,6 +9,20 @@ + + + + + + + + + @@ -22,20 +36,59 @@
Arduino EEPROM library
+
+ + + + + + +
+ - + +
+ +
+
+
+ +
+ +
+
+ + +
+ +
+
File Source
@@ -45,17 +98,24 @@
Here is a list of all source code files with brief descriptions:
+
- + diff --git a/extras/Doc/functions_all.html b/extras/Doc/functions_all.html index e6157bb..b59041e 100644 --- a/extras/Doc/functions_all.html +++ b/extras/Doc/functions_all.html @@ -9,6 +9,20 @@ + + + + + + + + + @@ -22,46 +36,59 @@
Arduino EEPROM library
+
+ + + + + + +
+ - - - +
+ - +
+ +
+ +
+
+ + +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
@@ -193,10 +220,14 @@

- w -

+
- + diff --git a/extras/Doc/functions_func.html b/extras/Doc/functions_func.html index c90003b..5cd0d2e 100644 --- a/extras/Doc/functions_func.html +++ b/extras/Doc/functions_func.html @@ -9,6 +9,20 @@ + + + + + + + + + @@ -22,46 +36,59 @@
Arduino EEPROM library
+
+ + + + + + +
+ - - - +
+ - +
+ +
+ +
+
+ + +
+ +
+
  @@ -193,10 +220,14 @@

- w -

+
- + diff --git a/extras/Doc/index.html b/extras/Doc/index.html index baf778b..10ea3b5 100644 --- a/extras/Doc/index.html +++ b/extras/Doc/index.html @@ -9,6 +9,20 @@ + + + + + + + + + @@ -22,20 +36,59 @@
Arduino EEPROM library
+
+ + + + + + +
+ - + +
+ +
+
+
+ +
+ +
+
+ + +
+ +
+
EEPROMextent Documentation
@@ -43,7 +96,7 @@

A full explanation in french can be read at http://www.locoduino.org/ecrire/?exec=article&action=redirect&type=article&id=139 .

-

Roughly, EEPROM is small memory area which have to problems : first, the basic functions emmbedded in the IDE to write/read data in this memory is very basic, and second, its lifetie could be short (relatively) if you always write the same cell of this memory. This library try to answers to these two issues.

+

Roughly, EEPROM is small memory area which have two problems : first, the basic functions emmbedded in the IDE to write/read data in this memory is very basic, and second, its lifetime could be short (relatively) if you always write the same cell of this memory. This library try to answers to these two issues.

  1. A new bunch of functions has been added to write/read strings defined as chars array.
  2. For old IDE versions two functions has been added to write/read anything in this memory. Since IDE version 1.6.2 these functions are included in the IDE delivered EEPROM library.
  3. @@ -53,10 +106,14 @@

As for many of my libaries, a '#define EEPROMEXTENT_DEBUG_MODE' can be unremarked to have some debug informations and new functions to understand bugs in your sketch.

+
- + diff --git a/extras/Doc/navtree.css b/extras/Doc/navtree.css new file mode 100644 index 0000000..628a567 --- /dev/null +++ b/extras/Doc/navtree.css @@ -0,0 +1,143 @@ +#nav-tree .children_ul { + margin:0; + padding:4px; +} + +#nav-tree ul { + list-style:none outside none; + margin:0px; + padding:0px; +} + +#nav-tree li { + white-space:nowrap; + margin:0px; + padding:0px; +} + +#nav-tree .plus { + margin:0px; +} + +#nav-tree .selected { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} + +#nav-tree img { + margin:0px; + padding:0px; + border:0px; + vertical-align: middle; +} + +#nav-tree a { + text-decoration:none; + padding:0px; + margin:0px; + outline:none; +} + +#nav-tree .label { + margin:0px; + padding:0px; + font: 12px 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +} + +#nav-tree .label a { + padding:2px; +} + +#nav-tree .selected a { + text-decoration:none; + color:#fff; +} + +#nav-tree .children_ul { + margin:0px; + padding:0px; +} + +#nav-tree .item { + margin:0px; + padding:0px; +} + +#nav-tree { + padding: 0px 0px; + background-color: #FAFAFF; + font-size:14px; + overflow:auto; +} + +#doc-content { + overflow:auto; + display:block; + padding:0px; + margin:0px; + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#side-nav { + padding:0 6px 0 0; + margin: 0px; + display:block; + position: absolute; + left: 0px; + width: 250px; +} + +.ui-resizable .ui-resizable-handle { + display:block; +} + +.ui-resizable-e { + background:url("splitbar.png") repeat scroll right center transparent; + cursor:e-resize; + height:100%; + right:0; + top:0; + width:6px; +} + +.ui-resizable-handle { + display:none; + font-size:0.1px; + position:absolute; + z-index:1; +} + +#nav-tree-contents { + margin: 6px 0px 0px 0px; +} + +#nav-tree { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #fcfaf9; + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#nav-sync { + position:absolute; + top:5px; + right:24px; + z-index:0; +} + +#nav-sync img { + opacity:0.3; +} + +#nav-sync img:hover { + opacity:0.9; +} + +@media print +{ + #nav-tree { display: none; } + div.ui-resizable-handle { display: none; position: relative; } +} + diff --git a/extras/Doc/navtree.js b/extras/Doc/navtree.js new file mode 100644 index 0000000..83c900a --- /dev/null +++ b/extras/Doc/navtree.js @@ -0,0 +1,528 @@ +var navTreeSubIndices = new Array(); +var arrowDown = '▼'; +var arrowRight = '►'; + +function getData(varName) +{ + var i = varName.lastIndexOf('/'); + var n = i>=0 ? varName.substring(i+1) : varName; + return eval(n.replace(/\-/g,'_')); +} + +function stripPath(uri) +{ + return uri.substring(uri.lastIndexOf('/')+1); +} + +function stripPath2(uri) +{ + var i = uri.lastIndexOf('/'); + var s = uri.substring(i+1); + var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/); + return m ? uri.substring(i-6) : s; +} + +function hashValue() +{ + return $(location).attr('hash').substring(1).replace(/[^\w\-]/g,''); +} + +function hashUrl() +{ + return '#'+hashValue(); +} + +function pathName() +{ + return $(location).attr('pathname').replace(/[^-A-Za-z0-9+&@#/%?=~_|!:,.;\(\)]/g, ''); +} + +function localStorageSupported() +{ + try { + return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem; + } + catch(e) { + return false; + } +} + + +function storeLink(link) +{ + if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) { + window.localStorage.setItem('navpath',link); + } +} + +function deleteLink() +{ + if (localStorageSupported()) { + window.localStorage.setItem('navpath',''); + } +} + +function cachedLink() +{ + if (localStorageSupported()) { + return window.localStorage.getItem('navpath'); + } else { + return ''; + } +} + +function getScript(scriptName,func,show) +{ + var head = document.getElementsByTagName("head")[0]; + var script = document.createElement('script'); + script.id = scriptName; + script.type = 'text/javascript'; + script.onload = func; + script.src = scriptName+'.js'; + if ($.browser.msie && $.browser.version<=8) { + // script.onload does not work with older versions of IE + script.onreadystatechange = function() { + if (script.readyState=='complete' || script.readyState=='loaded') { + func(); if (show) showRoot(); + } + } + } + head.appendChild(script); +} + +function createIndent(o,domNode,node,level) +{ + var level=-1; + var n = node; + + while (n.parentNode) { level++; n=n.parentNode; } + + if (node.childrenData) { + var imgNode = document.createElement("span"); + imgNode.className = 'arrow'; + imgNode.style.paddingLeft=(16*level).toString()+'px'; + imgNode.innerHTML=arrowRight; + + node.plus_img = imgNode; + node.expandToggle = document.createElement("a"); + node.expandToggle.href = "javascript:void(0)"; + + node.expandToggle.onclick = function() { + if (node.expanded) { + $(node.getChildrenUL()).slideUp("fast"); + node.plus_img.innerHTML=arrowRight; + node.expanded = false; + } else { + expandNode(o, node, false, false); + } + } + node.expandToggle.appendChild(imgNode); + domNode.appendChild(node.expandToggle); + + } else { + var span = document.createElement("span"); + span.className = 'arrow'; + span.style.width = 16*(level+1)+'px'; + span.innerHTML = ' '; + domNode.appendChild(span); + } +} + +var animationInProgress = false; + +function gotoAnchor(anchor,aname,updateLocation) +{ + var pos, docContent = $('#doc-content'); + var ancParent = $(anchor.parent()); + if (ancParent.hasClass('memItemLeft') || + ancParent.hasClass('fieldname') || + ancParent.hasClass('fieldtype') || + ancParent.is(':header')) + { + pos = ancParent.position().top; + } else if (anchor.position()) { + pos = anchor.position().top; + } + if (pos) { + var dist = Math.abs(Math.min( + pos-docContent.offset().top, + docContent[0].scrollHeight- + docContent.height()-docContent.scrollTop())); + animationInProgress=true; + docContent.animate({ + scrollTop: pos + docContent.scrollTop() - docContent.offset().top + },Math.max(50,Math.min(500,dist)),function(){ + if (updateLocation) window.location.href=aname; + animationInProgress=false; + }); + } +} + +function newNode(o, po, text, link, childrenData, lastNode) +{ + var node = new Object(); + node.children = Array(); + node.childrenData = childrenData; + node.depth = po.depth + 1; + node.relpath = po.relpath; + node.isLast = lastNode; + + node.li = document.createElement("li"); + po.getChildrenUL().appendChild(node.li); + node.parentNode = po; + + node.itemDiv = document.createElement("div"); + node.itemDiv.className = "item"; + + node.labelSpan = document.createElement("span"); + node.labelSpan.className = "label"; + + createIndent(o,node.itemDiv,node,0); + node.itemDiv.appendChild(node.labelSpan); + node.li.appendChild(node.itemDiv); + + var a = document.createElement("a"); + node.labelSpan.appendChild(a); + node.label = document.createTextNode(text); + node.expanded = false; + a.appendChild(node.label); + if (link) { + var url; + if (link.substring(0,1)=='^') { + url = link.substring(1); + link = url; + } else { + url = node.relpath+link; + } + a.className = stripPath(link.replace('#',':')); + if (link.indexOf('#')!=-1) { + var aname = '#'+link.split('#')[1]; + var srcPage = stripPath(pathName()); + var targetPage = stripPath(link.split('#')[0]); + a.href = srcPage!=targetPage ? url : "javascript:void(0)"; + a.onclick = function(){ + storeLink(link); + if (!$(a).parent().parent().hasClass('selected')) + { + $('.item').removeClass('selected'); + $('.item').removeAttr('id'); + $(a).parent().parent().addClass('selected'); + $(a).parent().parent().attr('id','selected'); + } + var anchor = $(aname); + gotoAnchor(anchor,aname,true); + }; + } else { + a.href = url; + a.onclick = function() { storeLink(link); } + } + } else { + if (childrenData != null) + { + a.className = "nolink"; + a.href = "javascript:void(0)"; + a.onclick = node.expandToggle.onclick; + } + } + + node.childrenUL = null; + node.getChildrenUL = function() { + if (!node.childrenUL) { + node.childrenUL = document.createElement("ul"); + node.childrenUL.className = "children_ul"; + node.childrenUL.style.display = "none"; + node.li.appendChild(node.childrenUL); + } + return node.childrenUL; + }; + + return node; +} + +function showRoot() +{ + var headerHeight = $("#top").height(); + var footerHeight = $("#nav-path").height(); + var windowHeight = $(window).height() - headerHeight - footerHeight; + (function (){ // retry until we can scroll to the selected item + try { + var navtree=$('#nav-tree'); + navtree.scrollTo('#selected',0,{offset:-windowHeight/2}); + } catch (err) { + setTimeout(arguments.callee, 0); + } + })(); +} + +function expandNode(o, node, imm, showRoot) +{ + if (node.childrenData && !node.expanded) { + if (typeof(node.childrenData)==='string') { + var varName = node.childrenData; + getScript(node.relpath+varName,function(){ + node.childrenData = getData(varName); + expandNode(o, node, imm, showRoot); + }, showRoot); + + } else { + if (!node.childrenVisited) { + getNode(o, node); + } if (imm || ($.browser.msie && $.browser.version>8)) { + // somehow slideDown jumps to the start of tree for IE9 :-( + $(node.getChildrenUL()).show(); + } else { + $(node.getChildrenUL()).slideDown("fast"); + } + + node.plus_img.innerHTML = arrowDown; + node.expanded = true; + } + } +} + +function glowEffect(n,duration) +{ + n.addClass('glow').delay(duration).queue(function(next){ + $(this).removeClass('glow');next(); + }); +} + +function highlightAnchor() +{ + var aname = hashUrl(); + var anchor = $(aname); + if (anchor.parent().attr('class')=='memItemLeft'){ + var rows = $('.memberdecls tr[class$="'+hashValue()+'"]'); + glowEffect(rows.children(),300); // member without details + } else if (anchor.parent().attr('class')=='fieldname'){ + glowEffect(anchor.parent().parent(),1000); // enum value + } else if (anchor.parent().attr('class')=='fieldtype'){ + glowEffect(anchor.parent().parent(),1000); // struct field + } else if (anchor.parent().is(":header")) { + glowEffect(anchor.parent(),1000); // section header + } else { + glowEffect(anchor.next(),1000); // normal member + } + gotoAnchor(anchor,aname,false); +} + +function selectAndHighlight(hash,n) +{ + var a; + if (hash) { + var link=stripPath(pathName())+':'+hash.substring(1); + a=$('.item a[class$="'+link+'"]'); + } + if (a && a.length) { + a.parent().parent().addClass('selected'); + a.parent().parent().attr('id','selected'); + highlightAnchor(); + } else if (n) { + $(n.itemDiv).addClass('selected'); + $(n.itemDiv).attr('id','selected'); + } + if ($('#nav-tree-contents .item:first').hasClass('selected')) { + $('#nav-sync').css('top','30px'); + } else { + $('#nav-sync').css('top','5px'); + } + showRoot(); +} + +function showNode(o, node, index, hash) +{ + if (node && node.childrenData) { + if (typeof(node.childrenData)==='string') { + var varName = node.childrenData; + getScript(node.relpath+varName,function(){ + node.childrenData = getData(varName); + showNode(o,node,index,hash); + },true); + + } else { + if (!node.childrenVisited) { + getNode(o, node); + } + + $(node.getChildrenUL()).css({'display':'block'}); + node.plus_img.innerHTML = arrowDown; + node.expanded = true; + + var n = node.children[o.breadcrumbs[index]]; + if (index+11) hash = '#'+parts[1].replace(/[^\w\-]/g,''); + else hash=''; + } + if (hash.match(/^#l\d+$/)) { + var anchor=$('a[name='+hash.substring(1)+']'); + glowEffect(anchor.parent(),1000); // line number + hash=''; // strip line number anchors + } + var url=root+hash; + var i=-1; + while (NAVTREEINDEX[i+1]<=url) i++; + if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath) + } else { + getScript(relpath+'navtreeindex'+i,function(){ + navTreeSubIndices[i] = eval('NAVTREEINDEX'+i); + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath); + } + },true); + } +} + +function showSyncOff(n,relpath) +{ + n.html(''); +} + +function showSyncOn(n,relpath) +{ + n.html(''); +} + +function toggleSyncButton(relpath) +{ + var navSync = $('#nav-sync'); + if (navSync.hasClass('sync')) { + navSync.removeClass('sync'); + showSyncOff(navSync,relpath); + storeLink(stripPath2(pathName())+hashUrl()); + } else { + navSync.addClass('sync'); + showSyncOn(navSync,relpath); + deleteLink(); + } +} + +function initNavTree(toroot,relpath) +{ + var o = new Object(); + o.toroot = toroot; + o.node = new Object(); + o.node.li = document.getElementById("nav-tree-contents"); + o.node.childrenData = NAVTREE; + o.node.children = new Array(); + o.node.childrenUL = document.createElement("ul"); + o.node.getChildrenUL = function() { return o.node.childrenUL; }; + o.node.li.appendChild(o.node.childrenUL); + o.node.depth = 0; + o.node.relpath = relpath; + o.node.expanded = false; + o.node.isLast = true; + + o.node.plus_img = document.createElement("span"); + o.node.plus_img.className = 'arrow'; + o.node.plus_img.innerHTML = arrowRight; + + if (localStorageSupported()) { + var navSync = $('#nav-sync'); + if (cachedLink()) { + showSyncOff(navSync,relpath); + navSync.removeClass('sync'); + } else { + showSyncOn(navSync,relpath); + } + navSync.click(function(){ toggleSyncButton(relpath); }); + } + + $(window).load(function(){ + navTo(o,toroot,hashUrl(),relpath); + showRoot(); + }); + + $(window).bind('hashchange', function(){ + if (window.location.hash && window.location.hash.length>1){ + var a; + if ($(location).attr('hash')){ + var clslink=stripPath(pathName())+':'+hashValue(); + a=$('.item a[class$="'+clslink.replace(/=desktop_vp) { + if (!collapsed) { + collapseExpand(); + } + } else if (width>desktop_vp && collapsedWidth0) { + restoreWidth(0); + collapsed=true; + } + else { + var width = readCookie('width'); + if (width>200 && width<$(window).width()) { restoreWidth(width); } else { restoreWidth(200); } + collapsed=false; + } + } + + header = $("#top"); + sidenav = $("#side-nav"); + content = $("#doc-content"); + navtree = $("#nav-tree"); + footer = $("#nav-path"); + + $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); + $(sidenav).resizable({ minWidth: 0 }); + $(window).resize(function() { resizeHeight(); }); + + var device = navigator.userAgent.toLowerCase(); + var touch_device = device.match(/(iphone|ipod|ipad|android)/); + if (touch_device) { /* wider split bar for touch only devices */ + $(sidenav).css({ paddingRight:'20px' }); + $('.ui-resizable-e').css({ width:'20px' }); + $('#nav-sync').css({ right:'34px' }); + barWidth=20; + } + + var width = readCookie('width'); + if (width) { restoreWidth(width); } else { resizeWidth(); } + resizeHeight(); + + var url = location.href; + var i=url.indexOf("#"); + + if (i >= 0) window.location.hash=url.substr(i); + var _preventDefault = function(evt) { evt.preventDefault(); }; + + $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); + $(".ui-resizable-handle").dblclick(collapseExpand); + $(window).load(resizeHeight); +} + + diff --git a/extras/Doc/search/all_0.html b/extras/Doc/search/all_0.html new file mode 100644 index 0000000..09ab37a --- /dev/null +++ b/extras/Doc/search/all_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/extras/Doc/search/all_0.js b/extras/Doc/search/all_0.js new file mode 100644 index 0000000..bafafcb --- /dev/null +++ b/extras/Doc/search/all_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['begin',['begin',['../classCircularBuffer.html#a792545be538920a0efbeea005279831b',1,'CircularBuffer::begin()'],['../classEEPROM__ItemListClass.html#ab6e479bea61df079b1711a0d5d015489',1,'EEPROM_ItemListClass::begin()']]] +]; diff --git a/extras/Doc/search/all_1.html b/extras/Doc/search/all_1.html new file mode 100644 index 0000000..d16b03c --- /dev/null +++ b/extras/Doc/search/all_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/extras/Doc/search/all_1.js b/extras/Doc/search/all_1.js new file mode 100644 index 0000000..14dcd93 --- /dev/null +++ b/extras/Doc/search/all_1.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['circularbuffer',['CircularBuffer',['../classCircularBuffer.html',1,'CircularBuffer'],['../classCircularBuffer.html#a8c5de0e610bb50bac684f4707e23431c',1,'CircularBuffer::CircularBuffer()']]], + ['clear',['clear',['../classCircularBuffer.html#a5ab32be357ea6857ae08a357205921bd',1,'CircularBuffer::clear()'],['../classEEPROM__ItemListClass.html#a6be1cf1c73862d6a3497cb3dd7d7c60a',1,'EEPROM_ItemListClass::clear()'],['../classEEPROMextentClass.html#a11193d85493e49e95595a05ea0c0ebe3',1,'EEPROMextentClass::clear()']]], + ['countitems',['CountItems',['../classEEPROM__ItemListClass.html#a1905c831cdd545a844ee73ef297b36be',1,'EEPROM_ItemListClass']]], + ['countowneditems',['CountOwnedItems',['../classEEPROM__ItemListClass.html#a2c113be1effaa648528faa587502dec5',1,'EEPROM_ItemListClass']]] +]; diff --git a/extras/Doc/search/all_2.html b/extras/Doc/search/all_2.html new file mode 100644 index 0000000..66efca0 --- /dev/null +++ b/extras/Doc/search/all_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/extras/Doc/search/all_2.js b/extras/Doc/search/all_2.js new file mode 100644 index 0000000..370b653 --- /dev/null +++ b/extras/Doc/search/all_2.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['eeprom_5fitemlistclass',['EEPROM_ItemListClass',['../classEEPROM__ItemListClass.html',1,'EEPROM_ItemListClass'],['../classEEPROM__ItemListClass.html#a38a7ba605925186b7ded863e3985aab0',1,'EEPROM_ItemListClass::EEPROM_ItemListClass()']]], + ['eepromextentclass',['EEPROMextentClass',['../classEEPROMextentClass.html',1,'']]] +]; diff --git a/extras/Doc/search/all_3.html b/extras/Doc/search/all_3.html new file mode 100644 index 0000000..05965df --- /dev/null +++ b/extras/Doc/search/all_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/extras/Doc/search/all_3.js b/extras/Doc/search/all_3.js new file mode 100644 index 0000000..c23e058 --- /dev/null +++ b/extras/Doc/search/all_3.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['finditem',['FindItem',['../classEEPROM__ItemListClass.html#ac80e0fc602c8323f8f95efdd0a83256a',1,'EEPROM_ItemListClass']]], + ['freeitem',['FreeItem',['../classEEPROM__ItemListClass.html#ac9319a09aaf258634f019726c5d47495',1,'EEPROM_ItemListClass']]], + ['freeowneditems',['FreeOwnedItems',['../classEEPROM__ItemListClass.html#af87d41ee8add8457a7793aef07ee4803',1,'EEPROM_ItemListClass']]] +]; diff --git a/extras/Doc/search/all_4.html b/extras/Doc/search/all_4.html new file mode 100644 index 0000000..31acfdc --- /dev/null +++ b/extras/Doc/search/all_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/extras/Doc/search/all_4.js b/extras/Doc/search/all_4.js new file mode 100644 index 0000000..e8b6601 --- /dev/null +++ b/extras/Doc/search/all_4.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['getfirstfreeslot',['GetFirstFreeSlot',['../classEEPROM__ItemListClass.html#ac527246e47d5fce6ac177caa4cf02cb5',1,'EEPROM_ItemListClass']]], + ['getitemowner',['GetItemOwner',['../classEEPROM__ItemListClass.html#ae6d04440a16de3462c791ca61fc23b96',1,'EEPROM_ItemListClass']]], + ['getitempos',['GetItemPos',['../classEEPROM__ItemListClass.html#ae88c7c6ea51d9c4262636584a2f59838',1,'EEPROM_ItemListClass']]], + ['getitemposraw',['GetItemPosRaw',['../classEEPROM__ItemListClass.html#a8ff4db895c270b541671527a31cfd702',1,'EEPROM_ItemListClass']]], + ['getitemtype',['GetItemType',['../classEEPROM__ItemListClass.html#afcdbfc526b19fba0ce47d9ea188a192b',1,'EEPROM_ItemListClass']]], + ['getslotfrompos',['GetSlotFromPos',['../classEEPROM__ItemListClass.html#af0c59088517207189f1f6d5d69bcf1ce',1,'EEPROM_ItemListClass']]], + ['getstartread',['getStartRead',['../classCircularBuffer.html#a5c2ef9f285d879b65686076f2fd1d6fb',1,'CircularBuffer']]] +]; diff --git a/extras/Doc/search/all_5.html b/extras/Doc/search/all_5.html new file mode 100644 index 0000000..a41e6ce --- /dev/null +++ b/extras/Doc/search/all_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/extras/Doc/search/all_5.js b/extras/Doc/search/all_5.js new file mode 100644 index 0000000..88b21cd --- /dev/null +++ b/extras/Doc/search/all_5.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['read',['read',['../classCircularBuffer.html#a83658c11dabbd03cc7714ac09b962b71',1,'CircularBuffer']]], + ['readanything',['readAnything',['../classEEPROMextentClass.html#af284f6a9fa490a7ce3ebc26163b97b84',1,'EEPROMextentClass']]], + ['readbyte',['readByte',['../classEEPROMextentClass.html#a8255102c20d83a39117a1982964d5b29',1,'EEPROMextentClass']]], + ['readstring',['readString',['../classEEPROMextentClass.html#a540547eeec766fb89d0fc984e574d0ab',1,'EEPROMextentClass']]] +]; diff --git a/extras/Doc/search/all_6.html b/extras/Doc/search/all_6.html new file mode 100644 index 0000000..c64ba5e --- /dev/null +++ b/extras/Doc/search/all_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/extras/Doc/search/all_6.js b/extras/Doc/search/all_6.js new file mode 100644 index 0000000..5f849df --- /dev/null +++ b/extras/Doc/search/all_6.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['saveitemprefix',['SaveItemPrefix',['../classEEPROM__ItemListClass.html#aad8bb0ae0ea6300116c6c76d8bedf0af',1,'EEPROM_ItemListClass']]], + ['startwrite',['startWrite',['../classCircularBuffer.html#a6c0da92a003be6743196f6131d1466e2',1,'CircularBuffer']]] +]; diff --git a/extras/Doc/search/all_7.html b/extras/Doc/search/all_7.html new file mode 100644 index 0000000..611c351 --- /dev/null +++ b/extras/Doc/search/all_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/extras/Doc/search/all_7.js b/extras/Doc/search/all_7.js new file mode 100644 index 0000000..22e3a81 --- /dev/null +++ b/extras/Doc/search/all_7.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['update',['update',['../classCircularBuffer.html#ab88645c176a74d2e1f24ae3a9a5347da',1,'CircularBuffer']]], + ['updateanything',['updateAnything',['../classEEPROMextentClass.html#a1a965b9b231e3c3b1cbfe61dde679781',1,'EEPROMextentClass']]], + ['updatebyte',['updateByte',['../classEEPROMextentClass.html#aac1fec8d451b8db93eaa1e721273d7d5',1,'EEPROMextentClass']]], + ['updatestring',['updateString',['../classEEPROMextentClass.html#a56088f89f28c45d22948fbcb4c295b8a',1,'EEPROMextentClass']]] +]; diff --git a/extras/Doc/search/all_8.html b/extras/Doc/search/all_8.html new file mode 100644 index 0000000..d0321bb --- /dev/null +++ b/extras/Doc/search/all_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/extras/Doc/search/all_8.js b/extras/Doc/search/all_8.js new file mode 100644 index 0000000..162d42f --- /dev/null +++ b/extras/Doc/search/all_8.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['write',['write',['../classCircularBuffer.html#ae546bc086f88369e2aab687b8396ba0c',1,'CircularBuffer']]], + ['writeanything',['writeAnything',['../classEEPROMextentClass.html#acc14f3978c7eda75630e20589c144a9b',1,'EEPROMextentClass']]], + ['writebyte',['writeByte',['../classEEPROMextentClass.html#a35001c9795b54613d9dc6e6e508f1501',1,'EEPROMextentClass']]], + ['writestring',['writeString',['../classEEPROMextentClass.html#a9038fb29e76144f113e75d1855d277da',1,'EEPROMextentClass']]] +]; diff --git a/extras/Doc/search/classes_0.html b/extras/Doc/search/classes_0.html new file mode 100644 index 0000000..8509c00 --- /dev/null +++ b/extras/Doc/search/classes_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/extras/Doc/search/classes_0.js b/extras/Doc/search/classes_0.js new file mode 100644 index 0000000..05a522b --- /dev/null +++ b/extras/Doc/search/classes_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['circularbuffer',['CircularBuffer',['../classCircularBuffer.html',1,'']]] +]; diff --git a/extras/Doc/search/classes_1.html b/extras/Doc/search/classes_1.html new file mode 100644 index 0000000..33cf30b --- /dev/null +++ b/extras/Doc/search/classes_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/extras/Doc/search/classes_1.js b/extras/Doc/search/classes_1.js new file mode 100644 index 0000000..b493189 --- /dev/null +++ b/extras/Doc/search/classes_1.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['eeprom_5fitemlistclass',['EEPROM_ItemListClass',['../classEEPROM__ItemListClass.html',1,'']]], + ['eepromextentclass',['EEPROMextentClass',['../classEEPROMextentClass.html',1,'']]] +]; diff --git a/extras/Doc/search/close.png b/extras/Doc/search/close.png new file mode 100644 index 0000000..9342d3d Binary files /dev/null and b/extras/Doc/search/close.png differ diff --git a/extras/Doc/search/functions_0.html b/extras/Doc/search/functions_0.html new file mode 100644 index 0000000..c8792ea --- /dev/null +++ b/extras/Doc/search/functions_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/extras/Doc/search/functions_0.js b/extras/Doc/search/functions_0.js new file mode 100644 index 0000000..bafafcb --- /dev/null +++ b/extras/Doc/search/functions_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['begin',['begin',['../classCircularBuffer.html#a792545be538920a0efbeea005279831b',1,'CircularBuffer::begin()'],['../classEEPROM__ItemListClass.html#ab6e479bea61df079b1711a0d5d015489',1,'EEPROM_ItemListClass::begin()']]] +]; diff --git a/extras/Doc/search/functions_1.html b/extras/Doc/search/functions_1.html new file mode 100644 index 0000000..d1c389d --- /dev/null +++ b/extras/Doc/search/functions_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/extras/Doc/search/functions_1.js b/extras/Doc/search/functions_1.js new file mode 100644 index 0000000..959d946 --- /dev/null +++ b/extras/Doc/search/functions_1.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['circularbuffer',['CircularBuffer',['../classCircularBuffer.html#a8c5de0e610bb50bac684f4707e23431c',1,'CircularBuffer']]], + ['clear',['clear',['../classCircularBuffer.html#a5ab32be357ea6857ae08a357205921bd',1,'CircularBuffer::clear()'],['../classEEPROM__ItemListClass.html#a6be1cf1c73862d6a3497cb3dd7d7c60a',1,'EEPROM_ItemListClass::clear()'],['../classEEPROMextentClass.html#a11193d85493e49e95595a05ea0c0ebe3',1,'EEPROMextentClass::clear()']]], + ['countitems',['CountItems',['../classEEPROM__ItemListClass.html#a1905c831cdd545a844ee73ef297b36be',1,'EEPROM_ItemListClass']]], + ['countowneditems',['CountOwnedItems',['../classEEPROM__ItemListClass.html#a2c113be1effaa648528faa587502dec5',1,'EEPROM_ItemListClass']]] +]; diff --git a/extras/Doc/search/functions_2.html b/extras/Doc/search/functions_2.html new file mode 100644 index 0000000..3fb8605 --- /dev/null +++ b/extras/Doc/search/functions_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/extras/Doc/search/functions_2.js b/extras/Doc/search/functions_2.js new file mode 100644 index 0000000..4092e0c --- /dev/null +++ b/extras/Doc/search/functions_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['eeprom_5fitemlistclass',['EEPROM_ItemListClass',['../classEEPROM__ItemListClass.html#a38a7ba605925186b7ded863e3985aab0',1,'EEPROM_ItemListClass']]] +]; diff --git a/extras/Doc/search/functions_3.html b/extras/Doc/search/functions_3.html new file mode 100644 index 0000000..d5df2a7 --- /dev/null +++ b/extras/Doc/search/functions_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/extras/Doc/search/functions_3.js b/extras/Doc/search/functions_3.js new file mode 100644 index 0000000..c23e058 --- /dev/null +++ b/extras/Doc/search/functions_3.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['finditem',['FindItem',['../classEEPROM__ItemListClass.html#ac80e0fc602c8323f8f95efdd0a83256a',1,'EEPROM_ItemListClass']]], + ['freeitem',['FreeItem',['../classEEPROM__ItemListClass.html#ac9319a09aaf258634f019726c5d47495',1,'EEPROM_ItemListClass']]], + ['freeowneditems',['FreeOwnedItems',['../classEEPROM__ItemListClass.html#af87d41ee8add8457a7793aef07ee4803',1,'EEPROM_ItemListClass']]] +]; diff --git a/extras/Doc/search/functions_4.html b/extras/Doc/search/functions_4.html new file mode 100644 index 0000000..d71161e --- /dev/null +++ b/extras/Doc/search/functions_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/extras/Doc/search/functions_4.js b/extras/Doc/search/functions_4.js new file mode 100644 index 0000000..e8b6601 --- /dev/null +++ b/extras/Doc/search/functions_4.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['getfirstfreeslot',['GetFirstFreeSlot',['../classEEPROM__ItemListClass.html#ac527246e47d5fce6ac177caa4cf02cb5',1,'EEPROM_ItemListClass']]], + ['getitemowner',['GetItemOwner',['../classEEPROM__ItemListClass.html#ae6d04440a16de3462c791ca61fc23b96',1,'EEPROM_ItemListClass']]], + ['getitempos',['GetItemPos',['../classEEPROM__ItemListClass.html#ae88c7c6ea51d9c4262636584a2f59838',1,'EEPROM_ItemListClass']]], + ['getitemposraw',['GetItemPosRaw',['../classEEPROM__ItemListClass.html#a8ff4db895c270b541671527a31cfd702',1,'EEPROM_ItemListClass']]], + ['getitemtype',['GetItemType',['../classEEPROM__ItemListClass.html#afcdbfc526b19fba0ce47d9ea188a192b',1,'EEPROM_ItemListClass']]], + ['getslotfrompos',['GetSlotFromPos',['../classEEPROM__ItemListClass.html#af0c59088517207189f1f6d5d69bcf1ce',1,'EEPROM_ItemListClass']]], + ['getstartread',['getStartRead',['../classCircularBuffer.html#a5c2ef9f285d879b65686076f2fd1d6fb',1,'CircularBuffer']]] +]; diff --git a/extras/Doc/search/functions_5.html b/extras/Doc/search/functions_5.html new file mode 100644 index 0000000..dc6e345 --- /dev/null +++ b/extras/Doc/search/functions_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/extras/Doc/search/functions_5.js b/extras/Doc/search/functions_5.js new file mode 100644 index 0000000..88b21cd --- /dev/null +++ b/extras/Doc/search/functions_5.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['read',['read',['../classCircularBuffer.html#a83658c11dabbd03cc7714ac09b962b71',1,'CircularBuffer']]], + ['readanything',['readAnything',['../classEEPROMextentClass.html#af284f6a9fa490a7ce3ebc26163b97b84',1,'EEPROMextentClass']]], + ['readbyte',['readByte',['../classEEPROMextentClass.html#a8255102c20d83a39117a1982964d5b29',1,'EEPROMextentClass']]], + ['readstring',['readString',['../classEEPROMextentClass.html#a540547eeec766fb89d0fc984e574d0ab',1,'EEPROMextentClass']]] +]; diff --git a/extras/Doc/search/functions_6.html b/extras/Doc/search/functions_6.html new file mode 100644 index 0000000..0b22400 --- /dev/null +++ b/extras/Doc/search/functions_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/extras/Doc/search/functions_6.js b/extras/Doc/search/functions_6.js new file mode 100644 index 0000000..5f849df --- /dev/null +++ b/extras/Doc/search/functions_6.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['saveitemprefix',['SaveItemPrefix',['../classEEPROM__ItemListClass.html#aad8bb0ae0ea6300116c6c76d8bedf0af',1,'EEPROM_ItemListClass']]], + ['startwrite',['startWrite',['../classCircularBuffer.html#a6c0da92a003be6743196f6131d1466e2',1,'CircularBuffer']]] +]; diff --git a/extras/Doc/search/functions_7.html b/extras/Doc/search/functions_7.html new file mode 100644 index 0000000..08e66cf --- /dev/null +++ b/extras/Doc/search/functions_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/extras/Doc/search/functions_7.js b/extras/Doc/search/functions_7.js new file mode 100644 index 0000000..22e3a81 --- /dev/null +++ b/extras/Doc/search/functions_7.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['update',['update',['../classCircularBuffer.html#ab88645c176a74d2e1f24ae3a9a5347da',1,'CircularBuffer']]], + ['updateanything',['updateAnything',['../classEEPROMextentClass.html#a1a965b9b231e3c3b1cbfe61dde679781',1,'EEPROMextentClass']]], + ['updatebyte',['updateByte',['../classEEPROMextentClass.html#aac1fec8d451b8db93eaa1e721273d7d5',1,'EEPROMextentClass']]], + ['updatestring',['updateString',['../classEEPROMextentClass.html#a56088f89f28c45d22948fbcb4c295b8a',1,'EEPROMextentClass']]] +]; diff --git a/extras/Doc/search/functions_8.html b/extras/Doc/search/functions_8.html new file mode 100644 index 0000000..91271b0 --- /dev/null +++ b/extras/Doc/search/functions_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/extras/Doc/search/functions_8.js b/extras/Doc/search/functions_8.js new file mode 100644 index 0000000..162d42f --- /dev/null +++ b/extras/Doc/search/functions_8.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['write',['write',['../classCircularBuffer.html#ae546bc086f88369e2aab687b8396ba0c',1,'CircularBuffer']]], + ['writeanything',['writeAnything',['../classEEPROMextentClass.html#acc14f3978c7eda75630e20589c144a9b',1,'EEPROMextentClass']]], + ['writebyte',['writeByte',['../classEEPROMextentClass.html#a35001c9795b54613d9dc6e6e508f1501',1,'EEPROMextentClass']]], + ['writestring',['writeString',['../classEEPROMextentClass.html#a9038fb29e76144f113e75d1855d277da',1,'EEPROMextentClass']]] +]; diff --git a/extras/Doc/search/mag_sel.png b/extras/Doc/search/mag_sel.png new file mode 100644 index 0000000..81f6040 Binary files /dev/null and b/extras/Doc/search/mag_sel.png differ diff --git a/extras/Doc/search/nomatches.html b/extras/Doc/search/nomatches.html new file mode 100644 index 0000000..b1ded27 --- /dev/null +++ b/extras/Doc/search/nomatches.html @@ -0,0 +1,12 @@ + + + + + + + +
+
No Matches
+
+ + diff --git a/extras/Doc/search/search.css b/extras/Doc/search/search.css new file mode 100644 index 0000000..72a6ed2 --- /dev/null +++ b/extras/Doc/search/search.css @@ -0,0 +1,273 @@ +/*---------------- Search Box */ + +#FSearchBox { + float: left; +} + +#MSearchBox { + white-space : nowrap; + float: none; + margin-top: 0px; + right: 0px; + width: 170px; + height: 24px; + z-index: 102; + display: inline; + position: absolute; +} + +#MSearchBox .left +{ + display:block; + position:absolute; + left:10px; + width:20px; + height:19px; + background:url('search_l.png') no-repeat; + background-position:right; +} + +#MSearchSelect { + display:block; + position:absolute; + width:20px; + height:19px; +} + +.left #MSearchSelect { + left:4px; +} + +.right #MSearchSelect { + right:5px; +} + +#MSearchField { + display:block; + position:absolute; + height:19px; + background:url('search_m.png') repeat-x; + border:none; + width:111px; + margin-left:20px; + padding-left:4px; + color: #909090; + outline: none; + font: 9pt Arial, Verdana, sans-serif; + -webkit-border-radius: 0px; +} + +#FSearchBox #MSearchField { + margin-left:15px; +} + +#MSearchBox .right { + display:block; + position:absolute; + right:10px; + top:0px; + width:20px; + height:19px; + background:url('search_r.png') no-repeat; + background-position:left; +} + +#MSearchClose { + display: none; + position: absolute; + top: 4px; + background : none; + border: none; + margin: 0px 4px 0px 0px; + padding: 0px 0px; + outline: none; +} + +.left #MSearchClose { + left: 6px; +} + +.right #MSearchClose { + right: 2px; +} + +.MSearchBoxActive #MSearchField { + color: #000000; +} + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #cea390; + background-color: #fcfaf9; + z-index: 10001; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt Arial, Verdana, sans-serif; + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: monospace; + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: #000000; + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: #000000; + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: #FFFFFF; + background-color: #8c553d; + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + width: 60ex; + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #000; + background-color: #f7f1ee; + z-index:10000; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; + padding-bottom: 15px; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +body.SRPage { + margin: 5px 2px; +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: #975b42; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: #975b42; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +span.SRScope { + padding-left: 4px; +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; +} + +.SRResult { + display: none; +} + +DIV.searchresults { + margin-left: 10px; + margin-right: 10px; +} + +/*---------------- External search page results */ + +.searchresult { + background-color: #f8f2f0; +} + +.pages b { + color: white; + padding: 5px 5px 3px 5px; + background-image: url("../tab_a.png"); + background-repeat: repeat-x; + text-shadow: 0 1px 1px #000000; +} + +.pages { + line-height: 17px; + margin-left: 4px; + text-decoration: none; +} + +.hl { + font-weight: bold; +} + +#searchresults { + margin-bottom: 20px; +} + +.searchpages { + margin-top: 10px; +} + diff --git a/extras/Doc/search/search.js b/extras/Doc/search/search.js new file mode 100644 index 0000000..047ed73 --- /dev/null +++ b/extras/Doc/search/search.js @@ -0,0 +1,791 @@ +function convertToId(search) +{ + var result = ''; + for (i=0;i do a search + { + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) // Up + { + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } + else if (e.keyCode==13 || e.keyCode==27) + { + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() + { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() + { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() + { + this.keyTimeout = 0; + + // strip leading whitespace + var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + var code = searchValue.toLowerCase().charCodeAt(0); + var idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair + { + idxChar = searchValue.substr(0, 2); + } + + var resultsPage; + var resultsPageWithSearch; + var hasResultsPage; + + var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) + { + var hexCode=idx.toString(10); + resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; + resultsPageWithSearch = resultsPage+'?'+escape(searchValue); + hasResultsPage = true; + } + else // nothing available for this search term + { + resultsPage = this.resultsPath + '/nomatches.html'; + resultsPageWithSearch = resultsPage; + hasResultsPage = false; + } + + window.frames.MSearchResults.location = resultsPageWithSearch; + var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + + if (domPopupSearchResultsWindow.style.display!='block') + { + var domSearchBox = this.DOMSearchBox(); + this.DOMSearchClose().style.display = 'inline'; + if (this.insideFrame) + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + domPopupSearchResultsWindow.style.position = 'relative'; + domPopupSearchResultsWindow.style.display = 'block'; + var width = document.body.clientWidth - 8; // the -8 is for IE :-( + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResults.style.width = width + 'px'; + } + else + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; + var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + } + } + + this.lastSearchValue = searchValue; + this.lastResultsPage = resultsPage; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) + { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) + { + this.DOMSearchBox().className = 'MSearchBoxActive'; + + var searchField = this.DOMSearchField(); + + if (searchField.value == this.searchLabel) // clear "Search" term upon entry + { + searchField.value = ''; + this.searchActive = true; + } + } + else if (!isActive) // directly remove the panel + { + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.DOMSearchField().value = this.searchLabel; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults(name) +{ + // The number of matches from the last run of . + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) + { + var parentElement = document.getElementById(id); + var element = parentElement.firstChild; + + while (element && element!=parentElement) + { + if (element.nodeName == 'DIV' && element.className == 'SRChildren') + { + return element; + } + + if (element.nodeName == 'DIV' && element.hasChildNodes()) + { + element = element.firstChild; + } + else if (element.nextSibling) + { + element = element.nextSibling; + } + else + { + do + { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) + { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) + { + var element = this.FindChildElement(id); + if (element) + { + if (element.style.display == 'block') + { + element.style.display = 'none'; + } + else + { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) + { + if (!search) // get search word from URL + { + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + var resultRows = document.getElementsByTagName("div"); + var matches = 0; + + var i = 0; + while (i < resultRows.length) + { + var row = resultRows.item(i); + if (row.className == "SRResult") + { + var rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) + { + row.style.display = 'block'; + matches++; + } + else + { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) // no results + { + document.getElementById("NoMatches").style.display='block'; + } + else // at least one result + { + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) + { + if (e.type == "keydown") + { + this.repeatOn = false; + this.lastKey = e.keyCode; + } + else if (e.type == "keypress") + { + if (!this.repeatOn) + { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } + else if (e.type == "keyup") + { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + var newIndex = itemIndex-1; + var focusItem = this.NavPrev(newIndex); + if (focusItem) + { + var child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') // children visible + { + var n=0; + var tmpElem; + while (1) // search for last child + { + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) + { + focusItem = tmpElem; + } + else // found it! + { + break; + } + n++; + } + } + } + if (focusItem) + { + focusItem.focus(); + } + else // return focus to search field + { + parent.document.getElementById("MSearchField").focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = itemIndex+1; + var focusItem; + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') // children visible + { + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } + else if (this.lastKey==39) // Right + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } + else if (this.lastKey==37) // Left + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + if (childIndex>0) + { + var newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } + else // already at first child, jump to parent + { + document.getElementById('Item'+itemIndex).focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = childIndex+1; + var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) // last child, jump to parent next parent + { + elem = this.NavNext(itemIndex+1); + } + if (elem) + { + elem.focus(); + } + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } +} + +function setKeyActions(elem,action) +{ + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); +} + +function setClassAttr(elem,attr) +{ + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); +} + +function createResults() +{ + var results = document.getElementById("SRResults"); + for (var e=0; e