diff --git a/AES128_8cpp_source.html b/AES128_8cpp_source.html new file mode 100644 index 00000000..fb09db3a --- /dev/null +++ b/AES128_8cpp_source.html @@ -0,0 +1,183 @@ + + + + + + +ArduinoLibs: AES128.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
AES128.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #include "AES.h"
+
24 #include "Crypto.h"
+
25 #include <string.h>
+
26 
+ +
41 {
+
42  rounds = 10;
+
43  schedule = sched;
+
44 }
+
45 
+
46 AES128::~AES128()
+
47 {
+
48  clean(sched);
+
49 }
+
50 
+
55 size_t AES128::keySize() const
+
56 {
+
57  return 16;
+
58 }
+
59 
+
60 bool AES128::setKey(const uint8_t *key, size_t len)
+
61 {
+
62  if (len != 16)
+
63  return false;
+
64 
+
65  // Copy the key itself into the first 16 bytes of the schedule.
+
66  uint8_t *schedule = sched;
+
67  memcpy(schedule, key, 16);
+
68 
+
69  // Expand the key schedule until we have 176 bytes of expanded key.
+
70  uint8_t iteration = 1;
+
71  uint8_t n = 16;
+
72  uint8_t w = 4;
+
73  while (n < 176) {
+
74  if (w == 4) {
+
75  // Every 16 bytes (4 words) we need to apply the key schedule core.
+
76  keyScheduleCore(schedule + 16, schedule + 12, iteration);
+
77  schedule[16] ^= schedule[0];
+
78  schedule[17] ^= schedule[1];
+
79  schedule[18] ^= schedule[2];
+
80  schedule[19] ^= schedule[3];
+
81  ++iteration;
+
82  w = 0;
+
83  } else {
+
84  // Otherwise just XOR the word with the one 16 bytes previous.
+
85  schedule[16] = schedule[12] ^ schedule[0];
+
86  schedule[17] = schedule[13] ^ schedule[1];
+
87  schedule[18] = schedule[14] ^ schedule[2];
+
88  schedule[19] = schedule[15] ^ schedule[3];
+
89  }
+
90 
+
91  // Advance to the next word in the schedule.
+
92  schedule += 4;
+
93  n += 4;
+
94  ++w;
+
95  }
+
96 
+
97  return true;
+
98 }
+
size_t keySize() const
Size of a 128-bit AES key in bytes.
Definition: AES128.cpp:55
+
bool setKey(const uint8_t *key, size_t len)
Sets the key to use for future encryption and decryption operations.
Definition: AES128.cpp:60
+
AES128()
Constructs an AES 128-bit block cipher with no initial key.
Definition: AES128.cpp:40
+
+ + + + diff --git a/AES192_8cpp_source.html b/AES192_8cpp_source.html new file mode 100644 index 00000000..cf5325fd --- /dev/null +++ b/AES192_8cpp_source.html @@ -0,0 +1,183 @@ + + + + + + +ArduinoLibs: AES192.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
AES192.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #include "AES.h"
+
24 #include "Crypto.h"
+
25 #include <string.h>
+
26 
+ +
41 {
+
42  rounds = 12;
+
43  schedule = sched;
+
44 }
+
45 
+
46 AES192::~AES192()
+
47 {
+
48  clean(sched);
+
49 }
+
50 
+
55 size_t AES192::keySize() const
+
56 {
+
57  return 24;
+
58 }
+
59 
+
60 bool AES192::setKey(const uint8_t *key, size_t len)
+
61 {
+
62  if (len != 24)
+
63  return false;
+
64 
+
65  // Copy the key itself into the first 24 bytes of the schedule.
+
66  uint8_t *schedule = sched;
+
67  memcpy(schedule, key, 24);
+
68 
+
69  // Expand the key schedule until we have 208 bytes of expanded key.
+
70  uint8_t iteration = 1;
+
71  uint8_t n = 24;
+
72  uint8_t w = 6;
+
73  while (n < 208) {
+
74  if (w == 6) {
+
75  // Every 24 bytes (6 words) we need to apply the key schedule core.
+
76  keyScheduleCore(schedule + 24, schedule + 20, iteration);
+
77  schedule[24] ^= schedule[0];
+
78  schedule[25] ^= schedule[1];
+
79  schedule[26] ^= schedule[2];
+
80  schedule[27] ^= schedule[3];
+
81  ++iteration;
+
82  w = 0;
+
83  } else {
+
84  // Otherwise just XOR the word with the one 24 bytes previous.
+
85  schedule[24] = schedule[20] ^ schedule[0];
+
86  schedule[25] = schedule[21] ^ schedule[1];
+
87  schedule[26] = schedule[22] ^ schedule[2];
+
88  schedule[27] = schedule[23] ^ schedule[3];
+
89  }
+
90 
+
91  // Advance to the next word in the schedule.
+
92  schedule += 4;
+
93  n += 4;
+
94  ++w;
+
95  }
+
96 
+
97  return true;
+
98 }
+
bool setKey(const uint8_t *key, size_t len)
Sets the key to use for future encryption and decryption operations.
Definition: AES192.cpp:60
+
size_t keySize() const
Size of a 192-bit AES key in bytes.
Definition: AES192.cpp:55
+
AES192()
Constructs an AES 192-bit block cipher with no initial key.
Definition: AES192.cpp:40
+
+ + + + diff --git a/AES256_8cpp_source.html b/AES256_8cpp_source.html new file mode 100644 index 00000000..65c49019 --- /dev/null +++ b/AES256_8cpp_source.html @@ -0,0 +1,190 @@ + + + + + + +ArduinoLibs: AES256.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
AES256.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #include "AES.h"
+
24 #include "Crypto.h"
+
25 #include <string.h>
+
26 
+ +
41 {
+
42  rounds = 14;
+
43  schedule = sched;
+
44 }
+
45 
+
46 AES256::~AES256()
+
47 {
+
48  clean(sched);
+
49 }
+
50 
+
55 size_t AES256::keySize() const
+
56 {
+
57  return 32;
+
58 }
+
59 
+
60 bool AES256::setKey(const uint8_t *key, size_t len)
+
61 {
+
62  if (len != 32)
+
63  return false;
+
64 
+
65  // Copy the key itself into the first 32 bytes of the schedule.
+
66  uint8_t *schedule = sched;
+
67  memcpy(schedule, key, 32);
+
68 
+
69  // Expand the key schedule until we have 240 bytes of expanded key.
+
70  uint8_t iteration = 1;
+
71  uint8_t n = 32;
+
72  uint8_t w = 8;
+
73  while (n < 240) {
+
74  if (w == 8) {
+
75  // Every 32 bytes (8 words) we need to apply the key schedule core.
+
76  keyScheduleCore(schedule + 32, schedule + 28, iteration);
+
77  schedule[32] ^= schedule[0];
+
78  schedule[33] ^= schedule[1];
+
79  schedule[34] ^= schedule[2];
+
80  schedule[35] ^= schedule[3];
+
81  ++iteration;
+
82  w = 0;
+
83  } else if (w == 4) {
+
84  // At the 16 byte mark we need to apply the S-box.
+
85  applySbox(schedule + 32, schedule + 28);
+
86  schedule[32] ^= schedule[0];
+
87  schedule[33] ^= schedule[1];
+
88  schedule[34] ^= schedule[2];
+
89  schedule[35] ^= schedule[3];
+
90  } else {
+
91  // Otherwise just XOR the word with the one 32 bytes previous.
+
92  schedule[32] = schedule[28] ^ schedule[0];
+
93  schedule[33] = schedule[29] ^ schedule[1];
+
94  schedule[34] = schedule[30] ^ schedule[2];
+
95  schedule[35] = schedule[31] ^ schedule[3];
+
96  }
+
97 
+
98  // Advance to the next word in the schedule.
+
99  schedule += 4;
+
100  n += 4;
+
101  ++w;
+
102  }
+
103 
+
104  return true;
+
105 }
+
AES256()
Constructs an AES 256-bit block cipher with no initial key.
Definition: AES256.cpp:40
+
bool setKey(const uint8_t *key, size_t len)
Sets the key to use for future encryption and decryption operations.
Definition: AES256.cpp:60
+
size_t keySize() const
Size of a 256-bit AES key in bytes.
Definition: AES256.cpp:55
+
+ + + + diff --git a/AESCommon_8cpp_source.html b/AESCommon_8cpp_source.html new file mode 100644 index 00000000..0b0892df --- /dev/null +++ b/AESCommon_8cpp_source.html @@ -0,0 +1,423 @@ + + + + + + +ArduinoLibs: AESCommon.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
AESCommon.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #include "AES.h"
+
24 #include "Crypto.h"
+
25 #include "utility/ProgMemUtil.h"
+
26 
+
48 // AES S-box (http://en.wikipedia.org/wiki/Rijndael_S-box)
+
49 static uint8_t const sbox[256] PROGMEM = {
+
50  0x63, 0x7C, 0x77, 0x7B, 0xF2, 0x6B, 0x6F, 0xC5, // 0x00
+
51  0x30, 0x01, 0x67, 0x2B, 0xFE, 0xD7, 0xAB, 0x76,
+
52  0xCA, 0x82, 0xC9, 0x7D, 0xFA, 0x59, 0x47, 0xF0, // 0x10
+
53  0xAD, 0xD4, 0xA2, 0xAF, 0x9C, 0xA4, 0x72, 0xC0,
+
54  0xB7, 0xFD, 0x93, 0x26, 0x36, 0x3F, 0xF7, 0xCC, // 0x20
+
55  0x34, 0xA5, 0xE5, 0xF1, 0x71, 0xD8, 0x31, 0x15,
+
56  0x04, 0xC7, 0x23, 0xC3, 0x18, 0x96, 0x05, 0x9A, // 0x30
+
57  0x07, 0x12, 0x80, 0xE2, 0xEB, 0x27, 0xB2, 0x75,
+
58  0x09, 0x83, 0x2C, 0x1A, 0x1B, 0x6E, 0x5A, 0xA0, // 0x40
+
59  0x52, 0x3B, 0xD6, 0xB3, 0x29, 0xE3, 0x2F, 0x84,
+
60  0x53, 0xD1, 0x00, 0xED, 0x20, 0xFC, 0xB1, 0x5B, // 0x50
+
61  0x6A, 0xCB, 0xBE, 0x39, 0x4A, 0x4C, 0x58, 0xCF,
+
62  0xD0, 0xEF, 0xAA, 0xFB, 0x43, 0x4D, 0x33, 0x85, // 0x60
+
63  0x45, 0xF9, 0x02, 0x7F, 0x50, 0x3C, 0x9F, 0xA8,
+
64  0x51, 0xA3, 0x40, 0x8F, 0x92, 0x9D, 0x38, 0xF5, // 0x70
+
65  0xBC, 0xB6, 0xDA, 0x21, 0x10, 0xFF, 0xF3, 0xD2,
+
66  0xCD, 0x0C, 0x13, 0xEC, 0x5F, 0x97, 0x44, 0x17, // 0x80
+
67  0xC4, 0xA7, 0x7E, 0x3D, 0x64, 0x5D, 0x19, 0x73,
+
68  0x60, 0x81, 0x4F, 0xDC, 0x22, 0x2A, 0x90, 0x88, // 0x90
+
69  0x46, 0xEE, 0xB8, 0x14, 0xDE, 0x5E, 0x0B, 0xDB,
+
70  0xE0, 0x32, 0x3A, 0x0A, 0x49, 0x06, 0x24, 0x5C, // 0xA0
+
71  0xC2, 0xD3, 0xAC, 0x62, 0x91, 0x95, 0xE4, 0x79,
+
72  0xE7, 0xC8, 0x37, 0x6D, 0x8D, 0xD5, 0x4E, 0xA9, // 0xB0
+
73  0x6C, 0x56, 0xF4, 0xEA, 0x65, 0x7A, 0xAE, 0x08,
+
74  0xBA, 0x78, 0x25, 0x2E, 0x1C, 0xA6, 0xB4, 0xC6, // 0xC0
+
75  0xE8, 0xDD, 0x74, 0x1F, 0x4B, 0xBD, 0x8B, 0x8A,
+
76  0x70, 0x3E, 0xB5, 0x66, 0x48, 0x03, 0xF6, 0x0E, // 0xD0
+
77  0x61, 0x35, 0x57, 0xB9, 0x86, 0xC1, 0x1D, 0x9E,
+
78  0xE1, 0xF8, 0x98, 0x11, 0x69, 0xD9, 0x8E, 0x94, // 0xE0
+
79  0x9B, 0x1E, 0x87, 0xE9, 0xCE, 0x55, 0x28, 0xDF,
+
80  0x8C, 0xA1, 0x89, 0x0D, 0xBF, 0xE6, 0x42, 0x68, // 0xF0
+
81  0x41, 0x99, 0x2D, 0x0F, 0xB0, 0x54, 0xBB, 0x16
+
82 };
+
83 
+
84 // AES inverse S-box (http://en.wikipedia.org/wiki/Rijndael_S-box)
+
85 static uint8_t const sbox_inverse[256] PROGMEM = {
+
86  0x52, 0x09, 0x6A, 0xD5, 0x30, 0x36, 0xA5, 0x38, // 0x00
+
87  0xBF, 0x40, 0xA3, 0x9E, 0x81, 0xF3, 0xD7, 0xFB,
+
88  0x7C, 0xE3, 0x39, 0x82, 0x9B, 0x2F, 0xFF, 0x87, // 0x10
+
89  0x34, 0x8E, 0x43, 0x44, 0xC4, 0xDE, 0xE9, 0xCB,
+
90  0x54, 0x7B, 0x94, 0x32, 0xA6, 0xC2, 0x23, 0x3D, // 0x20
+
91  0xEE, 0x4C, 0x95, 0x0B, 0x42, 0xFA, 0xC3, 0x4E,
+
92  0x08, 0x2E, 0xA1, 0x66, 0x28, 0xD9, 0x24, 0xB2, // 0x30
+
93  0x76, 0x5B, 0xA2, 0x49, 0x6D, 0x8B, 0xD1, 0x25,
+
94  0x72, 0xF8, 0xF6, 0x64, 0x86, 0x68, 0x98, 0x16, // 0x40
+
95  0xD4, 0xA4, 0x5C, 0xCC, 0x5D, 0x65, 0xB6, 0x92,
+
96  0x6C, 0x70, 0x48, 0x50, 0xFD, 0xED, 0xB9, 0xDA, // 0x50
+
97  0x5E, 0x15, 0x46, 0x57, 0xA7, 0x8D, 0x9D, 0x84,
+
98  0x90, 0xD8, 0xAB, 0x00, 0x8C, 0xBC, 0xD3, 0x0A, // 0x60
+
99  0xF7, 0xE4, 0x58, 0x05, 0xB8, 0xB3, 0x45, 0x06,
+
100  0xD0, 0x2C, 0x1E, 0x8F, 0xCA, 0x3F, 0x0F, 0x02, // 0x70
+
101  0xC1, 0xAF, 0xBD, 0x03, 0x01, 0x13, 0x8A, 0x6B,
+
102  0x3A, 0x91, 0x11, 0x41, 0x4F, 0x67, 0xDC, 0xEA, // 0x80
+
103  0x97, 0xF2, 0xCF, 0xCE, 0xF0, 0xB4, 0xE6, 0x73,
+
104  0x96, 0xAC, 0x74, 0x22, 0xE7, 0xAD, 0x35, 0x85, // 0x90
+
105  0xE2, 0xF9, 0x37, 0xE8, 0x1C, 0x75, 0xDF, 0x6E,
+
106  0x47, 0xF1, 0x1A, 0x71, 0x1D, 0x29, 0xC5, 0x89, // 0xA0
+
107  0x6F, 0xB7, 0x62, 0x0E, 0xAA, 0x18, 0xBE, 0x1B,
+
108  0xFC, 0x56, 0x3E, 0x4B, 0xC6, 0xD2, 0x79, 0x20, // 0xB0
+
109  0x9A, 0xDB, 0xC0, 0xFE, 0x78, 0xCD, 0x5A, 0xF4,
+
110  0x1F, 0xDD, 0xA8, 0x33, 0x88, 0x07, 0xC7, 0x31, // 0xC0
+
111  0xB1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xEC, 0x5F,
+
112  0x60, 0x51, 0x7F, 0xA9, 0x19, 0xB5, 0x4A, 0x0D, // 0xD0
+
113  0x2D, 0xE5, 0x7A, 0x9F, 0x93, 0xC9, 0x9C, 0xEF,
+
114  0xA0, 0xE0, 0x3B, 0x4D, 0xAE, 0x2A, 0xF5, 0xB0, // 0xE0
+
115  0xC8, 0xEB, 0xBB, 0x3C, 0x83, 0x53, 0x99, 0x61,
+
116  0x17, 0x2B, 0x04, 0x7E, 0xBA, 0x77, 0xD6, 0x26, // 0xF0
+
117  0xE1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0C, 0x7D
+
118 };
+
119 
+ +
126  : rounds(0), schedule(0)
+
127 {
+
128 }
+
129 
+ +
135 {
+
136  clean(state1);
+
137  clean(state2);
+
138 }
+
139 
+
144 size_t AESCommon::blockSize() const
+
145 {
+
146  return 16;
+
147 }
+
148 
+
149 // Constants to correct Galois multiplication for the high bits
+
150 // that are shifted out when multiplying by powers of two.
+
151 static uint8_t const K[8] = {
+
152  0x00,
+
153  0x1B,
+
154  (0x1B << 1),
+
155  (0x1B << 1) ^ 0x1B,
+
156  (0x1B << 2),
+
157  (0x1B << 2) ^ 0x1B,
+
158  (0x1B << 2) ^ (0x1B << 1),
+
159  (0x1B << 2) ^ (0x1B << 1) ^ 0x1B
+
160 };
+
161 
+
162 // Multiply x by 2 in the Galois field, to achieve the effect of the following:
+
163 //
+
164 // if (x & 0x80)
+
165 // return (x << 1) ^ 0x1B;
+
166 // else
+
167 // return (x << 1);
+
168 //
+
169 // However, we don't want to use runtime conditionals if we can help it
+
170 // to avoid leaking timing information from the implementation.
+
171 // In this case, multiplication is slightly faster than table lookup on AVR.
+
172 #define gmul2(x) (t = ((uint16_t)(x)) << 1, \
+
173  ((uint8_t)t) ^ (uint8_t)(0x1B * ((uint8_t)(t >> 8))))
+
174 
+
175 // Multiply x by 4 in the Galois field.
+
176 #define gmul4(x) (t = ((uint16_t)(x)) << 2, ((uint8_t)t) ^ K[t >> 8])
+
177 
+
178 // Multiply x by 8 in the Galois field.
+
179 #define gmul8(x) (t = ((uint16_t)(x)) << 3, ((uint8_t)t) ^ K[t >> 8])
+
180 
+
181 #define OUT(col, row) output[(col) * 4 + (row)]
+
182 #define IN(col, row) input[(col) * 4 + (row)]
+
183 
+
184 static void subBytesAndShiftRows(uint8_t *output, const uint8_t *input)
+
185 {
+
186  OUT(0, 0) = pgm_read_byte(sbox + IN(0, 0));
+
187  OUT(0, 1) = pgm_read_byte(sbox + IN(1, 1));
+
188  OUT(0, 2) = pgm_read_byte(sbox + IN(2, 2));
+
189  OUT(0, 3) = pgm_read_byte(sbox + IN(3, 3));
+
190  OUT(1, 0) = pgm_read_byte(sbox + IN(1, 0));
+
191  OUT(1, 1) = pgm_read_byte(sbox + IN(2, 1));
+
192  OUT(1, 2) = pgm_read_byte(sbox + IN(3, 2));
+
193  OUT(1, 3) = pgm_read_byte(sbox + IN(0, 3));
+
194  OUT(2, 0) = pgm_read_byte(sbox + IN(2, 0));
+
195  OUT(2, 1) = pgm_read_byte(sbox + IN(3, 1));
+
196  OUT(2, 2) = pgm_read_byte(sbox + IN(0, 2));
+
197  OUT(2, 3) = pgm_read_byte(sbox + IN(1, 3));
+
198  OUT(3, 0) = pgm_read_byte(sbox + IN(3, 0));
+
199  OUT(3, 1) = pgm_read_byte(sbox + IN(0, 1));
+
200  OUT(3, 2) = pgm_read_byte(sbox + IN(1, 2));
+
201  OUT(3, 3) = pgm_read_byte(sbox + IN(2, 3));
+
202 }
+
203 
+
204 static void inverseShiftRowsAndSubBytes(uint8_t *output, const uint8_t *input)
+
205 {
+
206  OUT(0, 0) = pgm_read_byte(sbox_inverse + IN(0, 0));
+
207  OUT(0, 1) = pgm_read_byte(sbox_inverse + IN(3, 1));
+
208  OUT(0, 2) = pgm_read_byte(sbox_inverse + IN(2, 2));
+
209  OUT(0, 3) = pgm_read_byte(sbox_inverse + IN(1, 3));
+
210  OUT(1, 0) = pgm_read_byte(sbox_inverse + IN(1, 0));
+
211  OUT(1, 1) = pgm_read_byte(sbox_inverse + IN(0, 1));
+
212  OUT(1, 2) = pgm_read_byte(sbox_inverse + IN(3, 2));
+
213  OUT(1, 3) = pgm_read_byte(sbox_inverse + IN(2, 3));
+
214  OUT(2, 0) = pgm_read_byte(sbox_inverse + IN(2, 0));
+
215  OUT(2, 1) = pgm_read_byte(sbox_inverse + IN(1, 1));
+
216  OUT(2, 2) = pgm_read_byte(sbox_inverse + IN(0, 2));
+
217  OUT(2, 3) = pgm_read_byte(sbox_inverse + IN(3, 3));
+
218  OUT(3, 0) = pgm_read_byte(sbox_inverse + IN(3, 0));
+
219  OUT(3, 1) = pgm_read_byte(sbox_inverse + IN(2, 1));
+
220  OUT(3, 2) = pgm_read_byte(sbox_inverse + IN(1, 2));
+
221  OUT(3, 3) = pgm_read_byte(sbox_inverse + IN(0, 3));
+
222 }
+
223 
+
224 static void mixColumn(uint8_t *output, uint8_t *input)
+
225 {
+
226  uint16_t t; // Needed by the gmul2 macro.
+
227  uint8_t a = input[0];
+
228  uint8_t b = input[1];
+
229  uint8_t c = input[2];
+
230  uint8_t d = input[3];
+
231  uint8_t a2 = gmul2(a);
+
232  uint8_t b2 = gmul2(b);
+
233  uint8_t c2 = gmul2(c);
+
234  uint8_t d2 = gmul2(d);
+
235  output[0] = a2 ^ b2 ^ b ^ c ^ d;
+
236  output[1] = a ^ b2 ^ c2 ^ c ^ d;
+
237  output[2] = a ^ b ^ c2 ^ d2 ^ d;
+
238  output[3] = a2 ^ a ^ b ^ c ^ d2;
+
239 }
+
240 
+
241 static void inverseMixColumn(uint8_t *output, const uint8_t *input)
+
242 {
+
243  uint16_t t; // Needed by the gmul2, gmul4, and gmul8 macros.
+
244  uint8_t a = input[0];
+
245  uint8_t b = input[1];
+
246  uint8_t c = input[2];
+
247  uint8_t d = input[3];
+
248  uint8_t a2 = gmul2(a);
+
249  uint8_t b2 = gmul2(b);
+
250  uint8_t c2 = gmul2(c);
+
251  uint8_t d2 = gmul2(d);
+
252  uint8_t a4 = gmul4(a);
+
253  uint8_t b4 = gmul4(b);
+
254  uint8_t c4 = gmul4(c);
+
255  uint8_t d4 = gmul4(d);
+
256  uint8_t a8 = gmul8(a);
+
257  uint8_t b8 = gmul8(b);
+
258  uint8_t c8 = gmul8(c);
+
259  uint8_t d8 = gmul8(d);
+
260  output[0] = a8 ^ a4 ^ a2 ^ b8 ^ b2 ^ b ^ c8 ^ c4 ^ c ^ d8 ^ d;
+
261  output[1] = a8 ^ a ^ b8 ^ b4 ^ b2 ^ c8 ^ c2 ^ c ^ d8 ^ d4 ^ d;
+
262  output[2] = a8 ^ a4 ^ a ^ b8 ^ b ^ c8 ^ c4 ^ c2 ^ d8 ^ d2 ^ d;
+
263  output[3] = a8 ^ a2 ^ a ^ b8 ^ b4 ^ b ^ c8 ^ c ^ d8 ^ d4 ^ d2;
+
264 }
+
265 
+
266 void AESCommon::encryptBlock(uint8_t *output, const uint8_t *input)
+
267 {
+
268  const uint8_t *roundKey = schedule;
+
269  uint8_t posn;
+
270  uint8_t round;
+
271 
+
272  // Copy the input into the state and XOR with the first round key.
+
273  for (posn = 0; posn < 16; ++posn)
+
274  state1[posn] = input[posn] ^ roundKey[posn];
+
275  roundKey += 16;
+
276 
+
277  // Perform all rounds except the last.
+
278  for (round = rounds; round > 1; --round) {
+
279  subBytesAndShiftRows(state2, state1);
+
280  mixColumn(state1, state2);
+
281  mixColumn(state1 + 4, state2 + 4);
+
282  mixColumn(state1 + 8, state2 + 8);
+
283  mixColumn(state1 + 12, state2 + 12);
+
284  for (posn = 0; posn < 16; ++posn)
+
285  state1[posn] ^= roundKey[posn];
+
286  roundKey += 16;
+
287  }
+
288 
+
289  // Perform the final round.
+
290  subBytesAndShiftRows(state2, state1);
+
291  for (posn = 0; posn < 16; ++posn)
+
292  output[posn] = state2[posn] ^ roundKey[posn];
+
293 }
+
294 
+
295 void AESCommon::decryptBlock(uint8_t *output, const uint8_t *input)
+
296 {
+
297  const uint8_t *roundKey = schedule + rounds * 16;
+
298  uint8_t round;
+
299  uint8_t posn;
+
300 
+
301  // Copy the input into the state and reverse the final round.
+
302  for (posn = 0; posn < 16; ++posn)
+
303  state1[posn] = input[posn] ^ roundKey[posn];
+
304  inverseShiftRowsAndSubBytes(state2, state1);
+
305 
+
306  // Perform all other rounds in reverse.
+
307  for (round = rounds; round > 1; --round) {
+
308  roundKey -= 16;
+
309  for (posn = 0; posn < 16; ++posn)
+
310  state2[posn] ^= roundKey[posn];
+
311  inverseMixColumn(state1, state2);
+
312  inverseMixColumn(state1 + 4, state2 + 4);
+
313  inverseMixColumn(state1 + 8, state2 + 8);
+
314  inverseMixColumn(state1 + 12, state2 + 12);
+
315  inverseShiftRowsAndSubBytes(state2, state1);
+
316  }
+
317 
+
318  // Reverse the initial round and create the output words.
+
319  roundKey -= 16;
+
320  for (posn = 0; posn < 16; ++posn)
+
321  output[posn] = state2[posn] ^ roundKey[posn];
+
322 }
+
323 
+ +
325 {
+
326  clean(schedule, (rounds + 1) * 16);
+
327  clean(state1);
+
328  clean(state2);
+
329 }
+
330 
+
333 void AESCommon::keyScheduleCore(uint8_t *output, const uint8_t *input, uint8_t iteration)
+
334 {
+
335  // Rcon(i), 2^i in the Rijndael finite field, for i = 0..10.
+
336  // http://en.wikipedia.org/wiki/Rijndael_key_schedule
+
337  static uint8_t const rcon[11] PROGMEM = {
+
338  0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, // 0x00
+
339  0x80, 0x1B, 0x36
+
340  };
+
341  output[0] = pgm_read_byte(sbox + input[1]) ^ pgm_read_byte(rcon + iteration);
+
342  output[1] = pgm_read_byte(sbox + input[2]);
+
343  output[2] = pgm_read_byte(sbox + input[3]);
+
344  output[3] = pgm_read_byte(sbox + input[0]);
+
345 }
+
346 
+
347 void AESCommon::applySbox(uint8_t *output, const uint8_t *input)
+
348 {
+
349  output[0] = pgm_read_byte(sbox + input[0]);
+
350  output[1] = pgm_read_byte(sbox + input[1]);
+
351  output[2] = pgm_read_byte(sbox + input[2]);
+
352  output[3] = pgm_read_byte(sbox + input[3]);
+
353 }
+
354 
+
void decryptBlock(uint8_t *output, const uint8_t *input)
Decrypts a single block using this cipher.
Definition: AESCommon.cpp:295
+
AESCommon()
Constructs an AES block cipher object.
Definition: AESCommon.cpp:125
+
size_t blockSize() const
Size of an AES block in bytes.
Definition: AESCommon.cpp:144
+
virtual ~AESCommon()
Destroys this AES block cipher object after clearing sensitive information.
Definition: AESCommon.cpp:134
+
void clear()
Clears all security-sensitive state from this block cipher.
Definition: AESCommon.cpp:324
+
void encryptBlock(uint8_t *output, const uint8_t *input)
Encrypts a single block using this cipher.
Definition: AESCommon.cpp:266
+
+ + + + diff --git a/AES_8h_source.html b/AES_8h_source.html new file mode 100644 index 00000000..814d656e --- /dev/null +++ b/AES_8h_source.html @@ -0,0 +1,214 @@ + + + + + + +ArduinoLibs: AES.h Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
AES.h
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #ifndef CRYPTO_AES_h
+
24 #define CRYPTO_AES_h
+
25 
+
26 #include "BlockCipher.h"
+
27 
+
28 class AESCommon : public BlockCipher
+
29 {
+
30 public:
+
31  virtual ~AESCommon();
+
32 
+
33  size_t blockSize() const;
+
34 
+
35  void encryptBlock(uint8_t *output, const uint8_t *input);
+
36  void decryptBlock(uint8_t *output, const uint8_t *input);
+
37 
+
38  void clear();
+
39 
+
40 protected:
+
41  AESCommon();
+
42 
+
44  uint8_t rounds;
+
45  uint8_t *schedule;
+
46 
+
47  void keyScheduleCore(uint8_t *output, const uint8_t *input, uint8_t iteration);
+
48  void applySbox(uint8_t *output, const uint8_t *input);
+
51 private:
+
52  uint8_t state1[16];
+
53  uint8_t state2[16];
+
54 };
+
55 
+
56 class AES128 : public AESCommon
+
57 {
+
58 public:
+
59  AES128();
+
60  virtual ~AES128();
+
61 
+
62  size_t keySize() const;
+
63 
+
64  bool setKey(const uint8_t *key, size_t len);
+
65 
+
66 private:
+
67  uint8_t sched[176];
+
68 };
+
69 
+
70 class AES192 : public AESCommon
+
71 {
+
72 public:
+
73  AES192();
+
74  virtual ~AES192();
+
75 
+
76  size_t keySize() const;
+
77 
+
78  bool setKey(const uint8_t *key, size_t len);
+
79 
+
80 private:
+
81  uint8_t sched[208];
+
82 };
+
83 
+
84 class AES256 : public AESCommon
+
85 {
+
86 public:
+
87  AES256();
+
88  virtual ~AES256();
+
89 
+
90  size_t keySize() const;
+
91 
+
92  bool setKey(const uint8_t *key, size_t len);
+
93 
+
94 private:
+
95  uint8_t sched[240];
+
96 };
+
97 
+
98 #endif
+
void decryptBlock(uint8_t *output, const uint8_t *input)
Decrypts a single block using this cipher.
Definition: AESCommon.cpp:295
+
AES block cipher with 256-bit keys.
Definition: AES.h:84
+
Abstract base class for block ciphers.
Definition: BlockCipher.h:29
+
AESCommon()
Constructs an AES block cipher object.
Definition: AESCommon.cpp:125
+
size_t keySize() const
Size of a 128-bit AES key in bytes.
Definition: AES128.cpp:55
+
bool setKey(const uint8_t *key, size_t len)
Sets the key to use for future encryption and decryption operations.
Definition: AES192.cpp:60
+
size_t blockSize() const
Size of an AES block in bytes.
Definition: AESCommon.cpp:144
+
virtual ~AESCommon()
Destroys this AES block cipher object after clearing sensitive information.
Definition: AESCommon.cpp:134
+
void clear()
Clears all security-sensitive state from this block cipher.
Definition: AESCommon.cpp:324
+
bool setKey(const uint8_t *key, size_t len)
Sets the key to use for future encryption and decryption operations.
Definition: AES128.cpp:60
+
size_t keySize() const
Size of a 192-bit AES key in bytes.
Definition: AES192.cpp:55
+
void encryptBlock(uint8_t *output, const uint8_t *input)
Encrypts a single block using this cipher.
Definition: AESCommon.cpp:266
+
AES256()
Constructs an AES 256-bit block cipher with no initial key.
Definition: AES256.cpp:40
+
Abstract base class for AES block ciphers.
Definition: AES.h:28
+
bool setKey(const uint8_t *key, size_t len)
Sets the key to use for future encryption and decryption operations.
Definition: AES256.cpp:60
+
AES block cipher with 128-bit keys.
Definition: AES.h:56
+
size_t keySize() const
Size of a 256-bit AES key in bytes.
Definition: AES256.cpp:55
+
AES128()
Constructs an AES 128-bit block cipher with no initial key.
Definition: AES128.cpp:40
+
AES block cipher with 192-bit keys.
Definition: AES.h:70
+
AES192()
Constructs an AES 192-bit block cipher with no initial key.
Definition: AES192.cpp:40
+
+ + + + diff --git a/BLAKE2s_8cpp_source.html b/BLAKE2s_8cpp_source.html new file mode 100644 index 00000000..d7e0c714 --- /dev/null +++ b/BLAKE2s_8cpp_source.html @@ -0,0 +1,319 @@ + + + + + + +ArduinoLibs: BLAKE2s.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
BLAKE2s.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #include "BLAKE2s.h"
+
24 #include "Crypto.h"
+
25 #include "utility/EndianUtil.h"
+
26 #include "utility/RotateUtil.h"
+
27 #include "utility/ProgMemUtil.h"
+
28 #include <string.h>
+
29 
+ +
48 {
+
49  reset();
+
50 }
+
51 
+ +
57 {
+
58  clean(state);
+
59 }
+
60 
+
61 size_t BLAKE2s::hashSize() const
+
62 {
+
63  return 32;
+
64 }
+
65 
+
66 size_t BLAKE2s::blockSize() const
+
67 {
+
68  return 64;
+
69 }
+
70 
+
71 // Initialization vectors for BLAKE2s.
+
72 #define BLAKE2s_IV0 0x6A09E667
+
73 #define BLAKE2s_IV1 0xBB67AE85
+
74 #define BLAKE2s_IV2 0x3C6EF372
+
75 #define BLAKE2s_IV3 0xA54FF53A
+
76 #define BLAKE2s_IV4 0x510E527F
+
77 #define BLAKE2s_IV5 0x9B05688C
+
78 #define BLAKE2s_IV6 0x1F83D9AB
+
79 #define BLAKE2s_IV7 0x5BE0CD19
+
80 
+ +
82 {
+
83  state.h[0] = BLAKE2s_IV0 ^ 0x01010020; // Default output length of 32.
+
84  state.h[1] = BLAKE2s_IV1;
+
85  state.h[2] = BLAKE2s_IV2;
+
86  state.h[3] = BLAKE2s_IV3;
+
87  state.h[4] = BLAKE2s_IV4;
+
88  state.h[5] = BLAKE2s_IV5;
+
89  state.h[6] = BLAKE2s_IV6;
+
90  state.h[7] = BLAKE2s_IV7;
+
91  state.chunkSize = 0;
+
92  state.finalized = false;
+
93  state.length = 0;
+
94 }
+
95 
+
103 void BLAKE2s::reset(uint8_t outputLength)
+
104 {
+
105  state.h[0] = BLAKE2s_IV0 ^ 0x01010000 ^ outputLength;
+
106  state.h[1] = BLAKE2s_IV1;
+
107  state.h[2] = BLAKE2s_IV2;
+
108  state.h[3] = BLAKE2s_IV3;
+
109  state.h[4] = BLAKE2s_IV4;
+
110  state.h[5] = BLAKE2s_IV5;
+
111  state.h[6] = BLAKE2s_IV6;
+
112  state.h[7] = BLAKE2s_IV7;
+
113  state.chunkSize = 0;
+
114  state.finalized = false;
+
115  state.length = 0;
+
116 }
+
117 
+
118 void BLAKE2s::update(const void *data, size_t len)
+
119 {
+
120  // Reset the hashing process if finalize() was called previously.
+
121  if (state.finalized)
+
122  reset();
+
123 
+
124  // Break the input up into 512-bit chunks and process each in turn.
+
125  const uint8_t *d = (const uint8_t *)data;
+
126  while (len > 0) {
+
127  if (state.chunkSize == 64) {
+
128  // Previous chunk was full and we know that it wasn't the
+
129  // last chunk, so we can process it now with f0 set to zero.
+
130  processChunk(0);
+
131  state.chunkSize = 0;
+
132  }
+
133  uint8_t size = 64 - state.chunkSize;
+
134  if (size > len)
+
135  size = len;
+
136  memcpy(((uint8_t *)state.m) + state.chunkSize, d, size);
+
137  state.chunkSize += size;
+
138  state.length += size;
+
139  len -= size;
+
140  d += size;
+
141  }
+
142 }
+
143 
+
144 void BLAKE2s::finalize(void *hash, size_t len)
+
145 {
+
146  // Finalize the hash if necessary.
+
147  if (!state.finalized) {
+
148  // Pad the last chunk and hash it with f0 set to all-ones.
+
149  memset(((uint8_t *)state.m) + state.chunkSize, 0, 64 - state.chunkSize);
+
150  processChunk(0xFFFFFFFF);
+
151 
+
152  // Convert the hash into little-endian in the message buffer.
+
153  for (uint8_t posn = 0; posn < 8; ++posn)
+
154  state.m[posn] = htole32(state.h[posn]);
+
155  state.finalized = true;
+
156  }
+
157 
+
158  // Copy the hash to the caller's return buffer.
+
159  if (len > 32)
+
160  len = 32;
+
161  memcpy(hash, state.m, len);
+
162 }
+
163 
+ +
165 {
+
166  clean(state);
+
167  reset();
+
168 }
+
169 
+
170 // Permutation on the message input state for BLAKE2s.
+
171 static const uint8_t sigma[10][16] PROGMEM = {
+
172  { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
+
173  {14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3},
+
174  {11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4},
+
175  { 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8},
+
176  { 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13},
+
177  { 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9},
+
178  {12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11},
+
179  {13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10},
+
180  { 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5},
+
181  {10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13 , 0}
+
182 };
+
183 
+
184 // Perform a BLAKE2s quarter round operation.
+
185 #define quarterRound(a, b, c, d, i) \
+
186  do { \
+
187  uint32_t _b = (b); \
+
188  uint32_t _a = (a) + _b + state.m[pgm_read_byte(&(sigma[index][2 * (i)]))]; \
+
189  uint32_t _d = rightRotate16((d) ^ _a); \
+
190  uint32_t _c = (c) + _d; \
+
191  _b = rightRotate12(_b ^ _c); \
+
192  _a += _b + state.m[pgm_read_byte(&(sigma[index][2 * (i) + 1]))]; \
+
193  (d) = _d = rightRotate8(_d ^ _a); \
+
194  _c += _d; \
+
195  (a) = _a; \
+
196  (b) = rightRotate7(_b ^ _c); \
+
197  (c) = _c; \
+
198  } while (0)
+
199 
+
200 void BLAKE2s::processChunk(uint32_t f0)
+
201 {
+
202  uint8_t index;
+
203 
+
204  // Byte-swap the message buffer into little-endian if necessary.
+
205 #if !defined(CRYPTO_LITTLE_ENDIAN)
+
206  for (index = 0; index < 16; ++index)
+
207  state.m[index] = le32toh(state.m[index]);
+
208 #endif
+
209 
+
210  // Format the block to be hashed.
+
211  memcpy(state.v, state.h, sizeof(state.h));
+
212  state.v[8] = BLAKE2s_IV0;
+
213  state.v[9] = BLAKE2s_IV1;
+
214  state.v[10] = BLAKE2s_IV2;
+
215  state.v[11] = BLAKE2s_IV3;
+
216  state.v[12] = BLAKE2s_IV4 ^ (uint32_t)(state.length);
+
217  state.v[13] = BLAKE2s_IV5 ^ (uint32_t)(state.length >> 32);
+
218  state.v[14] = BLAKE2s_IV6 ^ f0;
+
219  state.v[15] = BLAKE2s_IV7;
+
220 
+
221  // Perform the 10 BLAKE2s rounds.
+
222  for (index = 0; index < 10; ++index) {
+
223  // Column round.
+
224  quarterRound(state.v[0], state.v[4], state.v[8], state.v[12], 0);
+
225  quarterRound(state.v[1], state.v[5], state.v[9], state.v[13], 1);
+
226  quarterRound(state.v[2], state.v[6], state.v[10], state.v[14], 2);
+
227  quarterRound(state.v[3], state.v[7], state.v[11], state.v[15], 3);
+
228 
+
229  // Diagonal round.
+
230  quarterRound(state.v[0], state.v[5], state.v[10], state.v[15], 4);
+
231  quarterRound(state.v[1], state.v[6], state.v[11], state.v[12], 5);
+
232  quarterRound(state.v[2], state.v[7], state.v[8], state.v[13], 6);
+
233  quarterRound(state.v[3], state.v[4], state.v[9], state.v[14], 7);
+
234  }
+
235 
+
236  // Combine the new and old hash values.
+
237  for (index = 0; index < 8; ++index)
+
238  state.h[index] ^= (state.v[index] ^ state.v[index + 8]);
+
239 }
+
virtual ~BLAKE2s()
Destroys this BLAKE2s hash object after clearing sensitive information.
Definition: BLAKE2s.cpp:56
+
size_t hashSize() const
Size of the hash result from finalize().
Definition: BLAKE2s.cpp:61
+
void clear()
Clears the hash state, removing all sensitive data, and then resets the hash ready for a new hashing ...
Definition: BLAKE2s.cpp:164
+
void reset()
Resets the hash ready for a new hashing process.
Definition: BLAKE2s.cpp:81
+
size_t blockSize() const
Size of the internal block used by the hash algorithm.
Definition: BLAKE2s.cpp:66
+
void update(const void *data, size_t len)
Updates the hash with more data.
Definition: BLAKE2s.cpp:118
+
void finalize(void *hash, size_t len)
Finalizes the hashing process and returns the hash.
Definition: BLAKE2s.cpp:144
+
uint8_t * data()
Returns a pointer to the start of the bitmap's data buffer.
Definition: Bitmap.h:53
+
BLAKE2s()
Constructs a BLAKE2s hash object.
Definition: BLAKE2s.cpp:47
+
+ + + + diff --git a/BLAKE2s_8h_source.html b/BLAKE2s_8h_source.html new file mode 100644 index 00000000..f08db618 --- /dev/null +++ b/BLAKE2s_8h_source.html @@ -0,0 +1,166 @@ + + + + + + +ArduinoLibs: BLAKE2s.h Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
BLAKE2s.h
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #ifndef CRYPTO_BLAKE2S_H
+
24 #define CRYPTO_BLAKE2S_H
+
25 
+
26 #include "Hash.h"
+
27 
+
28 class BLAKE2s : public Hash
+
29 {
+
30 public:
+
31  BLAKE2s();
+
32  virtual ~BLAKE2s();
+
33 
+
34  size_t hashSize() const;
+
35  size_t blockSize() const;
+
36 
+
37  void reset();
+
38  void reset(uint8_t outputLength);
+
39  void update(const void *data, size_t len);
+
40  void finalize(void *hash, size_t len);
+
41 
+
42  void clear();
+
43 
+
44 private:
+
45  struct {
+
46  uint32_t h[8];
+
47  uint32_t m[16];
+
48  uint32_t v[16];
+
49  uint8_t chunkSize;
+
50  bool finalized;
+
51  uint64_t length;
+
52  } state;
+
53 
+
54  void processChunk(uint32_t f0);
+
55 };
+
56 
+
57 #endif
+
virtual ~BLAKE2s()
Destroys this BLAKE2s hash object after clearing sensitive information.
Definition: BLAKE2s.cpp:56
+
size_t hashSize() const
Size of the hash result from finalize().
Definition: BLAKE2s.cpp:61
+
void clear()
Clears the hash state, removing all sensitive data, and then resets the hash ready for a new hashing ...
Definition: BLAKE2s.cpp:164
+
void reset()
Resets the hash ready for a new hashing process.
Definition: BLAKE2s.cpp:81
+
size_t blockSize() const
Size of the internal block used by the hash algorithm.
Definition: BLAKE2s.cpp:66
+
Abstract base class for cryptographic hash algorithms.
Definition: Hash.h:29
+
void update(const void *data, size_t len)
Updates the hash with more data.
Definition: BLAKE2s.cpp:118
+
BLAKE2s hash algorithm.
Definition: BLAKE2s.h:28
+
void finalize(void *hash, size_t len)
Finalizes the hashing process and returns the hash.
Definition: BLAKE2s.cpp:144
+
BLAKE2s()
Constructs a BLAKE2s hash object.
Definition: BLAKE2s.cpp:47
+
+ + + + diff --git a/Bitmap_8cpp_source.html b/Bitmap_8cpp_source.html index 7d864f3a..a0506387 100644 --- a/Bitmap_8cpp_source.html +++ b/Bitmap_8cpp_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: Bitmap.cpp Source File @@ -29,7 +30,7 @@ - + @@ -114,7 +115,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
25 #include <string.h>
26 #include <stdlib.h>
27 
-
88 Bitmap::Bitmap(int width, int height)
+
88 Bitmap::Bitmap(int width, int height)
89  : _width(width)
90  , _height(height)
91  , _stride((width + 7) / 8)
@@ -129,34 +130,34 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
100  memset(fb, 0xFF, size);
101 }
102 
-
106 Bitmap::~Bitmap()
+
106 Bitmap::~Bitmap()
107 {
108  if (fb)
109  free(fb);
110 }
111 
-
174 void Bitmap::clear(Color color)
+
174 void Bitmap::clear(Color color)
175 {
176  unsigned int size = _stride * _height;
-
177  if (color == Black)
+
177  if (color == Black)
178  memset(fb, 0xFF, size);
179  else
180  memset(fb, 0x00, size);
181 }
182 
-
191 Bitmap::Color Bitmap::pixel(int x, int y) const
+
191 Bitmap::Color Bitmap::pixel(int x, int y) const
192 {
193  if (((unsigned int)x) >= ((unsigned int)_width) ||
194  ((unsigned int)y) >= ((unsigned int)_height))
-
195  return Black;
+
195  return Black;
196  uint8_t *ptr = fb + y * _stride + (x >> 3);
197  if (*ptr & ((uint8_t)0x80) >> (x & 0x07))
-
198  return Black;
+
198  return Black;
199  else
-
200  return White;
+
200  return White;
201 }
202 
-
208 void Bitmap::setPixel(int x, int y, Color color)
+
208 void Bitmap::setPixel(int x, int y, Color color)
209 {
210  if (((unsigned int)x) >= ((unsigned int)_width) ||
211  ((unsigned int)y) >= ((unsigned int)_height))
@@ -168,7 +169,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
217  *ptr |= (((uint8_t)0x80) >> (x & 0x07));
218 }
219 
-
225 void Bitmap::drawLine(int x1, int y1, int x2, int y2, Color color)
+
225 void Bitmap::drawLine(int x1, int y1, int x2, int y2, Color color)
226 {
227  // Midpoint line scan-conversion algorithm from "Computer Graphics:
228  // Principles and Practice", Second Edition, Foley, van Dam, et al.
@@ -192,7 +193,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
246  d = 2 * dy - dx;
247  incrE = 2 * dy;
248  incrNE = 2 * (dy - dx);
-
249  setPixel(x1, y1, color);
+
249  setPixel(x1, y1, color);
250  while (x1 != x2) {
251  if (d <= 0) {
252  d += incrE;
@@ -201,13 +202,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
255  y1 += ystep;
256  }
257  x1 += xstep;
-
258  setPixel(x1, y1, color);
+
258  setPixel(x1, y1, color);
259  }
260  } else {
261  d = 2 * dx - dy;
262  incrE = 2 * dx;
263  incrNE = 2 * (dx - dy);
-
264  setPixel(x1, y1, color);
+
264  setPixel(x1, y1, color);
265  while (y1 != y2) {
266  if (d <= 0) {
267  d += incrE;
@@ -216,12 +217,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
270  x1 += xstep;
271  }
272  y1 += ystep;
-
273  setPixel(x1, y1, color);
+
273  setPixel(x1, y1, color);
274  }
275  }
276 }
277 
-
286 void Bitmap::drawRect(int x1, int y1, int x2, int y2, Color borderColor, Color fillColor)
+
286 void Bitmap::drawRect(int x1, int y1, int x2, int y2, Color borderColor, Color fillColor)
287 {
288  int temp;
289  if (x1 > x2) {
@@ -235,21 +236,21 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
297  y2 = temp;
298  }
299  if (fillColor == borderColor) {
-
300  fill(x1, y1, x2 - x1 + 1, y2 - y1 + 1, fillColor);
+
300  fill(x1, y1, x2 - x1 + 1, y2 - y1 + 1, fillColor);
301  } else {
-
302  drawLine(x1, y1, x2, y1, borderColor);
+
302  drawLine(x1, y1, x2, y1, borderColor);
303  if (y1 < y2)
-
304  drawLine(x2, y1 + 1, x2, y2, borderColor);
+
304  drawLine(x2, y1 + 1, x2, y2, borderColor);
305  if (x1 < x2)
-
306  drawLine(x2 - 1, y2, x1, y2, borderColor);
+
306  drawLine(x2 - 1, y2, x1, y2, borderColor);
307  if (y1 < (y2 - 1))
-
308  drawLine(x1, y2 - 1, x1, y1 + 1, borderColor);
-
309  if (fillColor != NoFill)
-
310  fill(x1 + 1, y1 + 1, x2 - x1 - 1, y2 - y1 - 1, fillColor);
+
308  drawLine(x1, y2 - 1, x1, y1 + 1, borderColor);
+
309  if (fillColor != NoFill)
+
310  fill(x1 + 1, y1 + 1, x2 - x1 - 1, y2 - y1 - 1, fillColor);
311  }
312 }
313 
-
334 void Bitmap::drawCircle(int centerX, int centerY, int radius, Color borderColor, Color fillColor)
+
334 void Bitmap::drawCircle(int centerX, int centerY, int radius, Color borderColor, Color fillColor)
335 {
336  // Midpoint circle scan-conversion algorithm using second-order
337  // differences from "Computer Graphics: Principles and Practice",
@@ -278,21 +279,21 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
360  }
361 }
362 
-
388 void Bitmap::drawBitmap(int x, int y, const Bitmap &bitmap, Color color)
+
388 void Bitmap::drawBitmap(int x, int y, const Bitmap &bitmap, Color color)
389 {
-
390  int w = bitmap.width();
-
391  int s = bitmap.stride();
-
392  int h = bitmap.height();
-
393  Color invColor = !color;
+
390  int w = bitmap.width();
+
391  int s = bitmap.stride();
+
392  int h = bitmap.height();
+
393  Color invColor = !color;
394  for (uint8_t by = 0; by < h; ++by) {
-
395  const uint8_t *line = bitmap.data() + by * s;
+
395  const uint8_t *line = bitmap.data() + by * s;
396  uint8_t mask = 0x80;
397  uint8_t value = *line++;
398  for (uint8_t bx = 0; bx < w; ++bx) {
399  if (value & mask)
-
400  setPixel(x + bx, y + by, invColor);
+
400  setPixel(x + bx, y + by, invColor);
401  else
-
402  setPixel(x + bx, y + by, color);
+
402  setPixel(x + bx, y + by, color);
403  mask >>= 1;
404  if (!mask) {
405  mask = 0x80;
@@ -302,21 +303,21 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
409  }
410 }
411 
-
425 void Bitmap::drawBitmap(int x, int y, Bitmap::ProgMem bitmap, Color color)
+
425 void Bitmap::drawBitmap(int x, int y, Bitmap::ProgMem bitmap, Color color)
426 {
427  uint8_t w = pgm_read_byte(bitmap);
428  uint8_t s = (w + 7) >> 3;
429  uint8_t h = pgm_read_byte(bitmap + 1);
-
430  Color invColor = !color;
+
430  Color invColor = !color;
431  for (uint8_t by = 0; by < h; ++by) {
432  const uint8_t *line = ((const uint8_t *)bitmap) + 2 + by * s;
433  uint8_t mask = 0x80;
434  uint8_t value = pgm_read_byte(line);
435  for (uint8_t bx = 0; bx < w; ++bx) {
436  if (value & mask)
-
437  setPixel(x + bx, y + by, color);
+
437  setPixel(x + bx, y + by, color);
438  else
-
439  setPixel(x + bx, y + by, invColor);
+
439  setPixel(x + bx, y + by, invColor);
440  mask >>= 1;
441  if (!mask) {
442  mask = 0x80;
@@ -334,17 +335,17 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
513 #define fontFirstChar(font) (pgm_read_byte((font) + 4))
514 #define fontCharCount(font) (pgm_read_byte((font) + 5))
515 
-
526 void Bitmap::drawText(int x, int y, const char *str, int len)
+
526 void Bitmap::drawText(int x, int y, const char *str, int len)
527 {
528  if (!_font)
529  return;
-
530  uint8_t height = fontHeight(_font);
+
530  uint8_t height = fontHeight(_font);
531  if (len < 0)
532  len = strlen(str);
533  while (len-- > 0) {
-
534  x += drawChar(x, y, *str++);
+
534  x += drawChar(x, y, *str++);
535  if (len > 0) {
-
536  fill(x, y, 1, height, !_textColor);
+
536  fill(x, y, 1, height, !_textColor);
537  ++x;
538  }
539  if (x >= _width)
@@ -352,17 +353,17 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
541  }
542 }
543 
-
555 void Bitmap::drawText(int x, int y, const String &str, int start, int len)
+
555 void Bitmap::drawText(int x, int y, const String &str, int start, int len)
556 {
557  if (!_font)
558  return;
-
559  uint8_t height = fontHeight(_font);
+
559  uint8_t height = fontHeight(_font);
560  if (len < 0)
561  len = str.length() - start;
562  while (len-- > 0) {
-
563  x += drawChar(x, y, str[start++]);
+
563  x += drawChar(x, y, str[start++]);
564  if (len > 0) {
-
565  fill(x, y, 1, height, !_textColor);
+
565  fill(x, y, 1, height, !_textColor);
566  ++x;
567  }
568  if (x >= _width)
@@ -370,14 +371,14 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
570  }
571 }
572 
-
585 int Bitmap::drawChar(int x, int y, char ch)
+
585 int Bitmap::drawChar(int x, int y, char ch)
586 {
-
587  uint8_t height = fontHeight(_font);
+
587  uint8_t height = fontHeight(_font);
588  if (ch == ' ') {
589  // Font may not have space, or it is zero-width. Calculate
590  // the real size and fill the space.
-
591  int spaceWidth = charWidth('n');
-
592  fill(x, y, spaceWidth, height, !_textColor);
+
591  int spaceWidth = charWidth('n');
+
592  fill(x, y, spaceWidth, height, !_textColor);
593  return spaceWidth;
594  }
595  uint8_t first = fontFirstChar(_font);
@@ -387,12 +388,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
599  return 0;
600  index -= first;
601  uint8_t heightBytes = (height + 7) >> 3;;
-
602  uint8_t width;
+
602  uint8_t width;
603  const uint8_t *image;
604  if (fontIsFixed(_font)) {
605  // Fixed-width font.
606  width = fontWidth(_font);
-
607  image = ((const uint8_t *)_font) + 6 + index * heightBytes * width;
+
607  image = ((const uint8_t *)_font) + 6 + index * heightBytes * width;
608  } else {
609  // Variable-width font.
610  width = pgm_read_byte(_font + 6 + index);
@@ -404,9 +405,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
616  }
617  }
618  if ((x + width) <= 0 || (y + height) <= 0)
-
619  return width; // Character is off the top or left of the screen.
-
620  Color invColor = !_textColor;
-
621  for (uint8_t cx = 0; cx < width; ++cx) {
+
619  return width; // Character is off the top or left of the screen.
+
620  Color invColor = !_textColor;
+
621  for (uint8_t cx = 0; cx < width; ++cx) {
622  for (uint8_t cy = 0; cy < heightBytes; ++cy) {
623  uint8_t value = pgm_read_byte(image + cy * width + cx);
624  int posn;
@@ -417,18 +418,18 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
629  for (uint8_t bit = 0; bit < 8; ++bit) {
630  if ((posn + bit) >= (cy * 8) && (posn + bit) <= height) {
631  if (value & 0x01)
-
632  setPixel(x + cx, y + posn + bit, _textColor);
+
632  setPixel(x + cx, y + posn + bit, _textColor);
633  else
-
634  setPixel(x + cx, y + posn + bit, invColor);
+
634  setPixel(x + cx, y + posn + bit, invColor);
635  }
636  value >>= 1;
637  }
638  }
639  }
-
640  return width;
+
640  return width;
641 }
642 
-
650 int Bitmap::charWidth(char ch) const
+
650 int Bitmap::charWidth(char ch) const
651 {
652  uint8_t index = (uint8_t)ch;
653  if (!_font)
@@ -445,33 +446,33 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
664  return pgm_read_byte(_font + 6 + (index - first));
665 }
666 
-
675 int Bitmap::textWidth(const char *str, int len) const
+
675 int Bitmap::textWidth(const char *str, int len) const
676 {
-
677  int width = 0;
+
677  int width = 0;
678  if (len < 0)
679  len = strlen(str);
680  while (len-- > 0) {
-
681  width += charWidth(*str++);
+
681  width += charWidth(*str++);
682  if (len > 0)
-
683  ++width;
+
683  ++width;
684  }
-
685  return width;
+
685  return width;
686 }
687 
-
697 int Bitmap::textWidth(const String &str, int start, int len) const
+
697 int Bitmap::textWidth(const String &str, int start, int len) const
698 {
-
699  int width = 0;
+
699  int width = 0;
700  if (len < 0)
701  len = str.length() - start;
702  while (len-- > 0) {
-
703  width += charWidth(str[start++]);
+
703  width += charWidth(str[start++]);
704  if (len > 0)
-
705  ++width;
+
705  ++width;
706  }
-
707  return width;
+
707  return width;
708 }
709 
-
716 int Bitmap::textHeight() const
+
716 int Bitmap::textHeight() const
717 {
718  if (_font)
719  return fontHeight(_font);
@@ -479,7 +480,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
721  return 0;
722 }
723 
-
738 void Bitmap::copy(int x, int y, int width, int height, Bitmap *dest, int destX, int destY)
+
738 void Bitmap::copy(int x, int y, int width, int height, Bitmap *dest, int destX, int destY)
739 {
740  if (dest == this) {
741  // Copying to within the same bitmap, so copy in a direction
@@ -488,44 +489,44 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
744  } else {
745  // Copying to a different bitmap.
746  while (height > 0) {
-
747  for (int tempx = 0; tempx < width; ++tempx)
-
748  dest->setPixel(destX + tempx, destY, pixel(x + tempx, y));
+
747  for (int tempx = 0; tempx < width; ++tempx)
+
748  dest->setPixel(destX + tempx, destY, pixel(x + tempx, y));
749  ++y;
750  ++destY;
-
751  --height;
+
751  --height;
752  }
753  }
754 }
755 
-
762 void Bitmap::fill(int x, int y, int width, int height, Color color)
+
762 void Bitmap::fill(int x, int y, int width, int height, Color color)
763 {
764  while (height > 0) {
-
765  for (int temp = 0; temp < width; ++temp)
-
766  setPixel(x + temp, y, color);
+
765  for (int temp = 0; temp < width; ++temp)
+
766  setPixel(x + temp, y, color);
767  ++y;
-
768  --height;
+
768  --height;
769  }
770 }
771 
-
785 void Bitmap::fill(int x, int y, int width, int height, Bitmap::ProgMem pattern, Color color)
+
785 void Bitmap::fill(int x, int y, int width, int height, Bitmap::ProgMem pattern, Color color)
786 {
787  uint8_t w = pgm_read_byte(pattern);
788  uint8_t s = (w + 7) >> 3;
789  uint8_t h = pgm_read_byte(pattern + 1);
790  if (!w || !h)
791  return;
-
792  Color invColor = !color;
-
793  for (int tempy = 0; tempy < height; ++tempy) {
+
792  Color invColor = !color;
+
793  for (int tempy = 0; tempy < height; ++tempy) {
794  const uint8_t *startLine = ((const uint8_t *)pattern) + 2 + (tempy % h) * s;
795  const uint8_t *line = startLine;
796  uint8_t mask = 0x80;
797  uint8_t value = pgm_read_byte(line++);
798  int bit = 0;
-
799  for (int tempx = 0; tempx < width; ++tempx) {
+
799  for (int tempx = 0; tempx < width; ++tempx) {
800  if (value & mask)
-
801  setPixel(x + tempx, y + tempy, color);
+
801  setPixel(x + tempx, y + tempy, color);
802  else
-
803  setPixel(x + tempx, y + tempy, invColor);
+
803  setPixel(x + tempx, y + tempy, invColor);
804  if (++bit >= w) {
805  mask = 0x80;
806  line = startLine;
@@ -542,7 +543,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
817  }
818 }
819 
-
841 void Bitmap::scroll(int x, int y, int width, int height, int dx, int dy, Color fillColor)
+
841 void Bitmap::scroll(int x, int y, int width, int height, int dx, int dy, Color fillColor)
842 {
843  // Bail out if no scrolling at all.
844  if (!dx && !dy)
@@ -579,30 +580,30 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
875 
876  // Fill the pixels that were uncovered by the scroll.
877  if (dy < 0) {
-
878  fill(x, y + height + dy, width, -dy, fillColor);
+
878  fill(x, y + height + dy, width, -dy, fillColor);
879  if (dx < 0)
-
880  fill(x + width + dx, y, -dx, height + dy, fillColor);
+
880  fill(x + width + dx, y, -dx, height + dy, fillColor);
881  else if (dx > 0)
-
882  fill(x, y, dx, height + dy, fillColor);
+
882  fill(x, y, dx, height + dy, fillColor);
883  } else if (dy > 0) {
-
884  fill(x, y, width, -dy, fillColor);
+
884  fill(x, y, width, -dy, fillColor);
885  if (dx < 0)
-
886  fill(x + width + dx, y + dy, -dx, height - dy, fillColor);
+
886  fill(x + width + dx, y + dy, -dx, height - dy, fillColor);
887  else if (dx > 0)
-
888  fill(x, y + dy, dx, height - dy, fillColor);
+
888  fill(x, y + dy, dx, height - dy, fillColor);
889  } else if (dx < 0) {
-
890  fill(x + width + dx, y, -dx, height, fillColor);
+
890  fill(x + width + dx, y, -dx, height, fillColor);
891  } else if (dx > 0) {
-
892  fill(x, y, dx, height, fillColor);
+
892  fill(x, y, dx, height, fillColor);
893  }
894 }
895 
-
902 void Bitmap::invert(int x, int y, int width, int height)
+
902 void Bitmap::invert(int x, int y, int width, int height)
903 {
904  while (height > 0) {
905  for (int tempx = x + width - 1; tempx >= x; --tempx)
-
906  setPixel(tempx, y, !pixel(tempx, y));
-
907  --height;
+
906  setPixel(tempx, y, !pixel(tempx, y));
+
907  --height;
908  ++y;
909  }
910 }
@@ -614,14 +615,14 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
916  int y = y1 - tempy + y3;
917  int x = x3 - x1;
918  for (int tempx = x1; tempx <= x2; ++tempx)
-
919  setPixel(x + tempx, y, pixel(tempx, tempy));
+
919  setPixel(x + tempx, y, pixel(tempx, tempy));
920  }
921  } else {
922  for (int tempy = y2; tempy >= y1; --tempy) {
923  int y = y1 - tempy + y3;
924  int x = x3 - x1;
925  for (int tempx = x2; tempx >= x1; --tempx)
-
926  setPixel(x + tempx, y, pixel(tempx, tempy));
+
926  setPixel(x + tempx, y, pixel(tempx, tempy));
927  }
928  }
929 }
@@ -629,45 +630,73 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
931 void Bitmap::drawCirclePoints(int centerX, int centerY, int radius, int x, int y, Color borderColor, Color fillColor)
932 {
933  if (x != y) {
-
934  setPixel(centerX + x, centerY + y, borderColor);
-
935  setPixel(centerX + y, centerY + x, borderColor);
-
936  setPixel(centerX + y, centerY - x, borderColor);
-
937  setPixel(centerX + x, centerY - y, borderColor);
-
938  setPixel(centerX - x, centerY - y, borderColor);
-
939  setPixel(centerX - y, centerY - x, borderColor);
-
940  setPixel(centerX - y, centerY + x, borderColor);
-
941  setPixel(centerX - x, centerY + y, borderColor);
-
942  if (fillColor != NoFill) {
+
934  setPixel(centerX + x, centerY + y, borderColor);
+
935  setPixel(centerX + y, centerY + x, borderColor);
+
936  setPixel(centerX + y, centerY - x, borderColor);
+
937  setPixel(centerX + x, centerY - y, borderColor);
+
938  setPixel(centerX - x, centerY - y, borderColor);
+
939  setPixel(centerX - y, centerY - x, borderColor);
+
940  setPixel(centerX - y, centerY + x, borderColor);
+
941  setPixel(centerX - x, centerY + y, borderColor);
+
942  if (fillColor != NoFill) {
943  if (radius > 1) {
-
944  drawLine(centerX - x + 1, centerY + y, centerX + x - 1, centerY + y, fillColor);
-
945  drawLine(centerX - y + 1, centerY + x, centerX + y - 1, centerY + x, fillColor);
-
946  drawLine(centerX - x + 1, centerY - y, centerX + x - 1, centerY - y, fillColor);
-
947  drawLine(centerX - y + 1, centerY - x, centerX + y - 1, centerY - x, fillColor);
+
944  drawLine(centerX - x + 1, centerY + y, centerX + x - 1, centerY + y, fillColor);
+
945  drawLine(centerX - y + 1, centerY + x, centerX + y - 1, centerY + x, fillColor);
+
946  drawLine(centerX - x + 1, centerY - y, centerX + x - 1, centerY - y, fillColor);
+
947  drawLine(centerX - y + 1, centerY - x, centerX + y - 1, centerY - x, fillColor);
948  } else if (radius == 1) {
-
949  setPixel(centerX, centerY, fillColor);
+
949  setPixel(centerX, centerY, fillColor);
950  }
951  }
952  } else {
-
953  setPixel(centerX + x, centerY + y, borderColor);
-
954  setPixel(centerX + y, centerY - x, borderColor);
-
955  setPixel(centerX - x, centerY - y, borderColor);
-
956  setPixel(centerX - y, centerY + x, borderColor);
-
957  if (fillColor != NoFill) {
+
953  setPixel(centerX + x, centerY + y, borderColor);
+
954  setPixel(centerX + y, centerY - x, borderColor);
+
955  setPixel(centerX - x, centerY - y, borderColor);
+
956  setPixel(centerX - y, centerY + x, borderColor);
+
957  if (fillColor != NoFill) {
958  if (radius > 1) {
-
959  drawLine(centerX - x + 1, centerY + y, centerX + x - 1, centerY + y, fillColor);
-
960  drawLine(centerX - x + 1, centerY - y, centerX + x - 1, centerY - y, fillColor);
+
959  drawLine(centerX - x + 1, centerY + y, centerX + x - 1, centerY + y, fillColor);
+
960  drawLine(centerX - x + 1, centerY - y, centerX + x - 1, centerY - y, fillColor);
961  } else if (radius == 1) {
-
962  setPixel(centerX, centerY, fillColor);
+
962  setPixel(centerX, centerY, fillColor);
963  }
964  }
965  }
966 }
+
Bitmap::width
int width() const
Returns the width of the bitmap in pixels.
Definition: Bitmap.h:48
+
Bitmap::copy
void copy(int x, int y, int width, int height, Bitmap *dest, int destX, int destY)
Copies the width x height pixels starting at top-left corner (x, y) to (destX, destY) in the bitmap d...
Definition: Bitmap.cpp:738
+
Bitmap::scroll
void scroll(int dx, int dy, Color fillColor=Black)
Scrolls the entire contents of the bitmap by dx and dy.
Definition: Bitmap.h:135
+
Bitmap
Represents a monochrome bitmap within main memory.
Definition: Bitmap.h:32
+
Bitmap::drawRect
void drawRect(int x1, int y1, int x2, int y2, Color borderColor=White, Color fillColor=NoFill)
Draws a rectangle from (x1, y1) to (x2, y2), with the outline in borderColor and the interior filled ...
Definition: Bitmap.cpp:286
+
Bitmap::setPixel
void setPixel(int x, int y, Color color)
Sets the pixel at (x, y) to color.
Definition: Bitmap.cpp:208
+
Bitmap::drawLine
void drawLine(int x1, int y1, int x2, int y2, Color color=White)
Draws a line from (x1, y1) to (x2, y2) in color.
Definition: Bitmap.cpp:225
+
Bitmap::drawBitmap
void drawBitmap(int x, int y, const Bitmap &bitmap, Color color=White)
Draws bitmap at (x, y) in color.
Definition: Bitmap.cpp:388
+
Bitmap::drawCircle
void drawCircle(int centerX, int centerY, int radius, Color borderColor=White, Color fillColor=NoFill)
Draws a circle with a specific center (centerX, centerY) and radius, with the outline in borderColor ...
Definition: Bitmap.cpp:334
+
Bitmap::drawChar
int drawChar(int x, int y, char ch)
Draws a single character ch at (x, y).
Definition: Bitmap.cpp:585
+
Bitmap::ProgMem
PGM_VOID_P ProgMem
Type that represents a bitmap within program memory.
Definition: Bitmap.h:41
+
Bitmap::Color
uint8_t Color
Type that represents the color of a pixel in a bitmap.
Definition: Bitmap.h:40
+
Bitmap::height
int height() const
Returns the height of the bitmap in pixels.
Definition: Bitmap.h:49
+
Bitmap::NoFill
static const Color NoFill
Special color value that is used with drawRect() and drawCircle() to indicate that the interior of th...
Definition: Bitmap.h:46
+
Bitmap::textWidth
int textWidth(const char *str, int len=-1) const
Returns the width in pixels of the len characters of str in the current font(), including inter-chara...
Definition: Bitmap.cpp:675
+
Bitmap::fill
void fill(int x, int y, int width, int height, Color color)
Fills the width x height pixels starting at top-left corner (x, y) with color.
Definition: Bitmap.cpp:762
+
Bitmap::data
uint8_t * data()
Returns a pointer to the start of the bitmap's data buffer.
Definition: Bitmap.h:53
+
Bitmap::textHeight
int textHeight() const
Returns the height in pixels of the current text drawing font(); or zero if font() is not set...
Definition: Bitmap.cpp:716
+
Bitmap::charWidth
int charWidth(char ch) const
Returns the width in pixels of ch in the current font().
Definition: Bitmap.cpp:650
+
Bitmap::Bitmap
Bitmap(int width, int height)
Constructs a new in-memory bitmap that is width x height pixels in size.
Definition: Bitmap.cpp:88
+
Bitmap::White
static const Color White
Color value corresponding to "white". If the bitmap is displayed on a LED array, then it may have a d...
Definition: Bitmap.h:45
+
Bitmap::stride
int stride() const
Returns the number of bytes in each line of the bitmap's data() buffer.
Definition: Bitmap.h:50
+
Bitmap::Black
static const Color Black
Color value corresponding to "black".
Definition: Bitmap.h:44
+
Bitmap::clear
void clear(Color color=Black)
Clears the entire bitmap to the specified color.
Definition: Bitmap.cpp:174
+
Bitmap::invert
void invert(int x, int y, int width, int height)
Inverts the width x height pixels starting at top-left corner (x, y).
Definition: Bitmap.cpp:902
+
Bitmap::drawText
void drawText(int x, int y, const char *str, int len=-1)
Draws the len characters of str at (x, y).
Definition: Bitmap.cpp:526
+
Bitmap::~Bitmap
~Bitmap()
Destroys this bitmap.
Definition: Bitmap.cpp:106
+
Bitmap::pixel
Color pixel(int x, int y) const
Returns the color of the pixel at (x, y); either Black or White.
Definition: Bitmap.cpp:191
diff --git a/Bitmap_8h_source.html b/Bitmap_8h_source.html index 96a50a86..9a7fd772 100644 --- a/Bitmap_8h_source.html +++ b/Bitmap_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: Bitmap.h Source File @@ -29,7 +30,7 @@ - + @@ -115,124 +116,164 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
26 #include <inttypes.h>
27 #include <avr/pgmspace.h>
28 
-
29 class DMD;
+
29 class DMD;
30 class String;
31 
-
32 class Bitmap
+
32 class Bitmap
33 {
34 public:
-
35  Bitmap(int width, int height);
-
36  ~Bitmap();
+
35  Bitmap(int width, int height);
+
36  ~Bitmap();
37 
-
38  bool isValid() const { return fb != 0; }
+
38  bool isValid() const { return fb != 0; }
39 
-
40  typedef uint8_t Color;
-
41  typedef PGM_VOID_P ProgMem;
-
42  typedef PGM_VOID_P Font;
+
40  typedef uint8_t Color;
+
41  typedef PGM_VOID_P ProgMem;
+
42  typedef PGM_VOID_P Font;
43 
-
44  static const Color Black = 0;
-
45  static const Color White = 1;
-
46  static const Color NoFill = 2;
+
44  static const Color Black = 0;
+
45  static const Color White = 1;
+
46  static const Color NoFill = 2;
47 
-
48  int width() const { return _width; }
-
49  int height() const { return _height; }
-
50  int stride() const { return _stride; }
-
51  int bitsPerPixel() const { return 1; }
+
48  int width() const { return _width; }
+
49  int height() const { return _height; }
+
50  int stride() const { return _stride; }
+
51  int bitsPerPixel() const { return 1; }
52 
-
53  uint8_t *data() { return fb; }
-
54  const uint8_t *data() const { return fb; }
+
53  uint8_t *data() { return fb; }
+
54  const uint8_t *data() const { return fb; }
55 
-
56  void clear(Color color = Black);
+
56  void clear(Color color = Black);
57 
-
58  Color pixel(int x, int y) const;
-
59  void setPixel(int x, int y, Color color);
+
58  Color pixel(int x, int y) const;
+
59  void setPixel(int x, int y, Color color);
60 
-
61  void drawLine(int x1, int y1, int x2, int y2, Color color = White);
-
62  void drawRect(int x1, int y1, int x2, int y2, Color borderColor = White, Color fillColor = NoFill);
-
63  void drawFilledRect(int x1, int y1, int x2, int y2, Color color = White);
-
64  void drawCircle(int centerX, int centerY, int radius, Color borderColor = White, Color fillColor = NoFill);
-
65  void drawFilledCircle(int centerX, int centerY, int radius, Color color = White);
+
61  void drawLine(int x1, int y1, int x2, int y2, Color color = White);
+
62  void drawRect(int x1, int y1, int x2, int y2, Color borderColor = White, Color fillColor = NoFill);
+
63  void drawFilledRect(int x1, int y1, int x2, int y2, Color color = White);
+
64  void drawCircle(int centerX, int centerY, int radius, Color borderColor = White, Color fillColor = NoFill);
+
65  void drawFilledCircle(int centerX, int centerY, int radius, Color color = White);
66 
-
67  void drawBitmap(int x, int y, const Bitmap &bitmap, Color color = White);
-
68  void drawBitmap(int x, int y, Bitmap::ProgMem bitmap, Color color = White);
-
69  void drawInvertedBitmap(int x, int y, const Bitmap &bitmap);
-
70  void drawInvertedBitmap(int x, int y, Bitmap::ProgMem bitmap);
+
67  void drawBitmap(int x, int y, const Bitmap &bitmap, Color color = White);
+
68  void drawBitmap(int x, int y, Bitmap::ProgMem bitmap, Color color = White);
+
69  void drawInvertedBitmap(int x, int y, const Bitmap &bitmap);
+
70  void drawInvertedBitmap(int x, int y, Bitmap::ProgMem bitmap);
71 
-
72  Font font() const { return _font; }
-
73  void setFont(Font font) { _font = font; }
+
72  Font font() const { return _font; }
+
73  void setFont(Font font) { _font = font; }
74 
-
75  Color textColor() const { return _textColor; }
-
76  void setTextColor(Color color) { _textColor = color; }
+
75  Color textColor() const { return _textColor; }
+
76  void setTextColor(Color color) { _textColor = color; }
77 
-
78  void drawText(int x, int y, const char *str, int len = -1);
-
79  void drawText(int x, int y, const String &str, int start = 0, int len = -1);
+
78  void drawText(int x, int y, const char *str, int len = -1);
+
79  void drawText(int x, int y, const String &str, int start = 0, int len = -1);
80 
-
81  int drawChar(int x, int y, char ch);
+
81  int drawChar(int x, int y, char ch);
82 
-
83  int charWidth(char ch) const;
-
84  int textWidth(const char *str, int len = -1) const;
-
85  int textWidth(const String &str, int start = 0, int len = -1) const;
-
86  int textHeight() const;
+
83  int charWidth(char ch) const;
+
84  int textWidth(const char *str, int len = -1) const;
+
85  int textWidth(const String &str, int start = 0, int len = -1) const;
+
86  int textHeight() const;
87 
-
88  void copy(int x, int y, int width, int height, Bitmap *dest, int destX, int destY);
-
89  void fill(int x, int y, int width, int height, Color color);
-
90  void fill(int x, int y, int width, int height, Bitmap::ProgMem pattern, Color color = White);
+
88  void copy(int x, int y, int width, int height, Bitmap *dest, int destX, int destY);
+
89  void fill(int x, int y, int width, int height, Color color);
+
90  void fill(int x, int y, int width, int height, Bitmap::ProgMem pattern, Color color = White);
91 
-
92  void scroll(int dx, int dy, Color fillColor = Black);
-
93  void scroll(int x, int y, int width, int height, int dx, int dy, Color fillColor = Black);
+
92  void scroll(int dx, int dy, Color fillColor = Black);
+
93  void scroll(int x, int y, int width, int height, int dx, int dy, Color fillColor = Black);
94 
-
95  void invert(int x, int y, int width, int height);
+
95  void invert(int x, int y, int width, int height);
96 
97 private:
98  // Disable copy constructor and operator=().
-
99  Bitmap(const Bitmap &) {}
-
100  Bitmap &operator=(const Bitmap &) { return *this; }
+
99  Bitmap(const Bitmap &) {}
+
100  Bitmap &operator=(const Bitmap &) { return *this; }
101 
102  int _width;
103  int _height;
104  int _stride;
105  uint8_t *fb;
-
106  Font _font;
-
107  Color _textColor;
+
106  Font _font;
+
107  Color _textColor;
108 
-
109  friend class DMD;
+
109  friend class DMD;
110 
111  void blit(int x1, int y1, int x2, int y2, int x3, int y3);
-
112  void drawCirclePoints(int centerX, int centerY, int radius, int x, int y, Color borderColor, Color fillColor);
+
112  void drawCirclePoints(int centerX, int centerY, int radius, int x, int y, Color borderColor, Color fillColor);
113 };
114 
-
115 inline void Bitmap::drawFilledRect(int x1, int y1, int x2, int y2, Color color)
+
115 inline void Bitmap::drawFilledRect(int x1, int y1, int x2, int y2, Color color)
116 {
-
117  drawRect(x1, y1, x2, y2, color, color);
+
117  drawRect(x1, y1, x2, y2, color, color);
118 }
119 
-
120 inline void Bitmap::drawFilledCircle(int centerX, int centerY, int radius, Color color)
+
120 inline void Bitmap::drawFilledCircle(int centerX, int centerY, int radius, Color color)
121 {
-
122  drawCircle(centerX, centerY, radius, color, color);
+
122  drawCircle(centerX, centerY, radius, color, color);
123 }
124 
-
125 inline void Bitmap::drawInvertedBitmap(int x, int y, const Bitmap &bitmap)
+
125 inline void Bitmap::drawInvertedBitmap(int x, int y, const Bitmap &bitmap)
126 {
-
127  drawBitmap(x, y, bitmap, Black);
+
127  drawBitmap(x, y, bitmap, Black);
128 }
129 
-
130 inline void Bitmap::drawInvertedBitmap(int x, int y, Bitmap::ProgMem bitmap)
+
130 inline void Bitmap::drawInvertedBitmap(int x, int y, Bitmap::ProgMem bitmap)
131 {
-
132  drawBitmap(x, y, bitmap, Black);
+
132  drawBitmap(x, y, bitmap, Black);
133 }
134 
-
135 inline void Bitmap::scroll(int dx, int dy, Color fillColor)
+
135 inline void Bitmap::scroll(int dx, int dy, Color fillColor)
136 {
-
137  scroll(0, 0, _width, _height, dx, dy, fillColor);
+
137  scroll(0, 0, _width, _height, dx, dy, fillColor);
138 }
139 
140 #endif
+
DMD
Handle large dot matrix displays composed of LED's.
Definition: DMD.h:28
+
Bitmap::width
int width() const
Returns the width of the bitmap in pixels.
Definition: Bitmap.h:48
+
Bitmap::copy
void copy(int x, int y, int width, int height, Bitmap *dest, int destX, int destY)
Copies the width x height pixels starting at top-left corner (x, y) to (destX, destY) in the bitmap d...
Definition: Bitmap.cpp:738
+
Bitmap::scroll
void scroll(int dx, int dy, Color fillColor=Black)
Scrolls the entire contents of the bitmap by dx and dy.
Definition: Bitmap.h:135
+
Bitmap
Represents a monochrome bitmap within main memory.
Definition: Bitmap.h:32
+
Bitmap::drawRect
void drawRect(int x1, int y1, int x2, int y2, Color borderColor=White, Color fillColor=NoFill)
Draws a rectangle from (x1, y1) to (x2, y2), with the outline in borderColor and the interior filled ...
Definition: Bitmap.cpp:286
+
Bitmap::setPixel
void setPixel(int x, int y, Color color)
Sets the pixel at (x, y) to color.
Definition: Bitmap.cpp:208
+
Bitmap::drawFilledCircle
void drawFilledCircle(int centerX, int centerY, int radius, Color color=White)
Draws a filled circle with a specific center (centerX, centerY) and radius in color.
Definition: Bitmap.h:120
+
Bitmap::drawLine
void drawLine(int x1, int y1, int x2, int y2, Color color=White)
Draws a line from (x1, y1) to (x2, y2) in color.
Definition: Bitmap.cpp:225
+
Bitmap::drawBitmap
void drawBitmap(int x, int y, const Bitmap &bitmap, Color color=White)
Draws bitmap at (x, y) in color.
Definition: Bitmap.cpp:388
+
Bitmap::drawFilledRect
void drawFilledRect(int x1, int y1, int x2, int y2, Color color=White)
Draws a filled rectangle from (x1, y1) to (x2, y2) in color.
Definition: Bitmap.h:115
+
Bitmap::drawInvertedBitmap
void drawInvertedBitmap(int x, int y, const Bitmap &bitmap)
Draws bitmap at (x, y) in inverted colors.
Definition: Bitmap.h:125
+
Bitmap::bitsPerPixel
int bitsPerPixel() const
Returns the number of bits per pixel for the bitmap; always 1.
Definition: Bitmap.h:51
+
Bitmap::drawCircle
void drawCircle(int centerX, int centerY, int radius, Color borderColor=White, Color fillColor=NoFill)
Draws a circle with a specific center (centerX, centerY) and radius, with the outline in borderColor ...
Definition: Bitmap.cpp:334
+
Bitmap::setTextColor
void setTextColor(Color color)
Sets the color that will be used for drawing text with drawText() and drawChar(). ...
Definition: Bitmap.h:76
+
Bitmap::drawChar
int drawChar(int x, int y, char ch)
Draws a single character ch at (x, y).
Definition: Bitmap.cpp:585
+
Bitmap::ProgMem
PGM_VOID_P ProgMem
Type that represents a bitmap within program memory.
Definition: Bitmap.h:41
+
Bitmap::Color
uint8_t Color
Type that represents the color of a pixel in a bitmap.
Definition: Bitmap.h:40
+
Bitmap::textColor
Color textColor() const
Returns the color that will be used for drawing text with drawText() and drawChar(). The default is White.
Definition: Bitmap.h:75
+
Bitmap::height
int height() const
Returns the height of the bitmap in pixels.
Definition: Bitmap.h:49
+
Bitmap::NoFill
static const Color NoFill
Special color value that is used with drawRect() and drawCircle() to indicate that the interior of th...
Definition: Bitmap.h:46
+
Bitmap::textWidth
int textWidth(const char *str, int len=-1) const
Returns the width in pixels of the len characters of str in the current font(), including inter-chara...
Definition: Bitmap.cpp:675
+
Bitmap::fill
void fill(int x, int y, int width, int height, Color color)
Fills the width x height pixels starting at top-left corner (x, y) with color.
Definition: Bitmap.cpp:762
+
Bitmap::data
const uint8_t * data() const
Returns a constant pointer to the start of the bitmap's data buffer. This is an overloaded member fun...
Definition: Bitmap.h:54
+
Bitmap::data
uint8_t * data()
Returns a pointer to the start of the bitmap's data buffer.
Definition: Bitmap.h:53
+
Bitmap::textHeight
int textHeight() const
Returns the height in pixels of the current text drawing font(); or zero if font() is not set...
Definition: Bitmap.cpp:716
+
Bitmap::charWidth
int charWidth(char ch) const
Returns the width in pixels of ch in the current font().
Definition: Bitmap.cpp:650
+
Bitmap::Bitmap
Bitmap(int width, int height)
Constructs a new in-memory bitmap that is width x height pixels in size.
Definition: Bitmap.cpp:88
+
Bitmap::isValid
bool isValid() const
Returns true if the memory for this bitmap is valid; false otherwise.
Definition: Bitmap.h:38
+
Bitmap::White
static const Color White
Color value corresponding to "white". If the bitmap is displayed on a LED array, then it may have a d...
Definition: Bitmap.h:45
+
Bitmap::font
Font font() const
Returns the currently selected font, or null if none selected.
Definition: Bitmap.h:72
+
Bitmap::stride
int stride() const
Returns the number of bytes in each line of the bitmap's data() buffer.
Definition: Bitmap.h:50
+
Bitmap::Black
static const Color Black
Color value corresponding to "black".
Definition: Bitmap.h:44
+
Bitmap::clear
void clear(Color color=Black)
Clears the entire bitmap to the specified color.
Definition: Bitmap.cpp:174
+
Bitmap::Font
PGM_VOID_P Font
Type that represents a font within program memory.
Definition: Bitmap.h:42
+
Bitmap::setFont
void setFont(Font font)
Sets the font for use with drawText() and drawChar().
Definition: Bitmap.h:73
+
Bitmap::invert
void invert(int x, int y, int width, int height)
Inverts the width x height pixels starting at top-left corner (x, y).
Definition: Bitmap.cpp:902
+
Bitmap::drawText
void drawText(int x, int y, const char *str, int len=-1)
Draws the len characters of str at (x, y).
Definition: Bitmap.cpp:526
+
Bitmap::~Bitmap
~Bitmap()
Destroys this bitmap.
Definition: Bitmap.cpp:106
+
Bitmap::pixel
Color pixel(int x, int y) const
Returns the color of the pixel at (x, y); either Black or White.
Definition: Bitmap.cpp:191
diff --git a/BlinkLED_8cpp_source.html b/BlinkLED_8cpp_source.html index bd6ae2d7..5b5fcc3b 100644 --- a/BlinkLED_8cpp_source.html +++ b/BlinkLED_8cpp_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: BlinkLED.cpp Source File @@ -29,7 +30,7 @@ - + @@ -116,7 +117,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
27 #include <WProgram.h>
28 #endif
29 
-
64 BlinkLED::BlinkLED(uint8_t pin, unsigned long onTime, unsigned long offTime, bool initialState)
+
64 BlinkLED::BlinkLED(uint8_t pin, unsigned long onTime, unsigned long offTime, bool initialState)
65  : _pin(pin)
66  , _state(initialState)
67  , _paused(false)
@@ -128,7 +129,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
73  _lastChange = millis();
74 }
75 
-
79 void BlinkLED::loop()
+
79 void BlinkLED::loop()
80 {
81  if (_paused)
82  return;
@@ -148,22 +149,22 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
96  }
97 }
98 
-
122 void BlinkLED::setBlinkRate(unsigned long onTime, unsigned long offTime)
+
122 void BlinkLED::setBlinkRate(unsigned long onTime, unsigned long offTime)
123 {
-
124  _onTime = onTime;
-
125  _offTime = offTime;
+
124  _onTime = onTime;
+
125  _offTime = offTime;
126 }
127 
-
145 void BlinkLED::setState(bool state)
+
145 void BlinkLED::setState(bool state)
146 {
147  if (_state != state) {
148  digitalWrite(_pin, state ? HIGH : LOW);
-
149  _state = state;
+
149  _state = state;
150  _lastChange = millis();
151  }
152 }
153 
-
170 void BlinkLED::resume()
+
170 void BlinkLED::resume()
171 {
172  if (_paused) {
173  _paused = false;
@@ -184,12 +185,20 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
188  }
189 }
190 
+
BlinkLED::resume
void resume()
Resumes the LED blink cycle after a pause().
Definition: BlinkLED.cpp:170
+
BlinkLED::loop
void loop()
Definition: BlinkLED.cpp:79
+
BlinkLED::offTime
unsigned long offTime() const
Returns the number of milliseconds the LED will be off.
Definition: BlinkLED.h:36
+
BlinkLED::setState
void setState(bool state)
Sets the current state of the LED, where true is on, false is off.
Definition: BlinkLED.cpp:145
+
BlinkLED::setBlinkRate
void setBlinkRate(unsigned long onTime, unsigned long offTime)
Sets the onTime and offTime (in milliseconds).
Definition: BlinkLED.cpp:122
+
BlinkLED::state
bool state() const
Returns the current state of the LED; true is on, false is off.
Definition: BlinkLED.h:39
+
BlinkLED::onTime
unsigned long onTime() const
Returns the number of milliseconds the LED will be on.
Definition: BlinkLED.h:35
+
BlinkLED::BlinkLED
BlinkLED(uint8_t pin, unsigned long onTime, unsigned long offTime, bool initialState=false)
Initialize a blinking LED on the specified pin.
Definition: BlinkLED.cpp:64
diff --git a/BlinkLED_8h_source.html b/BlinkLED_8h_source.html index 4c750cd9..96c04182 100644 --- a/BlinkLED_8h_source.html +++ b/BlinkLED_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: BlinkLED.h Source File @@ -29,7 +30,7 @@ - + @@ -114,23 +115,23 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
25 
26 #include <inttypes.h>
27 
-
28 class BlinkLED
+
28 class BlinkLED
29 {
30 public:
-
31  BlinkLED(uint8_t pin, unsigned long onTime, unsigned long offTime, bool initialState = false);
+
31  BlinkLED(uint8_t pin, unsigned long onTime, unsigned long offTime, bool initialState = false);
32 
33  void loop();
34 
-
35  unsigned long onTime() const { return _onTime; }
-
36  unsigned long offTime() const { return _offTime; }
-
37  void setBlinkRate(unsigned long onTime, unsigned long offTime);
+
35  unsigned long onTime() const { return _onTime; }
+
36  unsigned long offTime() const { return _offTime; }
+
37  void setBlinkRate(unsigned long onTime, unsigned long offTime);
38 
-
39  bool state() const { return _state; }
-
40  void setState(bool state);
+
39  bool state() const { return _state; }
+
40  void setState(bool state);
41 
-
42  void pause() { _paused = true; }
-
43  void resume();
-
44  bool isPaused() const { return _paused; }
+
42  void pause() { _paused = true; }
+
43  void resume();
+
44  bool isPaused() const { return _paused; }
45 
46 private:
47  uint8_t _pin;
@@ -142,12 +143,23 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
53 };
54 
55 #endif
+
BlinkLED::resume
void resume()
Resumes the LED blink cycle after a pause().
Definition: BlinkLED.cpp:170
+
BlinkLED::loop
void loop()
Definition: BlinkLED.cpp:79
+
BlinkLED::offTime
unsigned long offTime() const
Returns the number of milliseconds the LED will be off.
Definition: BlinkLED.h:36
+
BlinkLED::pause
void pause()
Pauses the LED blink cycle in its current state().
Definition: BlinkLED.h:42
+
BlinkLED::setState
void setState(bool state)
Sets the current state of the LED, where true is on, false is off.
Definition: BlinkLED.cpp:145
+
BlinkLED::setBlinkRate
void setBlinkRate(unsigned long onTime, unsigned long offTime)
Sets the onTime and offTime (in milliseconds).
Definition: BlinkLED.cpp:122
+
BlinkLED
Blink a LED on a digital output pin.
Definition: BlinkLED.h:28
+
BlinkLED::state
bool state() const
Returns the current state of the LED; true is on, false is off.
Definition: BlinkLED.h:39
+
BlinkLED::onTime
unsigned long onTime() const
Returns the number of milliseconds the LED will be on.
Definition: BlinkLED.h:35
+
BlinkLED::BlinkLED
BlinkLED(uint8_t pin, unsigned long onTime, unsigned long offTime, bool initialState=false)
Initialize a blinking LED on the specified pin.
Definition: BlinkLED.cpp:64
+
BlinkLED::isPaused
bool isPaused() const
Returns true if the LED blink cycle is paused; false otherwise.
Definition: BlinkLED.h:44
diff --git a/BlockCipher_8cpp_source.html b/BlockCipher_8cpp_source.html new file mode 100644 index 00000000..e317971f --- /dev/null +++ b/BlockCipher_8cpp_source.html @@ -0,0 +1,133 @@ + + + + + + +ArduinoLibs: BlockCipher.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
BlockCipher.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #include "BlockCipher.h"
+
24 
+ +
41 {
+
42 }
+
43 
+ +
53 {
+
54 }
+
55 
+
BlockCipher()
Constructs a block cipher.
Definition: BlockCipher.cpp:40
+
virtual ~BlockCipher()
Destroys this block cipher object.
Definition: BlockCipher.cpp:52
+
+ + + + diff --git a/BlockCipher_8h_source.html b/BlockCipher_8h_source.html new file mode 100644 index 00000000..44e4bff3 --- /dev/null +++ b/BlockCipher_8h_source.html @@ -0,0 +1,154 @@ + + + + + + +ArduinoLibs: BlockCipher.h Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
BlockCipher.h
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #ifndef CRYPTO_BLOCKCIPHER_h
+
24 #define CRYPTO_BLOCKCIPHER_h
+
25 
+
26 #include <inttypes.h>
+
27 #include <stddef.h>
+
28 
+ +
30 {
+
31 public:
+
32  BlockCipher();
+
33  virtual ~BlockCipher();
+
34 
+
35  virtual size_t blockSize() const = 0;
+
36  virtual size_t keySize() const = 0;
+
37 
+
38  virtual bool setKey(const uint8_t *key, size_t len) = 0;
+
39 
+
40  virtual void encryptBlock(uint8_t *output, const uint8_t *input) = 0;
+
41  virtual void decryptBlock(uint8_t *output, const uint8_t *input) = 0;
+
42 
+
43  virtual void clear() = 0;
+
44 };
+
45 
+
46 #endif
+
Abstract base class for block ciphers.
Definition: BlockCipher.h:29
+
BlockCipher()
Constructs a block cipher.
Definition: BlockCipher.cpp:40
+
virtual ~BlockCipher()
Destroys this block cipher object.
Definition: BlockCipher.cpp:52
+
virtual void decryptBlock(uint8_t *output, const uint8_t *input)=0
Decrypts a single block using this cipher.
+
virtual void encryptBlock(uint8_t *output, const uint8_t *input)=0
Encrypts a single block using this cipher.
+
virtual bool setKey(const uint8_t *key, size_t len)=0
Sets the key to use for future encryption and decryption operations.
+
virtual void clear()=0
Clears all security-sensitive state from this block cipher.
+
virtual size_t blockSize() const =0
Size of a single block processed by this cipher, in bytes.
+
virtual size_t keySize() const =0
Default size of the key for this block cipher, in bytes.
+
+ + + + diff --git a/BoolField_8cpp_source.html b/BoolField_8cpp_source.html index f6266459..3dd85036 100644 --- a/BoolField_8cpp_source.html +++ b/BoolField_8cpp_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: BoolField.cpp Source File @@ -29,7 +30,7 @@ - + @@ -111,15 +112,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
22 
23 #include "BoolField.h"
24 
-
77 BoolField::BoolField(const String &label)
-
78  : Field(label)
+
77 BoolField::BoolField(const String &label)
+
78  : Field(label)
79  , _printLen(0)
80  , _value(false)
81 {
82 }
83 
-
94 BoolField::BoolField(Form &form, const String &label, const String &trueLabel, const String &falseLabel, bool value)
-
95  : Field(form, label)
+
94 BoolField::BoolField(Form &form, const String &label, const String &trueLabel, const String &falseLabel, bool value)
+
95  : Field(form, label)
96  , _trueLabel(trueLabel)
97  , _falseLabel(falseLabel)
98  , _printLen(0)
@@ -127,69 +128,83 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
100 {
101 }
102 
-
103 int BoolField::dispatch(int event)
+
103 int BoolField::dispatch(int event)
104 {
105  if (event == LCD_BUTTON_UP || event == LCD_BUTTON_DOWN) {
-
106  setValue(!_value);
+
106  setValue(!_value);
107  return FORM_CHANGED;
108  } else {
109  return -1;
110  }
111 }
112 
-
113 void BoolField::enterField(bool reverse)
+
113 void BoolField::enterField(bool reverse)
114 {
-
115  Field::enterField(reverse);
+
115  Field::enterField(reverse);
116  printValue();
117 }
118 
-
131 void BoolField::setValue(bool value)
+
131 void BoolField::setValue(bool value)
132 {
133  if (value != _value) {
-
134  _value = value;
-
135  if (isCurrent())
+
134  _value = value;
+
135  if (isCurrent())
136  printValue();
137  }
138 }
139 
-
153 void BoolField::setTrueLabel(const String &trueLabel)
+
153 void BoolField::setTrueLabel(const String &trueLabel)
154 {
-
155  _trueLabel = trueLabel;
-
156  if (isCurrent())
+
155  _trueLabel = trueLabel;
+
156  if (isCurrent())
157  printValue();
158 }
159 
-
173 void BoolField::setFalseLabel(const String &falseLabel)
+
173 void BoolField::setFalseLabel(const String &falseLabel)
174 {
-
175  _falseLabel = falseLabel;
-
176  if (isCurrent())
+
175  _falseLabel = falseLabel;
+
176  if (isCurrent())
177  printValue();
178 }
179 
180 void BoolField::printValue()
181 {
182  unsigned int len;
-
183  lcd()->setCursor(0, 1);
+
183  lcd()->setCursor(0, 1);
184  if (_value) {
-
185  lcd()->print(_trueLabel);
+
185  lcd()->print(_trueLabel);
186  len = _trueLabel.length();
187  while (len++ < _printLen)
-
188  lcd()->write(' ');
+
188  lcd()->write(' ');
189  _printLen = _trueLabel.length();
190  } else {
-
191  lcd()->print(_falseLabel);
+
191  lcd()->print(_falseLabel);
192  len = _falseLabel.length();
193  while (len++ < _printLen)
-
194  lcd()->write(' ');
+
194  lcd()->write(' ');
195  _printLen = _falseLabel.length();
196  }
197 }
+
BoolField::BoolField
BoolField(const String &label)
Constructs a new boolean field with a specific label.
Definition: BoolField.cpp:77
+
BoolField::setValue
void setValue(bool value)
Sets the current value of this field to value.
Definition: BoolField.cpp:131
+
BoolField::trueLabel
const String & trueLabel() const
Returns the string that is displayed when value() is true.
Definition: BoolField.h:40
+
Field
Manages a single data input/output field within a Form.
Definition: Field.h:28
+
Form
Manager for a form containing data input/output fields.
Definition: Form.h:32
+
Field::enterField
virtual void enterField(bool reverse)
Enters the field due to form navigation.
Definition: Field.cpp:116
+
BoolField::setTrueLabel
void setTrueLabel(const String &trueLabel)
Sets the string that is displayed when value() is true to trueLabel.
Definition: BoolField.cpp:153
+
Field::lcd
LiquidCrystal * lcd() const
Returns the LCD that this field is being drawn on.
Definition: Field.h:47
+
BoolField::setFalseLabel
void setFalseLabel(const String &falseLabel)
Sets the string that is displayed when value() is false to falseLabel.
Definition: BoolField.cpp:173
+
BoolField::dispatch
int dispatch(int event)
Dispatches event via this field.
Definition: BoolField.cpp:103
+
BoolField::enterField
void enterField(bool reverse)
Enters the field due to form navigation.
Definition: BoolField.cpp:113
+
BoolField::falseLabel
const String & falseLabel() const
Returns the string that is displayed when value() is false.
Definition: BoolField.h:43
+
BoolField::value
bool value() const
Returns the current value of this field, true or false.
Definition: BoolField.h:37
+
Field::isCurrent
bool isCurrent() const
Returns true if this field is the currently-displayed field in its owning form; false otherwise...
Definition: Field.cpp:169
diff --git a/BoolField_8h_source.html b/BoolField_8h_source.html index 81e3c46e..0058c5ee 100644 --- a/BoolField_8h_source.html +++ b/BoolField_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: BoolField.h Source File @@ -29,7 +30,7 @@ - + @@ -114,23 +115,23 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
25 
26 #include "Field.h"
27 
-
28 class BoolField : public Field {
+
28 class BoolField : public Field {
29 public:
-
30  explicit BoolField(const String &label);
-
31  BoolField(Form &form, const String &label, const String &trueLabel, const String &falseLabel, bool value);
+
30  explicit BoolField(const String &label);
+
31  BoolField(Form &form, const String &label, const String &trueLabel, const String &falseLabel, bool value);
32 
-
33  int dispatch(int event);
+
33  int dispatch(int event);
34 
-
35  void enterField(bool reverse);
+
35  void enterField(bool reverse);
36 
-
37  bool value() const { return _value; }
-
38  void setValue(bool value);
+
37  bool value() const { return _value; }
+
38  void setValue(bool value);
39 
-
40  const String &trueLabel() const { return _trueLabel; }
-
41  void setTrueLabel(const String &trueLabel);
+
40  const String &trueLabel() const { return _trueLabel; }
+
41  void setTrueLabel(const String &trueLabel);
42 
-
43  const String &falseLabel() const { return _falseLabel; }
-
44  void setFalseLabel(const String &falseLabel);
+
43  const String &falseLabel() const { return _falseLabel; }
+
44  void setFalseLabel(const String &falseLabel);
45 
46 private:
47  String _trueLabel;
@@ -142,12 +143,26 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
53 };
54 
55 #endif
+
BoolField::BoolField
BoolField(const String &label)
Constructs a new boolean field with a specific label.
Definition: BoolField.cpp:77
+
BoolField::setValue
void setValue(bool value)
Sets the current value of this field to value.
Definition: BoolField.cpp:131
+
BoolField::trueLabel
const String & trueLabel() const
Returns the string that is displayed when value() is true.
Definition: BoolField.h:40
+
Field
Manages a single data input/output field within a Form.
Definition: Field.h:28
+
Form
Manager for a form containing data input/output fields.
Definition: Form.h:32
+
Field::form
Form * form() const
Returns the Form that owns this field; null if not associated with a Form.
Definition: Field.h:34
+
BoolField::setTrueLabel
void setTrueLabel(const String &trueLabel)
Sets the string that is displayed when value() is true to trueLabel.
Definition: BoolField.cpp:153
+
Field::label
const String & label() const
Returns the label to display in the first line of this field.
Definition: Field.h:41
+
BoolField::setFalseLabel
void setFalseLabel(const String &falseLabel)
Sets the string that is displayed when value() is false to falseLabel.
Definition: BoolField.cpp:173
+
BoolField::dispatch
int dispatch(int event)
Dispatches event via this field.
Definition: BoolField.cpp:103
+
BoolField::enterField
void enterField(bool reverse)
Enters the field due to form navigation.
Definition: BoolField.cpp:113
+
BoolField::falseLabel
const String & falseLabel() const
Returns the string that is displayed when value() is false.
Definition: BoolField.h:43
+
BoolField::value
bool value() const
Returns the current value of this field, true or false.
Definition: BoolField.h:37
+
BoolField
Field that manages the input of a boolean value.
Definition: BoolField.h:28
diff --git a/CBC_8cpp_source.html b/CBC_8cpp_source.html new file mode 100644 index 00000000..252cb691 --- /dev/null +++ b/CBC_8cpp_source.html @@ -0,0 +1,216 @@ + + + + + + +ArduinoLibs: CBC.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
CBC.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #include "CBC.h"
+
24 #include "Crypto.h"
+
25 #include <string.h>
+
26 
+ +
43  : blockCipher(0)
+
44  , posn(16)
+
45 {
+
46 }
+
47 
+ +
52 {
+
53  clean(iv);
+
54  clean(temp);
+
55 }
+
56 
+
57 size_t CBCCommon::keySize() const
+
58 {
+
59  return blockCipher->keySize();
+
60 }
+
61 
+
62 size_t CBCCommon::ivSize() const
+
63 {
+
64  return 16;
+
65 }
+
66 
+
67 bool CBCCommon::setKey(const uint8_t *key, size_t len)
+
68 {
+
69  // Verify the cipher's block size, just in case.
+
70  if (blockCipher->blockSize() != 16)
+
71  return false;
+
72 
+
73  // Set the key on the underlying block cipher.
+
74  return blockCipher->setKey(key, len);
+
75 }
+
76 
+
77 bool CBCCommon::setIV(const uint8_t *iv, size_t len)
+
78 {
+
79  if (len != 16)
+
80  return false;
+
81  memcpy(this->iv, iv, 16);
+
82  posn = 16;
+
83  return true;
+
84 }
+
85 
+
86 void CBCCommon::encrypt(uint8_t *output, const uint8_t *input, size_t len)
+
87 {
+
88  uint8_t posn;
+
89  while (len >= 16) {
+
90  for (posn = 0; posn < 16; ++posn)
+
91  iv[posn] ^= *input++;
+
92  blockCipher->encryptBlock(iv, iv);
+
93  for (posn = 0; posn < 16; ++posn)
+
94  *output++ = iv[posn];
+
95  len -= 16;
+
96  }
+
97 }
+
98 
+
99 void CBCCommon::decrypt(uint8_t *output, const uint8_t *input, size_t len)
+
100 {
+
101  uint8_t posn;
+
102  while (len >= 16) {
+
103  blockCipher->decryptBlock(temp, input);
+
104  for (posn = 0; posn < 16; ++posn) {
+
105  uint8_t in = *input++;
+
106  *output++ = temp[posn] ^ iv[posn];
+
107  iv[posn] = in;
+
108  }
+
109  len -= 16;
+
110  }
+
111 }
+
112 
+ +
114 {
+
115  blockCipher->clear();
+
116  clean(iv);
+
117  clean(temp);
+
118  posn = 16;
+
119 }
+
120 
+
void encrypt(uint8_t *output, const uint8_t *input, size_t len)
Encrypts an input buffer and writes the ciphertext to an output buffer.
Definition: CBC.cpp:86
+
CBCCommon()
Constructs a new cipher in CBC mode.
Definition: CBC.cpp:42
+
bool setKey(const uint8_t *key, size_t len)
Sets the key to use for future encryption and decryption operations.
Definition: CBC.cpp:67
+
size_t keySize() const
Default size of the key for this cipher, in bytes.
Definition: CBC.cpp:57
+
void clear()
Clears all security-sensitive state from this cipher.
Definition: CBC.cpp:113
+
virtual void decryptBlock(uint8_t *output, const uint8_t *input)=0
Decrypts a single block using this cipher.
+
virtual void encryptBlock(uint8_t *output, const uint8_t *input)=0
Encrypts a single block using this cipher.
+
void decrypt(uint8_t *output, const uint8_t *input, size_t len)
Decrypts an input buffer and writes the plaintext to an output buffer.
Definition: CBC.cpp:99
+
bool setIV(const uint8_t *iv, size_t len)
Sets the initialization vector to use for future encryption and decryption operations.
Definition: CBC.cpp:77
+
virtual ~CBCCommon()
Destroys this cipher object after clearing sensitive information.
Definition: CBC.cpp:51
+
virtual bool setKey(const uint8_t *key, size_t len)=0
Sets the key to use for future encryption and decryption operations.
+
size_t ivSize() const
Size of the initialization vector for this cipher, in bytes.
Definition: CBC.cpp:62
+
virtual void clear()=0
Clears all security-sensitive state from this block cipher.
+
virtual size_t blockSize() const =0
Size of a single block processed by this cipher, in bytes.
+
virtual size_t keySize() const =0
Default size of the key for this block cipher, in bytes.
+
+ + + + diff --git a/CBC_8h_source.html b/CBC_8h_source.html new file mode 100644 index 00000000..e30418ee --- /dev/null +++ b/CBC_8h_source.html @@ -0,0 +1,180 @@ + + + + + + +ArduinoLibs: CBC.h Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
CBC.h
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #ifndef CRYPTO_CBC_h
+
24 #define CRYPTO_CBC_h
+
25 
+
26 #include "Cipher.h"
+
27 #include "BlockCipher.h"
+
28 
+
29 class CBCCommon : public Cipher
+
30 {
+
31 public:
+
32  virtual ~CBCCommon();
+
33 
+
34  size_t keySize() const;
+
35  size_t ivSize() const;
+
36 
+
37  bool setKey(const uint8_t *key, size_t len);
+
38  bool setIV(const uint8_t *iv, size_t len);
+
39 
+
40  void encrypt(uint8_t *output, const uint8_t *input, size_t len);
+
41  void decrypt(uint8_t *output, const uint8_t *input, size_t len);
+
42 
+
43  void clear();
+
44 
+
45 protected:
+
46  CBCCommon();
+
47  void setBlockCipher(BlockCipher *cipher) { blockCipher = cipher; }
+
48 
+
49 private:
+
50  BlockCipher *blockCipher;
+
51  uint8_t iv[16];
+
52  uint8_t temp[16];
+
53  uint8_t posn;
+
54 };
+
55 
+
56 template <typename T>
+
57 class CBC : public CBCCommon
+
58 {
+
59 public:
+
60  CBC() { setBlockCipher(&cipher); }
+
61 
+
62 private:
+
63  T cipher;
+
64 };
+
65 
+
66 #endif
+
Abstract base class for stream ciphers.
Definition: Cipher.h:29
+
void encrypt(uint8_t *output, const uint8_t *input, size_t len)
Encrypts an input buffer and writes the ciphertext to an output buffer.
Definition: CBC.cpp:86
+
Abstract base class for block ciphers.
Definition: BlockCipher.h:29
+
CBCCommon()
Constructs a new cipher in CBC mode.
Definition: CBC.cpp:42
+
bool setKey(const uint8_t *key, size_t len)
Sets the key to use for future encryption and decryption operations.
Definition: CBC.cpp:67
+
size_t keySize() const
Default size of the key for this cipher, in bytes.
Definition: CBC.cpp:57
+
void clear()
Clears all security-sensitive state from this cipher.
Definition: CBC.cpp:113
+
void decrypt(uint8_t *output, const uint8_t *input, size_t len)
Decrypts an input buffer and writes the plaintext to an output buffer.
Definition: CBC.cpp:99
+
bool setIV(const uint8_t *iv, size_t len)
Sets the initialization vector to use for future encryption and decryption operations.
Definition: CBC.cpp:77
+
virtual ~CBCCommon()
Destroys this cipher object after clearing sensitive information.
Definition: CBC.cpp:51
+
size_t ivSize() const
Size of the initialization vector for this cipher, in bytes.
Definition: CBC.cpp:62
+
Implementation of the Cipher Block Chaining (CBC) mode for 128-bit block ciphers. ...
Definition: CBC.h:57
+
void setBlockCipher(BlockCipher *cipher)
Sets the block cipher to use for this CBC object.
Definition: CBC.h:47
+
CBC()
Constructs a new CBC object for the block cipher T.
Definition: CBC.h:60
+
Concrete base class to assist with implementing CBC for 128-bit block ciphers.
Definition: CBC.h:29
+
+ + + + diff --git a/CFB_8cpp_source.html b/CFB_8cpp_source.html new file mode 100644 index 00000000..e87f5b46 --- /dev/null +++ b/CFB_8cpp_source.html @@ -0,0 +1,241 @@ + + + + + + +ArduinoLibs: CFB.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
CFB.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #include "CFB.h"
+
24 #include "Crypto.h"
+
25 #include <string.h>
+
26 
+ +
43  : blockCipher(0)
+
44  , posn(16)
+
45 {
+
46 }
+
47 
+ +
52 {
+
53  clean(iv);
+
54 }
+
55 
+
56 size_t CFBCommon::keySize() const
+
57 {
+
58  return blockCipher->keySize();
+
59 }
+
60 
+
61 size_t CFBCommon::ivSize() const
+
62 {
+
63  return 16;
+
64 }
+
65 
+
66 bool CFBCommon::setKey(const uint8_t *key, size_t len)
+
67 {
+
68  // Verify the cipher's block size, just in case.
+
69  if (blockCipher->blockSize() != 16)
+
70  return false;
+
71 
+
72  // Set the key on the underlying block cipher.
+
73  return blockCipher->setKey(key, len);
+
74 }
+
75 
+
76 bool CFBCommon::setIV(const uint8_t *iv, size_t len)
+
77 {
+
78  if (len != 16)
+
79  return false;
+
80  memcpy(this->iv, iv, 16);
+
81  posn = 16;
+
82  return true;
+
83 }
+
84 
+
85 void CFBCommon::encrypt(uint8_t *output, const uint8_t *input, size_t len)
+
86 {
+
87  uint8_t size;
+
88  while (len > 0) {
+
89  // If we have exhausted the current keystream block, then encrypt
+
90  // the IV/ciphertext to get another keystream block.
+
91  if (posn >= 16) {
+
92  blockCipher->encryptBlock(iv, iv);
+
93  posn = 0;
+
94  }
+
95 
+
96  // XOR the plaintext with the encrypted IV to get the new ciphertext.
+
97  // We keep building up the ciphertext byte by byte in the IV buffer
+
98  // until we have a full block's worth, and then the IV is encrypted
+
99  // again by the code above.
+
100  size = 16 - posn;
+
101  if (size > len)
+
102  size = len;
+
103  len -= size;
+
104  while (size > 0) {
+
105  iv[posn] ^= *input++;
+
106  *output++ = iv[posn++];
+
107  --size;
+
108  }
+
109  }
+
110 }
+
111 
+
112 void CFBCommon::decrypt(uint8_t *output, const uint8_t *input, size_t len)
+
113 {
+
114  uint8_t size;
+
115  while (len > 0) {
+
116  // If we have exhausted the current keystream block, then encrypt
+
117  // the IV/ciphertext to get another keystream block.
+
118  if (posn >= 16) {
+
119  blockCipher->encryptBlock(iv, iv);
+
120  posn = 0;
+
121  }
+
122 
+
123  // XOR the ciphertext with the encrypted IV to get the new plaintext.
+
124  // We keep building up the ciphertext byte by byte in the IV buffer
+
125  // until we have a full block's worth, and then the IV is encrypted
+
126  // again by the code above.
+
127  size = 16 - posn;
+
128  if (size > len)
+
129  size = len;
+
130  len -= size;
+
131  while (size > 0) {
+
132  uint8_t in = *input++;
+
133  *output++ = iv[posn] ^ in;
+
134  iv[posn++] = in;
+
135  --size;
+
136  }
+
137  }
+
138 }
+
139 
+ +
141 {
+
142  blockCipher->clear();
+
143  clean(iv);
+
144  posn = 16;
+
145 }
+
146 
+
bool setKey(const uint8_t *key, size_t len)
Sets the key to use for future encryption and decryption operations.
Definition: CFB.cpp:66
+
size_t keySize() const
Default size of the key for this cipher, in bytes.
Definition: CFB.cpp:56
+
size_t ivSize() const
Size of the initialization vector for this cipher, in bytes.
Definition: CFB.cpp:61
+
virtual void encryptBlock(uint8_t *output, const uint8_t *input)=0
Encrypts a single block using this cipher.
+
virtual ~CFBCommon()
Destroys this cipher object after clearing sensitive information.
Definition: CFB.cpp:51
+
bool setIV(const uint8_t *iv, size_t len)
Sets the initialization vector to use for future encryption and decryption operations.
Definition: CFB.cpp:76
+
CFBCommon()
Constructs a new cipher in CFB mode.
Definition: CFB.cpp:42
+
void encrypt(uint8_t *output, const uint8_t *input, size_t len)
Encrypts an input buffer and writes the ciphertext to an output buffer.
Definition: CFB.cpp:85
+
virtual bool setKey(const uint8_t *key, size_t len)=0
Sets the key to use for future encryption and decryption operations.
+
virtual void clear()=0
Clears all security-sensitive state from this block cipher.
+
void clear()
Clears all security-sensitive state from this cipher.
Definition: CFB.cpp:140
+
virtual size_t blockSize() const =0
Size of a single block processed by this cipher, in bytes.
+
virtual size_t keySize() const =0
Default size of the key for this block cipher, in bytes.
+
void decrypt(uint8_t *output, const uint8_t *input, size_t len)
Decrypts an input buffer and writes the plaintext to an output buffer.
Definition: CFB.cpp:112
+
+ + + + diff --git a/CFB_8h_source.html b/CFB_8h_source.html new file mode 100644 index 00000000..8ee51875 --- /dev/null +++ b/CFB_8h_source.html @@ -0,0 +1,179 @@ + + + + + + +ArduinoLibs: CFB.h Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
CFB.h
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #ifndef CRYPTO_CFB_h
+
24 #define CRYPTO_CFB_h
+
25 
+
26 #include "Cipher.h"
+
27 #include "BlockCipher.h"
+
28 
+
29 class CFBCommon : public Cipher
+
30 {
+
31 public:
+
32  virtual ~CFBCommon();
+
33 
+
34  size_t keySize() const;
+
35  size_t ivSize() const;
+
36 
+
37  bool setKey(const uint8_t *key, size_t len);
+
38  bool setIV(const uint8_t *iv, size_t len);
+
39 
+
40  void encrypt(uint8_t *output, const uint8_t *input, size_t len);
+
41  void decrypt(uint8_t *output, const uint8_t *input, size_t len);
+
42 
+
43  void clear();
+
44 
+
45 protected:
+
46  CFBCommon();
+
47  void setBlockCipher(BlockCipher *cipher) { blockCipher = cipher; }
+
48 
+
49 private:
+
50  BlockCipher *blockCipher;
+
51  uint8_t iv[16];
+
52  uint8_t posn;
+
53 };
+
54 
+
55 template <typename T>
+
56 class CFB : public CFBCommon
+
57 {
+
58 public:
+
59  CFB() { setBlockCipher(&cipher); }
+
60 
+
61 private:
+
62  T cipher;
+
63 };
+
64 
+
65 #endif
+
Abstract base class for stream ciphers.
Definition: Cipher.h:29
+
bool setKey(const uint8_t *key, size_t len)
Sets the key to use for future encryption and decryption operations.
Definition: CFB.cpp:66
+
size_t keySize() const
Default size of the key for this cipher, in bytes.
Definition: CFB.cpp:56
+
CFB()
Constructs a new CFB object for the block cipher T.
Definition: CFB.h:59
+
Abstract base class for block ciphers.
Definition: BlockCipher.h:29
+
Implementation of the Cipher Feedback (CFB) mode for 128-bit block ciphers.
Definition: CFB.h:56
+
size_t ivSize() const
Size of the initialization vector for this cipher, in bytes.
Definition: CFB.cpp:61
+
virtual ~CFBCommon()
Destroys this cipher object after clearing sensitive information.
Definition: CFB.cpp:51
+
Concrete base class to assist with implementing CFB for 128-bit block ciphers.
Definition: CFB.h:29
+
bool setIV(const uint8_t *iv, size_t len)
Sets the initialization vector to use for future encryption and decryption operations.
Definition: CFB.cpp:76
+
void setBlockCipher(BlockCipher *cipher)
Sets the block cipher to use for this CFB object.
Definition: CFB.h:47
+
CFBCommon()
Constructs a new cipher in CFB mode.
Definition: CFB.cpp:42
+
void encrypt(uint8_t *output, const uint8_t *input, size_t len)
Encrypts an input buffer and writes the ciphertext to an output buffer.
Definition: CFB.cpp:85
+
void clear()
Clears all security-sensitive state from this cipher.
Definition: CFB.cpp:140
+
void decrypt(uint8_t *output, const uint8_t *input, size_t len)
Decrypts an input buffer and writes the plaintext to an output buffer.
Definition: CFB.cpp:112
+
+ + + + diff --git a/CTR_8cpp_source.html b/CTR_8cpp_source.html new file mode 100644 index 00000000..376be695 --- /dev/null +++ b/CTR_8cpp_source.html @@ -0,0 +1,236 @@ + + + + + + +ArduinoLibs: CTR.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
CTR.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #include "CTR.h"
+
24 #include "Crypto.h"
+
25 #include <string.h>
+
26 
+ +
43  : blockCipher(0)
+
44  , posn(16)
+
45  , counterStart(0)
+
46 {
+
47 }
+
48 
+
49 CTRCommon::~CTRCommon()
+
50 {
+
51  // It is assumed that the subclass will clear sensitive
+
52  // information in the block cipher.
+
53  clean(counter);
+
54  clean(state);
+
55 }
+
56 
+
57 size_t CTRCommon::keySize() const
+
58 {
+
59  return blockCipher->keySize();
+
60 }
+
61 
+
62 size_t CTRCommon::ivSize() const
+
63 {
+
64  return 16;
+
65 }
+
66 
+
86 bool CTRCommon::setCounterSize(size_t size)
+
87 {
+
88  if (size < 1 || size > 16)
+
89  return false;
+
90  counterStart = 16 - size;
+
91  return true;
+
92 }
+
93 
+
94 bool CTRCommon::setKey(const uint8_t *key, size_t len)
+
95 {
+
96  // Verify the cipher's block size, just in case.
+
97  if (blockCipher->blockSize() != 16)
+
98  return false;
+
99 
+
100  // Set the key on the underlying block cipher.
+
101  return blockCipher->setKey(key, len);
+
102 }
+
103 
+
119 bool CTRCommon::setIV(const uint8_t *iv, size_t len)
+
120 {
+
121  if (len != 16)
+
122  return false;
+
123  memcpy(counter, iv, len);
+
124  posn = 16;
+
125  return true;
+
126 }
+
127 
+
128 void CTRCommon::encrypt(uint8_t *output, const uint8_t *input, size_t len)
+
129 {
+
130  while (len > 0) {
+
131  if (posn >= 16) {
+
132  // Generate a new encrypted counter block.
+
133  blockCipher->encryptBlock(state, counter);
+
134  posn = 0;
+
135 
+
136  // Increment the counter, taking care not to reveal
+
137  // any timing information about the starting value.
+
138  // We iterate through the entire counter region even
+
139  // if we could stop earlier because a byte is non-zero.
+
140  uint16_t temp = 1;
+
141  uint8_t index = 16;
+
142  while (index > counterStart) {
+
143  --index;
+
144  temp += counter[index];
+
145  counter[index] = (uint8_t)temp;
+
146  temp >>= 8;
+
147  }
+
148  }
+
149  uint8_t templen = 16 - posn;
+
150  if (templen > len)
+
151  templen = len;
+
152  len -= templen;
+
153  while (templen > 0) {
+
154  *output++ = *input++ ^ state[posn++];
+
155  --templen;
+
156  }
+
157  }
+
158 }
+
159 
+
160 void CTRCommon::decrypt(uint8_t *output, const uint8_t *input, size_t len)
+
161 {
+
162  encrypt(output, input, len);
+
163 }
+
164 
+ +
166 {
+
167  blockCipher->clear();
+
168  clean(counter);
+
169  clean(state);
+
170  posn = 16;
+
171 }
+
172 
+
bool setIV(const uint8_t *iv, size_t len)
Sets the initial counter value to use for future encryption and decryption operations.
Definition: CTR.cpp:119
+
virtual void encryptBlock(uint8_t *output, const uint8_t *input)=0
Encrypts a single block using this cipher.
+
bool setCounterSize(size_t size)
Sets the counter size for the IV.
Definition: CTR.cpp:86
+
virtual bool setKey(const uint8_t *key, size_t len)=0
Sets the key to use for future encryption and decryption operations.
+
void encrypt(uint8_t *output, const uint8_t *input, size_t len)
Encrypts an input buffer and writes the ciphertext to an output buffer.
Definition: CTR.cpp:128
+
void decrypt(uint8_t *output, const uint8_t *input, size_t len)
Decrypts an input buffer and writes the plaintext to an output buffer.
Definition: CTR.cpp:160
+
CTRCommon()
Constructs a new cipher in CTR mode.
Definition: CTR.cpp:42
+
size_t keySize() const
Default size of the key for this cipher, in bytes.
Definition: CTR.cpp:57
+
virtual void clear()=0
Clears all security-sensitive state from this block cipher.
+
size_t ivSize() const
Size of the initialization vector for this cipher, in bytes.
Definition: CTR.cpp:62
+
bool setKey(const uint8_t *key, size_t len)
Sets the key to use for future encryption and decryption operations.
Definition: CTR.cpp:94
+
virtual size_t blockSize() const =0
Size of a single block processed by this cipher, in bytes.
+
virtual size_t keySize() const =0
Default size of the key for this block cipher, in bytes.
+
void clear()
Clears all security-sensitive state from this cipher.
Definition: CTR.cpp:165
+
+ + + + diff --git a/CTR_8h_source.html b/CTR_8h_source.html new file mode 100644 index 00000000..3a5847fd --- /dev/null +++ b/CTR_8h_source.html @@ -0,0 +1,183 @@ + + + + + + +ArduinoLibs: CTR.h Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
CTR.h
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #ifndef CRYPTO_CTR_h
+
24 #define CRYPTO_CTR_h
+
25 
+
26 #include "Cipher.h"
+
27 #include "BlockCipher.h"
+
28 
+
29 class CTRCommon : public Cipher
+
30 {
+
31 public:
+
32  virtual ~CTRCommon();
+
33 
+
34  size_t keySize() const;
+
35  size_t ivSize() const;
+
36 
+
37  bool setCounterSize(size_t size);
+
38 
+
39  bool setKey(const uint8_t *key, size_t len);
+
40  bool setIV(const uint8_t *iv, size_t len);
+
41 
+
42  void encrypt(uint8_t *output, const uint8_t *input, size_t len);
+
43  void decrypt(uint8_t *output, const uint8_t *input, size_t len);
+
44 
+
45  void clear();
+
46 
+
47 protected:
+
48  CTRCommon();
+
49  void setBlockCipher(BlockCipher *cipher) { blockCipher = cipher; }
+
50 
+
51 private:
+
52  BlockCipher *blockCipher;
+
53  uint8_t counter[16];
+
54  uint8_t state[16];
+
55  uint8_t posn;
+
56  uint8_t counterStart;
+
57 };
+
58 
+
59 template <typename T>
+
60 class CTR : public CTRCommon
+
61 {
+
62 public:
+
63  CTR() { setBlockCipher(&cipher); }
+
64 
+
65 private:
+
66  T cipher;
+
67 };
+
68 
+
69 #endif
+
Abstract base class for stream ciphers.
Definition: Cipher.h:29
+
CTR()
Constructs a new CTR object for the 128-bit block cipher T.
Definition: CTR.h:63
+
Abstract base class for block ciphers.
Definition: BlockCipher.h:29
+
void setBlockCipher(BlockCipher *cipher)
Sets the block cipher to use for this CTR object.
Definition: CTR.h:49
+
bool setIV(const uint8_t *iv, size_t len)
Sets the initial counter value to use for future encryption and decryption operations.
Definition: CTR.cpp:119
+
bool setCounterSize(size_t size)
Sets the counter size for the IV.
Definition: CTR.cpp:86
+
void encrypt(uint8_t *output, const uint8_t *input, size_t len)
Encrypts an input buffer and writes the ciphertext to an output buffer.
Definition: CTR.cpp:128
+
void decrypt(uint8_t *output, const uint8_t *input, size_t len)
Decrypts an input buffer and writes the plaintext to an output buffer.
Definition: CTR.cpp:160
+
CTRCommon()
Constructs a new cipher in CTR mode.
Definition: CTR.cpp:42
+
size_t keySize() const
Default size of the key for this cipher, in bytes.
Definition: CTR.cpp:57
+
size_t ivSize() const
Size of the initialization vector for this cipher, in bytes.
Definition: CTR.cpp:62
+
bool setKey(const uint8_t *key, size_t len)
Sets the key to use for future encryption and decryption operations.
Definition: CTR.cpp:94
+
Implementation of the Counter (CTR) mode for 128-bit block ciphers.
Definition: CTR.h:60
+
void clear()
Clears all security-sensitive state from this cipher.
Definition: CTR.cpp:165
+
Concrete base class to assist with implementing CTR mode for 128-bit block ciphers.
Definition: CTR.h:29
+
+ + + + diff --git a/ChaCha_8cpp_source.html b/ChaCha_8cpp_source.html new file mode 100644 index 00000000..58e01c14 --- /dev/null +++ b/ChaCha_8cpp_source.html @@ -0,0 +1,308 @@ + + + + + + +ArduinoLibs: ChaCha.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
ChaCha.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #include "ChaCha.h"
+
24 #include "Crypto.h"
+
25 #include "utility/RotateUtil.h"
+
26 #include "utility/EndianUtil.h"
+
27 #include "utility/ProgMemUtil.h"
+
28 #include <string.h>
+
29 
+
47 ChaCha::ChaCha(uint8_t numRounds)
+
48  : rounds(numRounds)
+
49  , posn(64)
+
50 {
+
51 }
+
52 
+
53 ChaCha::~ChaCha()
+
54 {
+
55  clean(block);
+
56  clean(stream);
+
57 }
+
58 
+
59 size_t ChaCha::keySize() const
+
60 {
+
61  // Default key size is 256-bit, but any key size is allowed.
+
62  return 32;
+
63 }
+
64 
+
65 size_t ChaCha::ivSize() const
+
66 {
+
67  // We return 8 but we also support 12-byte nonces in setIV().
+
68  return 8;
+
69 }
+
70 
+
87 bool ChaCha::setKey(const uint8_t *key, size_t len)
+
88 {
+
89  static const char tag128[] PROGMEM = "expand 16-byte k";
+
90  static const char tag256[] PROGMEM = "expand 32-byte k";
+
91  if (len <= 16) {
+
92  memcpy_P(block, tag128, 16);
+
93  memcpy(block + 16, key, len);
+
94  memcpy(block + 32, key, len);
+
95  if (len < 16) {
+
96  memset(block + 16 + len, 0, 16 - len);
+
97  memset(block + 32 + len, 0, 16 - len);
+
98  }
+
99  } else {
+
100  if (len > 32)
+
101  len = 32;
+
102  memcpy_P(block, tag256, 16);
+
103  memcpy(block + 16, key, len);
+
104  if (len < 32)
+
105  memset(block + 16 + len, 0, 32 - len);
+
106  }
+
107  posn = 64;
+
108  return true;
+
109 }
+
110 
+
111 bool ChaCha::setIV(const uint8_t *iv, size_t len)
+
112 {
+
113  // From draft-nir-cfrg-chacha20-poly1305-04.txt, we can use either
+
114  // 64-bit or 96-bit nonces. The 96-bit nonce consists of the high
+
115  // word of the counter prepended to a regular 64-bit nonce for ChaCha.
+
116  if (len == 8) {
+
117  memset(block + 48, 0, 8);
+
118  memcpy(block + 56, iv, len);
+
119  posn = 64;
+
120  return true;
+
121  } else if (len == 12) {
+
122  memset(block + 48, 0, 4);
+
123  memcpy(block + 52, iv, len);
+
124  posn = 64;
+
125  return true;
+
126  } else {
+
127  return false;
+
128  }
+
129 }
+
130 
+
145 bool ChaCha::setCounter(const uint8_t *counter, size_t len)
+
146 {
+
147  // Normally both the IV and the counter are 8 bytes in length.
+
148  // However, if the IV was 12 bytes, then a 4 byte counter can be used.
+
149  if (len == 4 || len == 8) {
+
150  memcpy(block + 48, counter, len);
+
151  posn = 64;
+
152  return true;
+
153  } else {
+
154  return false;
+
155  }
+
156 }
+
157 
+
158 void ChaCha::encrypt(uint8_t *output, const uint8_t *input, size_t len)
+
159 {
+
160  while (len > 0) {
+
161  if (posn >= 64) {
+
162  // Generate a new encrypted counter block.
+
163  hashCore((uint32_t *)stream, (const uint32_t *)block, rounds);
+
164  posn = 0;
+
165 
+
166  // Increment the counter, taking care not to reveal
+
167  // any timing information about the starting value.
+
168  // We iterate through the entire counter region even
+
169  // if we could stop earlier because a byte is non-zero.
+
170  uint16_t temp = 1;
+
171  uint8_t index = 48;
+
172  while (index < 56) {
+
173  temp += block[index];
+
174  block[index] = (uint8_t)temp;
+
175  temp >>= 8;
+
176  ++index;
+
177  }
+
178  }
+
179  uint8_t templen = 64 - posn;
+
180  if (templen > len)
+
181  templen = len;
+
182  len -= templen;
+
183  while (templen > 0) {
+
184  *output++ = *input++ ^ stream[posn++];
+
185  --templen;
+
186  }
+
187  }
+
188 }
+
189 
+
190 void ChaCha::decrypt(uint8_t *output, const uint8_t *input, size_t len)
+
191 {
+
192  encrypt(output, input, len);
+
193 }
+
194 
+ +
196 {
+
197  clean(block);
+
198  clean(stream);
+
199  posn = 64;
+
200 }
+
201 
+
202 // Perform a ChaCha quarter round operation.
+
203 #define quarterRound(a, b, c, d) \
+
204  do { \
+
205  uint32_t _b = (b); \
+
206  uint32_t _a = (a) + _b; \
+
207  uint32_t _d = leftRotate((d) ^ _a, 16); \
+
208  uint32_t _c = (c) + _d; \
+
209  _b = leftRotate12(_b ^ _c); \
+
210  _a += _b; \
+
211  (d) = _d = leftRotate(_d ^ _a, 8); \
+
212  _c += _d; \
+
213  (a) = _a; \
+
214  (b) = leftRotate7(_b ^ _c); \
+
215  (c) = _c; \
+
216  } while (0)
+
217 
+
230 void ChaCha::hashCore(uint32_t *output, const uint32_t *input, uint8_t rounds)
+
231 {
+
232  uint8_t posn;
+
233 
+
234  // Copy the input buffer to the output prior to the first round
+
235  // and convert from little-endian to host byte order.
+
236  for (posn = 0; posn < 16; ++posn)
+
237  output[posn] = le32toh(input[posn]);
+
238 
+
239  // Perform the ChaCha rounds in sets of two.
+
240  for (; rounds >= 2; rounds -= 2) {
+
241  // Column round.
+
242  quarterRound(output[0], output[4], output[8], output[12]);
+
243  quarterRound(output[1], output[5], output[9], output[13]);
+
244  quarterRound(output[2], output[6], output[10], output[14]);
+
245  quarterRound(output[3], output[7], output[11], output[15]);
+
246 
+
247  // Diagonal round.
+
248  quarterRound(output[0], output[5], output[10], output[15]);
+
249  quarterRound(output[1], output[6], output[11], output[12]);
+
250  quarterRound(output[2], output[7], output[8], output[13]);
+
251  quarterRound(output[3], output[4], output[9], output[14]);
+
252  }
+
253 
+
254  // Add the original input to the final output, convert back to
+
255  // little-endian, and return the result.
+
256  for (posn = 0; posn < 16; ++posn)
+
257  output[posn] = htole32(output[posn] + le32toh(input[posn]));
+
258 }
+
size_t ivSize() const
Size of the initialization vector for this cipher, in bytes.
Definition: ChaCha.cpp:65
+
bool setKey(const uint8_t *key, size_t len)
Sets the key to use for future encryption and decryption operations.
Definition: ChaCha.cpp:87
+
size_t keySize() const
Default size of the key for this cipher, in bytes.
Definition: ChaCha.cpp:59
+
bool setIV(const uint8_t *iv, size_t len)
Sets the initialization vector to use for future encryption and decryption operations.
Definition: ChaCha.cpp:111
+
bool setCounter(const uint8_t *counter, size_t len)
Sets the starting counter for encryption.
Definition: ChaCha.cpp:145
+
ChaCha(uint8_t numRounds=20)
Constructs a new ChaCha stream cipher.
Definition: ChaCha.cpp:47
+
void decrypt(uint8_t *output, const uint8_t *input, size_t len)
Decrypts an input buffer and writes the plaintext to an output buffer.
Definition: ChaCha.cpp:190
+
void encrypt(uint8_t *output, const uint8_t *input, size_t len)
Encrypts an input buffer and writes the ciphertext to an output buffer.
Definition: ChaCha.cpp:158
+
void clear()
Clears all security-sensitive state from this cipher.
Definition: ChaCha.cpp:195
+
static void hashCore(uint32_t *output, const uint32_t *input, uint8_t rounds)
Executes the ChaCha hash core on an input memory block.
Definition: ChaCha.cpp:230
+
+ + + + diff --git a/ChaCha_8h_source.html b/ChaCha_8h_source.html new file mode 100644 index 00000000..6ff0bdc7 --- /dev/null +++ b/ChaCha_8h_source.html @@ -0,0 +1,171 @@ + + + + + + +ArduinoLibs: ChaCha.h Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
ChaCha.h
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #ifndef CRYPTO_CHACHA_h
+
24 #define CRYPTO_CHACHA_h
+
25 
+
26 #include "Cipher.h"
+
27 
+
28 class ChaCha : public Cipher
+
29 {
+
30 public:
+
31  explicit ChaCha(uint8_t numRounds = 20);
+
32  virtual ~ChaCha();
+
33 
+
34  size_t keySize() const;
+
35  size_t ivSize() const;
+
36 
+
37  uint8_t numRounds() const { return rounds; }
+
38  void setNumRounds(uint8_t numRounds) { rounds = numRounds; }
+
39 
+
40  bool setKey(const uint8_t *key, size_t len);
+
41  bool setIV(const uint8_t *iv, size_t len);
+
42  bool setCounter(const uint8_t *counter, size_t len);
+
43 
+
44  void encrypt(uint8_t *output, const uint8_t *input, size_t len);
+
45  void decrypt(uint8_t *output, const uint8_t *input, size_t len);
+
46 
+
47  void clear();
+
48 
+
49  static void hashCore(uint32_t *output, const uint32_t *input, uint8_t rounds);
+
50 
+
51 private:
+
52  uint8_t block[64];
+
53  uint8_t stream[64];
+
54  uint8_t rounds;
+
55  uint8_t posn;
+
56 };
+
57 
+
58 #endif
+
Abstract base class for stream ciphers.
Definition: Cipher.h:29
+
size_t ivSize() const
Size of the initialization vector for this cipher, in bytes.
Definition: ChaCha.cpp:65
+
bool setKey(const uint8_t *key, size_t len)
Sets the key to use for future encryption and decryption operations.
Definition: ChaCha.cpp:87
+
ChaCha stream cipher.
Definition: ChaCha.h:28
+
size_t keySize() const
Default size of the key for this cipher, in bytes.
Definition: ChaCha.cpp:59
+
bool setIV(const uint8_t *iv, size_t len)
Sets the initialization vector to use for future encryption and decryption operations.
Definition: ChaCha.cpp:111
+
bool setCounter(const uint8_t *counter, size_t len)
Sets the starting counter for encryption.
Definition: ChaCha.cpp:145
+
ChaCha(uint8_t numRounds=20)
Constructs a new ChaCha stream cipher.
Definition: ChaCha.cpp:47
+
void decrypt(uint8_t *output, const uint8_t *input, size_t len)
Decrypts an input buffer and writes the plaintext to an output buffer.
Definition: ChaCha.cpp:190
+
void encrypt(uint8_t *output, const uint8_t *input, size_t len)
Encrypts an input buffer and writes the ciphertext to an output buffer.
Definition: ChaCha.cpp:158
+
void clear()
Clears all security-sensitive state from this cipher.
Definition: ChaCha.cpp:195
+
uint8_t numRounds() const
Returns the number of encryption rounds; usually 8, 12, or 20.
Definition: ChaCha.h:37
+
void setNumRounds(uint8_t numRounds)
Sets the number of encryption rounds.
Definition: ChaCha.h:38
+
static void hashCore(uint32_t *output, const uint32_t *input, uint8_t rounds)
Executes the ChaCha hash core on an input memory block.
Definition: ChaCha.cpp:230
+
+ + + + diff --git a/Charlieplex_8cpp_source.html b/Charlieplex_8cpp_source.html index 2446b44e..52b75cf6 100644 --- a/Charlieplex_8cpp_source.html +++ b/Charlieplex_8cpp_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: Charlieplex.cpp Source File @@ -29,7 +30,7 @@ - + @@ -118,7 +119,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
29 #include <stdlib.h>
30 #include <string.h>
31 
-
121 Charlieplex::Charlieplex(const uint8_t *pins, uint8_t numPins)
+
121 Charlieplex::Charlieplex(const uint8_t *pins, uint8_t numPins)
122  : _count(((int)numPins) * (numPins - 1))
123  , _lastTime(micros())
124  , _currentIndex(-1)
@@ -153,23 +154,23 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
153  }
154 }
155 
-
159 Charlieplex::~Charlieplex()
+
159 Charlieplex::~Charlieplex()
160 {
161  free(_pins1);
162  free(_pins2);
163  free(_values);
164 }
165 
-
277 void Charlieplex::loop()
+
277 void Charlieplex::loop()
278 {
279  unsigned long us = micros();
280  if ((us - _lastTime) >= _holdTime) {
281  _lastTime = us;
-
282  refresh();
+
282  refresh();
283  }
284 }
285 
-
296 void Charlieplex::refresh()
+
296 void Charlieplex::refresh()
297 {
298  // Find the next LED to be lit.
299  int prevIndex = _currentIndex;
@@ -224,12 +225,16 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
348  analogWrite(pin1, value);
349  }
350 }
+
Charlieplex::~Charlieplex
~Charlieplex()
Destroys this charlieplexed array.
Definition: Charlieplex.cpp:159
+
Charlieplex::Charlieplex
Charlieplex(const uint8_t *pins, uint8_t numPins)
Constructs a new charliexplexing array where the output pins are specified by the numPins entries in ...
Definition: Charlieplex.cpp:121
+
Charlieplex::loop
void loop()
Runs the multiplexing loop, to display the LED states on the charlieplexed array. ...
Definition: Charlieplex.cpp:277
+
Charlieplex::refresh
void refresh()
Refreshes the charlieplexed array by advancing to the next LED that needs to be lit.
Definition: Charlieplex.cpp:296
diff --git a/Charlieplex_8h_source.html b/Charlieplex_8h_source.html index b1516b43..d1883e41 100644 --- a/Charlieplex_8h_source.html +++ b/Charlieplex_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: Charlieplex.h Source File @@ -29,7 +30,7 @@ - + @@ -114,25 +115,25 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
25 
26 #include <inttypes.h>
27 
-
28 class Charlieplex
+
28 class Charlieplex
29 {
30 public:
-
31  Charlieplex(const uint8_t *pins, uint8_t numPins);
-
32  ~Charlieplex();
+
31  Charlieplex(const uint8_t *pins, uint8_t numPins);
+
32  ~Charlieplex();
33 
-
34  int count() const { return _count; }
+
34  int count() const { return _count; }
35 
-
36  bool led(int index) const { return _values[index] != 0; }
-
37  void setLed(int index, bool value) { _values[index] = (value ? 255 : 0); }
+
36  bool led(int index) const { return _values[index] != 0; }
+
37  void setLed(int index, bool value) { _values[index] = (value ? 255 : 0); }
38 
-
39  uint8_t pwmLed(int index) const { return _values[index]; }
-
40  void setPwmLed(int index, uint8_t value) { _values[index] = value; }
+
39  uint8_t pwmLed(int index) const { return _values[index]; }
+
40  void setPwmLed(int index, uint8_t value) { _values[index] = value; }
41 
-
42  unsigned long holdTime() const { return _holdTime; }
-
43  void setHoldTime(unsigned long us) { _holdTime = us; }
+
42  unsigned long holdTime() const { return _holdTime; }
+
43  void setHoldTime(unsigned long us) { _holdTime = us; }
44 
-
45  void loop();
-
46  void refresh();
+
45  void loop();
+
46  void refresh();
47 
48 private:
49  int _count;
@@ -146,12 +147,24 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
57 };
58 
59 #endif
+
Charlieplex::setPwmLed
void setPwmLed(int index, uint8_t value)
Sets the PWM value of the LED at index in the charliplexed array; between 0 and 255.
Definition: Charlieplex.h:40
+
Charlieplex::~Charlieplex
~Charlieplex()
Destroys this charlieplexed array.
Definition: Charlieplex.cpp:159
+
Charlieplex::setHoldTime
void setHoldTime(unsigned long us)
Sets the number of microseconds that each LED should be held on for before moving onto the next in lo...
Definition: Charlieplex.h:43
+
Charlieplex
Manage an array of LED's in a charlieplexed arrangement.
Definition: Charlieplex.h:28
+
Charlieplex::setLed
void setLed(int index, bool value)
Sets the value of the LED at index in the charliplexed array.
Definition: Charlieplex.h:37
+
Charlieplex::led
bool led(int index) const
Returns the value of the LED at index in the charplexed array; true if lit; false if not lit...
Definition: Charlieplex.h:36
+
Charlieplex::Charlieplex
Charlieplex(const uint8_t *pins, uint8_t numPins)
Constructs a new charliexplexing array where the output pins are specified by the numPins entries in ...
Definition: Charlieplex.cpp:121
+
Charlieplex::loop
void loop()
Runs the multiplexing loop, to display the LED states on the charlieplexed array. ...
Definition: Charlieplex.cpp:277
+
Charlieplex::count
int count() const
Returns the number of LED's in this charlieplexed array based on the number of pins.
Definition: Charlieplex.h:34
+
Charlieplex::holdTime
unsigned long holdTime() const
Returns the number of microseconds that each LED should be held on for before moving onto the next in...
Definition: Charlieplex.h:42
+
Charlieplex::refresh
void refresh()
Refreshes the charlieplexed array by advancing to the next LED that needs to be lit.
Definition: Charlieplex.cpp:296
+
Charlieplex::pwmLed
uint8_t pwmLed(int index) const
Returns the PWM value of the LED at index in the charplexed array; between 0 and 255.
Definition: Charlieplex.h:39
diff --git a/ChaseLEDs_8cpp_source.html b/ChaseLEDs_8cpp_source.html index a60396e0..51a87887 100644 --- a/ChaseLEDs_8cpp_source.html +++ b/ChaseLEDs_8cpp_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: ChaseLEDs.cpp Source File @@ -29,7 +30,7 @@ - + @@ -116,7 +117,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
27 #include <WProgram.h>
28 #endif
29 
-
71 ChaseLEDs::ChaseLEDs(const uint8_t *pins, int num, unsigned long advanceTime)
+
71 ChaseLEDs::ChaseLEDs(const uint8_t *pins, int num, unsigned long advanceTime)
72  : _pins(pins)
73  , _numPins(num)
74  , _currentIndex(-1)
@@ -129,35 +130,39 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
81  }
82 }
83 
-
87 void ChaseLEDs::loop()
+
87 void ChaseLEDs::loop()
88 {
89  if (_currentIndex >= 0) {
90  if ((millis() - _lastChange) >= _advanceTime) {
91  // Advance to the next LED in sequence.
92  _currentIndex = (_currentIndex + 1) % _numPins;
93  _lastChange += _advanceTime;
-
94  advance(previousPin(1), _pins[_currentIndex]);
+
94  advance(previousPin(1), _pins[_currentIndex]);
95  }
96  } else {
97  // First time - light the first LED.
98  _currentIndex = 0;
99  _lastChange = millis();
-
100  advance(previousPin(1), _pins[_currentIndex]);
+
100  advance(previousPin(1), _pins[_currentIndex]);
101  }
102 }
103 
-
136 void ChaseLEDs::advance(uint8_t prevPin, uint8_t nextPin)
+
136 void ChaseLEDs::advance(uint8_t prevPin, uint8_t nextPin)
137 {
138  digitalWrite(prevPin, LOW);
139  digitalWrite(nextPin, HIGH);
140 }
141 
+
ChaseLEDs::advance
virtual void advance(uint8_t prevPin, uint8_t nextPin)
Advances to the next LED in sequence, turning off prevPin, and turning on nextPin.
Definition: ChaseLEDs.cpp:136
+
ChaseLEDs::previousPin
uint8_t previousPin(int n) const
Returns the pin that is n steps back in the sequence.
Definition: ChaseLEDs.h:40
+
ChaseLEDs::loop
void loop()
Definition: ChaseLEDs.cpp:87
+
ChaseLEDs::ChaseLEDs
ChaseLEDs(const uint8_t *pins, int num, unsigned long advanceTime)
Initializes the LED chaser.
Definition: ChaseLEDs.cpp:71
diff --git a/ChaseLEDs_8h_source.html b/ChaseLEDs_8h_source.html index db99df74..30ba9902 100644 --- a/ChaseLEDs_8h_source.html +++ b/ChaseLEDs_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: ChaseLEDs.h Source File @@ -29,7 +30,7 @@ - + @@ -114,19 +115,19 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
25 
26 #include <inttypes.h>
27 
-
28 class ChaseLEDs
+
28 class ChaseLEDs
29 {
30 public:
-
31  ChaseLEDs(const uint8_t *pins, int num, unsigned long advanceTime);
+
31  ChaseLEDs(const uint8_t *pins, int num, unsigned long advanceTime);
32 
33  void loop();
34 
-
35  unsigned long advanceTime() const { return _advanceTime; }
-
36  void setAdvanceTime(unsigned long advanceTime) { _advanceTime = advanceTime; }
+
35  unsigned long advanceTime() const { return _advanceTime; }
+
36  void setAdvanceTime(unsigned long advanceTime) { _advanceTime = advanceTime; }
37 
38 protected:
-
39  virtual void advance(uint8_t prevPin, uint8_t nextPin);
-
40  uint8_t previousPin(int n) const
+
39  virtual void advance(uint8_t prevPin, uint8_t nextPin);
+
40  uint8_t previousPin(int n) const
41  { return _pins[(_currentIndex + _numPins - n) % _numPins]; }
42 
43 private:
@@ -138,12 +139,19 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
49 };
50 
51 #endif
+
ChaseLEDs::advanceTime
unsigned long advanceTime() const
Returns the number of milliseconds that each LED will be lit in the chase sequence.
Definition: ChaseLEDs.h:35
+
ChaseLEDs::advance
virtual void advance(uint8_t prevPin, uint8_t nextPin)
Advances to the next LED in sequence, turning off prevPin, and turning on nextPin.
Definition: ChaseLEDs.cpp:136
+
ChaseLEDs::previousPin
uint8_t previousPin(int n) const
Returns the pin that is n steps back in the sequence.
Definition: ChaseLEDs.h:40
+
ChaseLEDs::loop
void loop()
Definition: ChaseLEDs.cpp:87
+
ChaseLEDs
Chase LED's on output pins in a defined sequence.
Definition: ChaseLEDs.h:28
+
ChaseLEDs::ChaseLEDs
ChaseLEDs(const uint8_t *pins, int num, unsigned long advanceTime)
Initializes the LED chaser.
Definition: ChaseLEDs.cpp:71
+
ChaseLEDs::setAdvanceTime
void setAdvanceTime(unsigned long advanceTime)
Sets the number of milliseconds to advance between LED's to advanceTime.
Definition: ChaseLEDs.h:36
diff --git a/Cipher_8cpp_source.html b/Cipher_8cpp_source.html new file mode 100644 index 00000000..1732a9cf --- /dev/null +++ b/Cipher_8cpp_source.html @@ -0,0 +1,133 @@ + + + + + + +ArduinoLibs: Cipher.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
Cipher.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #include "Cipher.h"
+
24 
+ +
42 {
+
43 }
+
44 
+ +
54 {
+
55 }
+
56 
+
Cipher()
Constructs a new cipher object.
Definition: Cipher.cpp:41
+
virtual ~Cipher()
Destroys this cipher object.
Definition: Cipher.cpp:53
+
+ + + + diff --git a/Cipher_8h_source.html b/Cipher_8h_source.html new file mode 100644 index 00000000..bb3bb564 --- /dev/null +++ b/Cipher_8h_source.html @@ -0,0 +1,156 @@ + + + + + + +ArduinoLibs: Cipher.h Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
Cipher.h
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #ifndef CRYPTO_CIPHER_h
+
24 #define CRYPTO_CIPHER_h
+
25 
+
26 #include <inttypes.h>
+
27 #include <stddef.h>
+
28 
+
29 class Cipher
+
30 {
+
31 public:
+
32  Cipher();
+
33  virtual ~Cipher();
+
34 
+
35  virtual size_t keySize() const = 0;
+
36  virtual size_t ivSize() const = 0;
+
37 
+
38  virtual bool setKey(const uint8_t *key, size_t len) = 0;
+
39  virtual bool setIV(const uint8_t *iv, size_t len) = 0;
+
40 
+
41  virtual void encrypt(uint8_t *output, const uint8_t *input, size_t len) = 0;
+
42  virtual void decrypt(uint8_t *output, const uint8_t *input, size_t len) = 0;
+
43 
+
44  virtual void clear() = 0;
+
45 };
+
46 
+
47 #endif
+
virtual size_t ivSize() const =0
Size of the initialization vector for this cipher, in bytes.
+
Abstract base class for stream ciphers.
Definition: Cipher.h:29
+
virtual void encrypt(uint8_t *output, const uint8_t *input, size_t len)=0
Encrypts an input buffer and writes the ciphertext to an output buffer.
+
virtual void decrypt(uint8_t *output, const uint8_t *input, size_t len)=0
Decrypts an input buffer and writes the plaintext to an output buffer.
+
virtual bool setIV(const uint8_t *iv, size_t len)=0
Sets the initialization vector to use for future encryption and decryption operations.
+
Cipher()
Constructs a new cipher object.
Definition: Cipher.cpp:41
+
virtual ~Cipher()
Destroys this cipher object.
Definition: Cipher.cpp:53
+
virtual size_t keySize() const =0
Default size of the key for this cipher, in bytes.
+
virtual void clear()=0
Clears all security-sensitive state from this cipher.
+
virtual bool setKey(const uint8_t *key, size_t len)=0
Sets the key to use for future encryption and decryption operations.
+
+ + + + diff --git a/Crypto_8cpp_source.html b/Crypto_8cpp_source.html new file mode 100644 index 00000000..5976c14b --- /dev/null +++ b/Crypto_8cpp_source.html @@ -0,0 +1,135 @@ + + + + + + +ArduinoLibs: Crypto.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
Crypto.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #include "Crypto.h"
+
24 
+
34 void clean(void *dest, size_t size)
+
35 {
+
36  // Force the use of volatile so that we actually clear the memory.
+
37  // Otherwise the compiler might optimise the entire contents of this
+
38  // function away, which will not be secure.
+
39  volatile uint8_t *d = (volatile uint8_t *)dest;
+
40  while (size > 0) {
+
41  *d++ = 0;
+
42  --size;
+
43  }
+
44 }
+
45 
+
+ + + + diff --git a/Crypto_8h_source.html b/Crypto_8h_source.html new file mode 100644 index 00000000..c6338119 --- /dev/null +++ b/Crypto_8h_source.html @@ -0,0 +1,136 @@ + + + + + + +ArduinoLibs: Crypto.h Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
Crypto.h
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #ifndef CRYPTO_h
+
24 #define CRYPTO_h
+
25 
+
26 #include <inttypes.h>
+
27 #include <stddef.h>
+
28 
+
29 void clean(void *dest, size_t size);
+
30 
+
31 template <typename T>
+
32 inline void clean(T &var)
+
33 {
+
34  clean(&var, sizeof(T));
+
35 }
+
36 
+
37 #endif
+
+ + + + diff --git a/Curve25519_8cpp_source.html b/Curve25519_8cpp_source.html new file mode 100644 index 00000000..3aaaa08f --- /dev/null +++ b/Curve25519_8cpp_source.html @@ -0,0 +1,725 @@ + + + + + + +ArduinoLibs: Curve25519.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
Curve25519.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #include "Curve25519.h"
+
24 #include "Crypto.h"
+
25 #include "RNG.h"
+
26 #include "utility/ProgMemUtil.h"
+
27 #include <string.h>
+
28 
+
42 // Number of limbs in a value from the field modulo 2^255 - 19.
+
43 // We assume that sizeof(limb_t) is a power of 2: 1, 2, 4, etc.
+
44 #define NUM_LIMBS (32 / sizeof(limb_t))
+
45 
+
46 // Number of bits in limb_t.
+
47 #define LIMB_BITS (8 * sizeof(limb_t))
+
48 
+
68 bool Curve25519::eval(uint8_t result[32], const uint8_t s[32], const uint8_t x[32])
+
69 {
+
70  limb_t x_1[NUM_LIMBS];
+
71  limb_t x_2[NUM_LIMBS];
+
72  limb_t x_3[NUM_LIMBS];
+
73  limb_t z_2[NUM_LIMBS];
+
74  limb_t z_3[NUM_LIMBS];
+
75  limb_t A[NUM_LIMBS];
+
76  limb_t B[NUM_LIMBS];
+
77  limb_t C[NUM_LIMBS];
+
78  limb_t D[NUM_LIMBS];
+
79  limb_t E[NUM_LIMBS];
+
80  limb_t AA[NUM_LIMBS];
+
81  limb_t BB[NUM_LIMBS];
+
82  limb_t DA[NUM_LIMBS];
+
83  limb_t CB[NUM_LIMBS];
+
84  uint8_t mask;
+
85  uint8_t sposn;
+
86  uint8_t select;
+
87  uint8_t swap;
+
88  bool retval;
+
89 
+
90  // Unpack the "x" argument into the limb representation
+
91  // which also masks off the high bit. NULL means 9.
+
92  if (x) {
+
93  unpack(x_1, x); // x_1 = x
+
94  } else {
+
95  memset(x_1, 0, sizeof(x_1)); // x_1 = 9
+
96  x_1[0] = 9;
+
97  }
+
98 
+
99  // Check that "x" is within the range of the modulo field.
+
100  // We can do this with a reduction - if there was no borrow
+
101  // then the value of "x" was out of range. Timing is sensitive
+
102  // here so that we don't reveal anything about the value of "x".
+
103  // If there was a reduction, then continue executing the rest
+
104  // of this function with the (now) in-range "x" value and
+
105  // report the failure at the end.
+
106  retval = (bool)(reduceQuick(x_1) & 0x01);
+
107 
+
108  // Initialize the other temporary variables.
+
109  memset(x_2, 0, sizeof(x_2)); // x_2 = 1
+
110  x_2[0] = 1;
+
111  memset(z_2, 0, sizeof(z_2)); // z_2 = 0
+
112  memcpy(x_3, x_1, sizeof(x_1)); // x_3 = x
+
113  memcpy(z_3, x_2, sizeof(x_2)); // z_3 = 1
+
114 
+
115  // Iterate over all 255 bits of "s" from the highest to the lowest.
+
116  // We ignore the high bit of the 256-bit representation of "s".
+
117  mask = 0x40;
+
118  sposn = 31;
+
119  swap = 0;
+
120  for (uint8_t t = 255; t > 0; --t) {
+
121  // Conditional swaps on entry to this bit but only if we
+
122  // didn't swap on the previous bit.
+
123  select = s[sposn] & mask;
+
124  swap ^= select;
+
125  cswap(swap, x_2, x_3);
+
126  cswap(swap, z_2, z_3);
+
127 
+
128  // Evaluate the curve.
+
129  add(A, x_2, z_2); // A = x_2 + z_2
+
130  square(AA, A); // AA = A^2
+
131  sub(B, x_2, z_2); // B = x_2 - z_2
+
132  square(BB, B); // BB = B^2
+
133  sub(E, AA, BB); // E = AA - BB
+
134  add(C, x_3, z_3); // C = x_3 + z_3
+
135  sub(D, x_3, z_3); // D = x_3 - z_3
+
136  mul(DA, D, A); // DA = D * A
+
137  mul(CB, C, B); // CB = C * B
+
138  add(x_3, DA, CB); // x_3 = (DA + CB)^2
+
139  square(x_3, x_3);
+
140  sub(z_3, DA, CB); // z_3 = x_1 * (DA - CB)^2
+
141  square(z_3, z_3);
+
142  mul(z_3, z_3, x_1);
+
143  mul(x_2, AA, BB); // x_2 = AA * BB
+
144  mulA24(z_2, E); // z_2 = E * (AA + a24 * E)
+
145  add(z_2, z_2, AA);
+
146  mul(z_2, z_2, E);
+
147 
+
148  // Move onto the next lower bit of "s".
+
149  mask >>= 1;
+
150  if (!mask) {
+
151  --sposn;
+
152  mask = 0x80;
+
153  swap = select << 7;
+
154  } else {
+
155  swap = select >> 1;
+
156  }
+
157  }
+
158 
+
159  // Final conditional swaps.
+
160  cswap(swap, x_2, x_3);
+
161  cswap(swap, z_2, z_3);
+
162 
+
163  // Compute x_2 * (z_2 ^ (p - 2)) where p = 2^255 - 19.
+
164  recip(z_3, z_2);
+
165  mul(x_2, x_2, z_3);
+
166 
+
167  // Pack the result into the return array.
+
168  pack(result, x_2);
+
169 
+
170  // Clean up and exit.
+
171  clean(x_1);
+
172  clean(x_2);
+
173  clean(x_3);
+
174  clean(z_2);
+
175  clean(z_3);
+
176  clean(A);
+
177  clean(B);
+
178  clean(C);
+
179  clean(D);
+
180  clean(E);
+
181  clean(AA);
+
182  clean(BB);
+
183  clean(DA);
+
184  clean(CB);
+
185  return retval;
+
186 }
+
187 
+
231 void Curve25519::dh1(uint8_t k[32], uint8_t f[32])
+
232 {
+
233  do {
+
234  // Generate a random "f" value and then adjust the value to make
+
235  // it valid as an "s" value for eval(). According to the specification
+
236  // we need to mask off the 3 right-most bits of f[0], mask off the
+
237  // left-most bit of f[31], and set the second to left-most bit of f[31].
+
238  RNG.rand(f, 32);
+
239  f[0] &= 0xF8;
+
240  f[31] = (f[31] & 0x7F) | 0x40;
+
241 
+
242  // Evaluate the curve function: k = Curve25519::eval(f, 9).
+
243  // We pass NULL to eval() to indicate the value 9. There is no
+
244  // need to check the return value from eval() because we know
+
245  // that 9 is a valid field element.
+
246  eval(k, f, 0);
+
247 
+
248  // If "k" is weak for contributory behaviour then reject it,
+
249  // generate another "f" value, and try again. This case is
+
250  // highly unlikely but we still perform the check just in case.
+
251  } while (isWeakPoint(k));
+
252 }
+
253 
+
269 bool Curve25519::dh2(uint8_t k[32], uint8_t f[32])
+
270 {
+
271  uint8_t weak;
+
272 
+
273  // Evaluate the curve function: k = Curve25519::eval(f, k).
+
274  // If "k" is weak for contributory behaviour before or after
+
275  // the curve evaluation, then fail the exchange. For safety
+
276  // we perform every phase of the weak checks even if we could
+
277  // bail out earlier so that the execution takes the same
+
278  // amount of time for weak and non-weak "k" values.
+
279  weak = isWeakPoint(k); // Is "k" weak before?
+
280  weak |= ((eval(k, f, k) ^ 0x01) & 0x01); // Is "k" weak during?
+
281  weak |= isWeakPoint(k); // Is "k" weak after?
+
282  clean(f, 32);
+
283  return (bool)((weak ^ 0x01) & 0x01);
+
284 }
+
285 
+
293 uint8_t Curve25519::isWeakPoint(const uint8_t k[32])
+
294 {
+
295  // List of weak points from http://cr.yp.to/ecdh.html
+
296  // That page lists some others but they are variants on these
+
297  // of the form "point + i * (2^255 - 19)" for i = 0, 1, 2.
+
298  // Here we mask off the high bit and eval() catches the rest.
+
299  static const uint8_t points[5][32] PROGMEM = {
+
300  {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
301  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
302  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
303  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
+
304  {0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
305  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
306  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
307  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
+
308  {0xE0, 0xEB, 0x7A, 0x7C, 0x3B, 0x41, 0xB8, 0xAE,
+
309  0x16, 0x56, 0xE3, 0xFA, 0xF1, 0x9F, 0xC4, 0x6A,
+
310  0xDA, 0x09, 0x8D, 0xEB, 0x9C, 0x32, 0xB1, 0xFD,
+
311  0x86, 0x62, 0x05, 0x16, 0x5F, 0x49, 0xB8, 0x00},
+
312  {0x5F, 0x9C, 0x95, 0xBC, 0xA3, 0x50, 0x8C, 0x24,
+
313  0xB1, 0xD0, 0xB1, 0x55, 0x9C, 0x83, 0xEF, 0x5B,
+
314  0x04, 0x44, 0x5C, 0xC4, 0x58, 0x1C, 0x8E, 0x86,
+
315  0xD8, 0x22, 0x4E, 0xDD, 0xD0, 0x9F, 0x11, 0x57},
+
316  {0xEC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+
317  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+
318  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+
319  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F}
+
320  };
+
321 
+
322  // Check each of the weak points in turn. We perform the
+
323  // comparisons carefully so as not to reveal the value of "k"
+
324  // in the instruction timing. If "k" is indeed weak then
+
325  // we still check everything so as not to reveal which
+
326  // weak point it is.
+
327  uint8_t result = 0;
+
328  for (uint8_t posn = 0; posn < 5; ++posn) {
+
329  const uint8_t *point = points[posn];
+
330  uint8_t check = (pgm_read_byte(point + 31) ^ k[31]) & 0x7F;
+
331  for (uint8_t index = 31; index > 0; --index)
+
332  check |= (pgm_read_byte(point + index - 1) ^ k[index - 1]);
+
333  result |= (uint8_t)((((uint16_t)0x0100) - check) >> 8);
+
334  }
+
335 
+
336  // The "result" variable will be non-zero if there was a match.
+
337  return result;
+
338 }
+
339 
+
352 void Curve25519::reduce(limb_t *result, limb_t *x, uint8_t size)
+
353 {
+
354  /*
+
355  Note: This explaination is best viewed with a UTF-8 text viewer.
+
356 
+
357  To help explain what this function is doing, the following describes
+
358  how to efficiently compute reductions modulo a base of the form (2ⁿ - b)
+
359  where b is greater than zero and (b + 1)² <= 2ⁿ.
+
360 
+
361  Here we are interested in reducing the result of multiplying two
+
362  numbers that are less than or equal to (2ⁿ - b - 1). That is,
+
363  multiplying numbers that have already been reduced.
+
364 
+
365  Given some x less than or equal to (2ⁿ - b - 1)², we want to find a
+
366  y less than (2ⁿ - b) such that:
+
367 
+
368  y ≡ x mod (2ⁿ - b)
+
369 
+
370  We know that for all integer values of k >= 0:
+
371 
+
372  y ≡ x - k * (2ⁿ - b)
+
373  ≡ x - k * 2ⁿ + k * b
+
374 
+
375  In our case we choose k = ⌊x / 2ⁿ⌋ and then let:
+
376 
+
377  w = (x mod 2ⁿ) + ⌊x / 2ⁿ⌋ * b
+
378 
+
379  The value w will either be the answer y or y can be obtained by
+
380  repeatedly subtracting (2ⁿ - b) from w until it is less than (2ⁿ - b).
+
381  At most b subtractions will be required.
+
382 
+
383  In our case b is 19 which is more subtractions than we would like to do,
+
384  but we can handle that by performing the above reduction twice and then
+
385  performing a single trial subtraction:
+
386 
+
387  w = (x mod 2ⁿ) + ⌊x / 2ⁿ⌋ * b
+
388  y = (w mod 2ⁿ) + ⌊w / 2ⁿ⌋ * b
+
389  if y >= (2ⁿ - b)
+
390  y -= (2ⁿ - b)
+
391 
+
392  The value y is the answer we want for reducing x modulo (2ⁿ - b).
+
393  */
+
394 
+
395  dlimb_t carry;
+
396  uint8_t posn;
+
397 
+
398  // Calculate (x mod 2^255) + ((x / 2^255) * 19) which will
+
399  // either produce the answer we want or it will produce a
+
400  // value of the form "answer + j * (2^255 - 19)".
+
401  carry = ((dlimb_t)(x[NUM_LIMBS - 1] >> (LIMB_BITS - 1))) * 19U;
+
402  x[NUM_LIMBS - 1] &= ((((limb_t)1) << (LIMB_BITS - 1)) - 1);
+
403  for (posn = 0; posn < size; ++posn) {
+
404  carry += ((dlimb_t)(x[posn + NUM_LIMBS])) * 38U;
+
405  carry += x[posn];
+
406  x[posn] = (limb_t)carry;
+
407  carry >>= LIMB_BITS;
+
408  }
+
409  if (size < NUM_LIMBS) {
+
410  // The high order half of the number is short; e.g. for mulA24().
+
411  // Propagate the carry through the rest of the low order part.
+
412  for (posn = size; posn < NUM_LIMBS; ++posn) {
+
413  carry += x[posn];
+
414  x[posn] = (limb_t)carry;
+
415  carry >>= LIMB_BITS;
+
416  }
+
417  }
+
418 
+
419  // The "j" value may still be too large due to the final carry-out.
+
420  // We must repeat the reduction. If we already have the answer,
+
421  // then this won't do any harm but we must still do the calculation
+
422  // to preserve the overall timing.
+
423  carry *= 38U;
+
424  carry += ((dlimb_t)(x[NUM_LIMBS - 1] >> (LIMB_BITS - 1))) * 19U;
+
425  x[NUM_LIMBS - 1] &= ((((limb_t)1) << (LIMB_BITS - 1)) - 1);
+
426  for (posn = 0; posn < NUM_LIMBS; ++posn) {
+
427  carry += x[posn];
+
428  x[posn] = (limb_t)carry;
+
429  carry >>= LIMB_BITS;
+
430  }
+
431 
+
432  // At this point "x" will either be the answer or it will be the
+
433  // answer plus (2^255 - 19). Perform a trial subtraction which
+
434  // is equivalent to adding 19 and subtracting 2^255. We put the
+
435  // trial answer into the top-most limbs of the original "x" array.
+
436  // We add 19 here; the subtraction of 2^255 occurs in the next step.
+
437  carry = 19U;
+
438  for (posn = 0; posn < NUM_LIMBS; ++posn) {
+
439  carry += x[posn];
+
440  x[posn + NUM_LIMBS] = (limb_t)carry;
+
441  carry >>= LIMB_BITS;
+
442  }
+
443 
+
444  // If there was a borrow, then the bottom-most limbs of "x" are the
+
445  // correct answer. If there was no borrow, then the top-most limbs
+
446  // of "x" are the correct answer. Select the correct answer but do
+
447  // it in a way that instruction timing will not reveal which value
+
448  // was selected. Borrow will occur if the high bit of the previous
+
449  // result is 0: turn the high bit into a selection mask.
+
450  limb_t mask = (limb_t)(((slimb_t)(x[NUM_LIMBS * 2 - 1])) >> (LIMB_BITS - 1));
+
451  limb_t nmask = ~mask;
+
452  x[NUM_LIMBS * 2 - 1] &= ((((limb_t)1) << (LIMB_BITS - 1)) - 1);
+
453  for (posn = 0; posn < NUM_LIMBS; ++posn) {
+
454  result[posn] = (x[posn] & nmask) | (x[posn + NUM_LIMBS] & mask);
+
455  }
+
456 }
+
457 
+
471 Curve25519::limb_t Curve25519::reduceQuick(limb_t *x)
+
472 {
+
473  limb_t temp[NUM_LIMBS];
+
474  dlimb_t carry;
+
475  uint8_t posn;
+
476 
+
477  // Perform a trial subtraction of (2^255 - 19) from "x" which is
+
478  // equivalent to adding 19 and subtracting 2^255. We add 19 here;
+
479  // the subtraction of 2^255 occurs in the next step.
+
480  carry = 19U;
+
481  for (posn = 0; posn < NUM_LIMBS; ++posn) {
+
482  carry += x[posn];
+
483  temp[posn] = (limb_t)carry;
+
484  carry >>= LIMB_BITS;
+
485  }
+
486 
+
487  // If there was a borrow, then the original "x" is the correct answer.
+
488  // If there was no borrow, then "temp" is the correct answer. Select the
+
489  // correct answer but do it in a way that instruction timing will not
+
490  // reveal which value was selected. Borrow will occur if the high bit
+
491  // of "temp" is 0: turn the high bit into a selection mask.
+
492  limb_t mask = (limb_t)(((slimb_t)(temp[NUM_LIMBS - 1])) >> (LIMB_BITS - 1));
+
493  limb_t nmask = ~mask;
+
494  temp[NUM_LIMBS - 1] &= ((((limb_t)1) << (LIMB_BITS - 1)) - 1);
+
495  for (posn = 0; posn < NUM_LIMBS; ++posn) {
+
496  x[posn] = (x[posn] & nmask) | (temp[posn] & mask);
+
497  }
+
498 
+
499  // Clean up "temp".
+
500  clean(temp);
+
501 
+
502  // Return a zero value if we actually subtracted (2^255 - 19) from "x".
+
503  return nmask;
+
504 }
+
505 
+
516 void Curve25519::mul(limb_t *result, const limb_t *x, const limb_t *y)
+
517 {
+
518  limb_t temp[NUM_LIMBS * 2];
+
519  uint8_t i, j;
+
520  dlimb_t carry;
+
521  limb_t word;
+
522 
+
523  // Multiply the lowest word of x by y.
+
524  carry = 0;
+
525  word = x[0];
+
526  for (i = 0; i < NUM_LIMBS; ++i) {
+
527  carry += ((dlimb_t)(y[i])) * word;
+
528  temp[i] = (limb_t)carry;
+
529  carry >>= LIMB_BITS;
+
530  }
+
531  temp[NUM_LIMBS] = (limb_t)carry;
+
532 
+
533  // Multiply and add the remaining words of x by y.
+
534  for (i = 1; i < NUM_LIMBS; ++i) {
+
535  word = x[i];
+
536  carry = 0;
+
537  for (j = 0; j < NUM_LIMBS; ++j) {
+
538  carry += ((dlimb_t)(y[j])) * word;
+
539  carry += temp[i + j];
+
540  temp[i + j] = (limb_t)carry;
+
541  carry >>= LIMB_BITS;
+
542  }
+
543  temp[i + NUM_LIMBS] = (limb_t)carry;
+
544  }
+
545 
+
546  // Reduce the intermediate result modulo 2^255 - 19.
+
547  reduce(result, temp, NUM_LIMBS);
+
548  clean(temp);
+
549 }
+
550 
+
570 void Curve25519::mulA24(limb_t *result, const limb_t *x)
+
571 {
+
572  // The constant a24 = 121665 (0x1DB41) as a limb array.
+
573 #if CURVE25519_LIMB_8BIT
+
574  static limb_t const a24[3] PROGMEM = {0x41, 0xDB, 0x01};
+
575  #define pgm_read_a24(index) (pgm_read_byte(&(a24[(index)])))
+
576 #elif CURVE25519_LIMB_16BIT
+
577  static limb_t const a24[2] PROGMEM = {0xDB41, 0x0001};
+
578  #define pgm_read_a24(index) (pgm_read_word(&(a24[(index)])))
+
579 #elif CURVE25519_LIMB_32BIT
+
580  static limb_t const a24[1] PROGMEM = {0x0001DB41};
+
581  #define pgm_read_a24(index) (pgm_read_dword(&(a24[(index)])))
+
582 #else
+
583  #error "limb_t must be 8, 16, or 32 bits in size"
+
584 #endif
+
585  #define NUM_A24_LIMBS (sizeof(a24) / sizeof(limb_t))
+
586 
+
587  // Multiply the lowest limb of a24 by x and zero-extend into the result.
+
588  limb_t temp[NUM_LIMBS * 2];
+
589  uint8_t i, j;
+
590  dlimb_t carry = 0;
+
591  limb_t word = pgm_read_a24(0);
+
592  for (i = 0; i < NUM_LIMBS; ++i) {
+
593  carry += ((dlimb_t)(x[i])) * word;
+
594  temp[i] = (limb_t)carry;
+
595  carry >>= LIMB_BITS;
+
596  }
+
597  temp[NUM_LIMBS] = (limb_t)carry;
+
598 
+
599  // Multiply and add the remaining limbs of a24.
+
600  for (i = 1; i < NUM_A24_LIMBS; ++i) {
+
601  word = pgm_read_a24(i);
+
602  carry = 0;
+
603  for (j = 0; j < NUM_LIMBS; ++j) {
+
604  carry += ((dlimb_t)(x[j])) * word;
+
605  carry += temp[i + j];
+
606  temp[i + j] = (limb_t)carry;
+
607  carry >>= LIMB_BITS;
+
608  }
+
609  temp[i + NUM_LIMBS] = (limb_t)carry;
+
610  }
+
611 
+
612  // Reduce the intermediate result modulo 2^255 - 19.
+
613  reduce(result, temp, NUM_A24_LIMBS);
+
614  clean(temp);
+
615 }
+
616 
+
627 void Curve25519::add(limb_t *result, const limb_t *x, const limb_t *y)
+
628 {
+
629  dlimb_t carry = 0;
+
630  uint8_t posn;
+
631 
+
632  // Add the two arrays to obtain the intermediate result.
+
633  for (posn = 0; posn < NUM_LIMBS; ++posn) {
+
634  carry += x[posn];
+
635  carry += y[posn];
+
636  result[posn] = (limb_t)carry;
+
637  carry >>= LIMB_BITS;
+
638  }
+
639 
+
640  // Reduce the result using the quick trial subtraction method.
+
641  reduceQuick(result);
+
642 }
+
643 
+
654 void Curve25519::sub(limb_t *result, const limb_t *x, const limb_t *y)
+
655 {
+
656  dlimb_t borrow;
+
657  uint8_t posn;
+
658 
+
659  // Subtract y from x to generate the intermediate result.
+
660  borrow = 0;
+
661  for (posn = 0; posn < NUM_LIMBS; ++posn) {
+
662  borrow = ((dlimb_t)x[posn]) - y[posn] - ((borrow >> LIMB_BITS) & 0x01);
+
663  result[posn] = (limb_t)borrow;
+
664  }
+
665 
+
666  // If we had a borrow, then the result has gone negative and we
+
667  // have to add 2^255 - 19 to the result to make it positive again.
+
668  // The top bits of "borrow" will be all 1's if there is a borrow
+
669  // or it will be all 0's if there was no borrow. Easiest is to
+
670  // conditionally subtract 19 and then mask off the high bit.
+
671  borrow = (borrow >> LIMB_BITS) & 19U;
+
672  borrow = ((dlimb_t)result[0]) - borrow;
+
673  result[0] = (limb_t)borrow;
+
674  for (posn = 1; posn < NUM_LIMBS; ++posn) {
+
675  borrow = ((dlimb_t)result[posn]) - ((borrow >> LIMB_BITS) & 0x01);
+
676  result[posn] = (limb_t)borrow;
+
677  }
+
678  result[NUM_LIMBS - 1] &= ((((limb_t)1) << (LIMB_BITS - 1)) - 1);
+
679 }
+
680 
+
691 void Curve25519::cswap(uint8_t select, limb_t *x, limb_t *y)
+
692 {
+
693  uint8_t posn;
+
694  limb_t dummy;
+
695  limb_t sel;
+
696 
+
697  // Turn "select" into an all-zeroes or all-ones mask. We don't care
+
698  // which bit or bits is set in the original "select" value.
+
699  sel = (limb_t)(((((dlimb_t)1) << LIMB_BITS) - select) >> LIMB_BITS);
+
700  --sel;
+
701 
+
702  // Swap the two values based on "select". Algorithm from:
+
703  // https://tools.ietf.org/html/draft-irtf-cfrg-curves-02
+
704  for (posn = 0; posn < NUM_LIMBS; ++posn) {
+
705  dummy = sel & (x[posn] ^ y[posn]);
+
706  x[posn] ^= dummy;
+
707  y[posn] ^= dummy;
+
708  }
+
709 }
+
710 
+
718 void Curve25519::recip(limb_t *result, const limb_t *x)
+
719 {
+
720  limb_t t1[NUM_LIMBS];
+
721  uint8_t i, j;
+
722 
+
723  // The reciprocal is the same as x ^ (p - 2) where p = 2^255 - 19.
+
724  // The big-endian hexadecimal expansion of (p - 2) is:
+
725  // 7FFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFEB
+
726  //
+
727  // The naive implementation needs to do 2 multiplications per 1 bit and
+
728  // 1 multiplication per 0 bit. We can improve upon this by creating a
+
729  // pattern 0000000001 ... 0000000001. If we square and multiply the
+
730  // pattern by itself we can turn the pattern into the partial results
+
731  // 0000000011 ... 0000000011, 0000000111 ... 0000000111, etc.
+
732  // This averages out to about 1.1 multiplications per 1 bit instead of 2.
+
733 
+
734  // Build a pattern of 250 bits in length of repeated copies of 0000000001.
+
735  #define RECIP_GROUP_SIZE 10
+
736  #define RECIP_GROUP_BITS 250 // Must be a multiple of RECIP_GROUP_SIZE.
+
737  square(t1, x);
+
738  for (j = 0; j < (RECIP_GROUP_SIZE - 1); ++j)
+
739  square(t1, t1);
+
740  mul(result, t1, x);
+
741  for (i = 0; i < ((RECIP_GROUP_BITS / RECIP_GROUP_SIZE) - 2); ++i) {
+
742  for (j = 0; j < RECIP_GROUP_SIZE; ++j)
+
743  square(t1, t1);
+
744  mul(result, result, t1);
+
745  }
+
746 
+
747  // Multiply bit-shifted versions of the 0000000001 pattern into
+
748  // the result to "fill in" the gaps in the pattern.
+
749  square(t1, result);
+
750  mul(result, result, t1);
+
751  for (j = 0; j < (RECIP_GROUP_SIZE - 2); ++j) {
+
752  square(t1, t1);
+
753  mul(result, result, t1);
+
754  }
+
755 
+
756  // Deal with the 5 lowest bits of (p - 2), 01011, from highest to lowest.
+
757  square(result, result);
+
758  square(result, result);
+
759  mul(result, result, x);
+
760  square(result, result);
+
761  square(result, result);
+
762  mul(result, result, x);
+
763  square(result, result);
+
764  mul(result, result, x);
+
765 
+
766  // Clean up and exit.
+
767  clean(t1);
+
768 }
+
769 
+
782 void Curve25519::unpack(limb_t *result, const uint8_t *x)
+
783 {
+
784 #if CURVE25519_LIMB_8BIT
+
785  memcpy(result, x, 32);
+
786  result[31] &= 0x7F;
+
787 #elif CURVE25519_LIMB_16BIT
+
788  for (uint8_t posn = 0; posn < 16; ++posn) {
+
789  result[posn] = ((limb_t)x[posn * 2]) | (((limb_t)x[posn * 2 + 1]) << 8);
+
790  }
+
791  result[15] &= 0x7FFF;
+
792 #elif CURVE25519_LIMB_32BIT
+
793  for (uint8_t posn = 0; posn < 8; ++posn) {
+
794  result[posn] = ((limb_t)x[posn * 4]) |
+
795  (((limb_t)x[posn * 4 + 1]) << 8) |
+
796  (((limb_t)x[posn * 4 + 2]) << 16) |
+
797  (((limb_t)x[posn * 4 + 3]) << 24);
+
798  }
+
799  result[7] &= 0x7FFFFFFF;
+
800 #endif
+
801 }
+
802 
+
812 void Curve25519::pack(uint8_t *result, const limb_t *x)
+
813 {
+
814 #if CURVE25519_LIMB_8BIT
+
815  memcpy(result, x, 32);
+
816 #elif CURVE25519_LIMB_16BIT
+
817  for (uint8_t posn = 0; posn < 16; ++posn) {
+
818  limb_t value = x[posn];
+
819  result[posn * 2] = (uint8_t)value;
+
820  result[posn * 2 + 1] = (uint8_t)(value >> 8);
+
821  }
+
822 #elif CURVE25519_LIMB_32BIT
+
823  for (uint8_t posn = 0; posn < 8; ++posn) {
+
824  limb_t value = x[posn];
+
825  result[posn * 4] = (uint8_t)value;
+
826  result[posn * 4 + 1] = (uint8_t)(value >> 8);
+
827  result[posn * 4 + 2] = (uint8_t)(value >> 16);
+
828  result[posn * 4 + 3] = (uint8_t)(value >> 24);
+
829  }
+
830 #endif
+
831 }
+
void rand(uint8_t *data, size_t len)
Generates random bytes into a caller-supplied buffer.
Definition: RNG.cpp:277
+
static bool eval(uint8_t result[32], const uint8_t s[32], const uint8_t x[32])
Evaluates the raw Curve25519 function.
Definition: Curve25519.cpp:68
+
static void dh1(uint8_t k[32], uint8_t f[32])
Performs phase 1 of a Diffie-Hellman key exchange using Curve25519.
Definition: Curve25519.cpp:231
+
static bool dh2(uint8_t k[32], uint8_t f[32])
Performs phase 2 of a Diffie-Hellman key exchange using Curve25519.
Definition: Curve25519.cpp:269
+
+ + + + diff --git a/Curve25519_8h_source.html b/Curve25519_8h_source.html new file mode 100644 index 00000000..f128c790 --- /dev/null +++ b/Curve25519_8h_source.html @@ -0,0 +1,196 @@ + + + + + + +ArduinoLibs: Curve25519.h Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
Curve25519.h
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #ifndef CRYPTO_CURVE15519_h
+
24 #define CRYPTO_CURVE15519_h
+
25 
+
26 #include <inttypes.h>
+
27 #include <stddef.h>
+
28 
+
29 // Define exactly one of these to 1 to set the size of the basic limb type.
+
30 // 16-bit limbs seems to give the best performance on 8-bit AVR micros.
+
31 #define CURVE25519_LIMB_8BIT 0
+
32 #define CURVE25519_LIMB_16BIT 1
+
33 #define CURVE25519_LIMB_32BIT 0
+
34 
+ +
36 {
+
37 public:
+
38  static bool eval(uint8_t result[32], const uint8_t s[32], const uint8_t x[32]);
+
39 
+
40  static void dh1(uint8_t k[32], uint8_t f[32]);
+
41  static bool dh2(uint8_t k[32], uint8_t f[32]);
+
42 
+
43 #if defined(TEST_CURVE25519_FIELD_OPS)
+
44 public:
+
45 #else
+
46 private:
+
47 #endif
+
48  // Define the limb types to use on this platform.
+
49  #if CURVE25519_LIMB_8BIT
+
50  typedef uint8_t limb_t;
+
51  typedef int8_t slimb_t;
+
52  typedef uint16_t dlimb_t;
+
53  #elif CURVE25519_LIMB_16BIT
+
54  typedef uint16_t limb_t;
+
55  typedef int16_t slimb_t;
+
56  typedef uint32_t dlimb_t;
+
57  #elif CURVE25519_LIMB_32BIT
+
58  typedef uint32_t limb_t;
+
59  typedef int32_t slimb_t;
+
60  typedef uint64_t dlimb_t;
+
61  #else
+
62  #error "limb_t must be 8, 16, or 32 bits in size"
+
63  #endif
+
64 
+
65  static uint8_t isWeakPoint(const uint8_t k[32]);
+
66 
+
67  static void reduce(limb_t *result, limb_t *x, uint8_t size);
+
68  static limb_t reduceQuick(limb_t *x);
+
69 
+
70  static void mul(limb_t *result, const limb_t *x, const limb_t *y);
+
71  static void square(limb_t *result, const limb_t *x)
+
72  {
+
73  mul(result, x, x);
+
74  }
+
75 
+
76  static void mulA24(limb_t *result, const limb_t *x);
+
77 
+
78  static void add(limb_t *result, const limb_t *x, const limb_t *y);
+
79  static void sub(limb_t *result, const limb_t *x, const limb_t *y);
+
80 
+
81  static void cswap(uint8_t select, limb_t *x, limb_t *y);
+
82 
+
83  static void recip(limb_t *result, const limb_t *x);
+
84 
+
85  static void unpack(limb_t *result, const uint8_t *x);
+
86  static void pack(uint8_t *result, const limb_t *x);
+
87 
+
88  // Constructor and destructor are private - cannot instantiate this class.
+
89  Curve25519() {}
+
90  ~Curve25519() {}
+
91 };
+
92 
+
93 #endif
+
Diffie-Hellman key agreement based on the elliptic curve modulo 2^255 - 19.
Definition: Curve25519.h:35
+
static bool eval(uint8_t result[32], const uint8_t s[32], const uint8_t x[32])
Evaluates the raw Curve25519 function.
Definition: Curve25519.cpp:68
+
static void dh1(uint8_t k[32], uint8_t f[32])
Performs phase 1 of a Diffie-Hellman key exchange using Curve25519.
Definition: Curve25519.cpp:231
+
static bool dh2(uint8_t k[32], uint8_t f[32])
Performs phase 2 of a Diffie-Hellman key exchange using Curve25519.
Definition: Curve25519.cpp:269
+
+ + + + diff --git a/DMD_8cpp_source.html b/DMD_8cpp_source.html index 30e75d92..656e3ce5 100644 --- a/DMD_8cpp_source.html +++ b/DMD_8cpp_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: DMD.cpp Source File @@ -29,7 +30,7 @@ - + @@ -139,8 +140,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
225 #define DMD_REFRESH_MS 5
226 #define DMD_REFRESH_US 5000
227 
-
237 DMD::DMD(int widthPanels, int heightPanels)
-
238  : Bitmap(widthPanels * DMD_NUM_COLUMNS, heightPanels * DMD_NUM_ROWS)
+
237 DMD::DMD(int widthPanels, int heightPanels)
+
238  : Bitmap(widthPanels * DMD_NUM_COLUMNS, heightPanels * DMD_NUM_ROWS)
239  , _doubleBuffer(false)
240  , phase(0)
241  , fb0(0)
@@ -177,7 +178,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
272  digitalWrite(DMD_PIN_SPI_MOSI, HIGH);
273 }
274 
-
278 DMD::~DMD()
+
278 DMD::~DMD()
279 {
280  if (fb0)
281  free(fb0);
@@ -186,10 +187,10 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
284  fb = 0; // Don't free the buffer again in the base class.
285 }
286 
-
314 void DMD::setDoubleBuffer(bool doubleBuffer)
+
314 void DMD::setDoubleBuffer(bool doubleBuffer)
315 {
316  if (doubleBuffer != _doubleBuffer) {
-
317  _doubleBuffer = doubleBuffer;
+
317  _doubleBuffer = doubleBuffer;
318  if (doubleBuffer) {
319  // Allocate a new back buffer.
320  unsigned int size = _stride * _height;
@@ -221,7 +222,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
346  }
347 }
348 
-
363 void DMD::swapBuffers()
+
363 void DMD::swapBuffers()
364 {
365  if (_doubleBuffer) {
366  // Turn off interrupts while swapping buffers so that we don't
@@ -238,19 +239,19 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
377  }
378 }
379 
-
396 void DMD::swapBuffersAndCopy()
+
396 void DMD::swapBuffersAndCopy()
397 {
-
398  swapBuffers();
+
398  swapBuffers();
399  if (_doubleBuffer)
400  memcpy(fb, displayfb, _stride * _height);
401 }
402 
-
420 void DMD::loop()
+
420 void DMD::loop()
421 {
422  unsigned long currentTime = millis();
423  if ((currentTime - lastRefresh) >= DMD_REFRESH_MS) {
424  lastRefresh = currentTime;
-
425  refresh();
+
425  refresh();
426  }
427 }
428 
@@ -288,7 +289,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
460  0x3F, 0xBF, 0x7F, 0xFF
461 };
462 
-
478 void DMD::refresh()
+
478 void DMD::refresh()
479 {
480  // Bail out if there is a conflict on the SPI bus.
481  if (!digitalRead(DMD_PIN_SPI_SS))
@@ -347,7 +348,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
534  phase = (phase + 1) & 0x03;
535 }
536 
-
563 void DMD::enableTimer1()
+
563 void DMD::enableTimer1()
564 {
565  // Number of CPU cycles in the display's refresh period.
566  unsigned long numCycles = (F_CPU / 2000000) * DMD_REFRESH_US;
@@ -393,13 +394,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
606  TIMSK1 |= _BV(TOIE1);
607 }
608 
-
614 void DMD::disableTimer1()
+
614 void DMD::disableTimer1()
615 {
616  // Turn off the Timer1 overflow interrupt.
617  TIMSK1 &= ~_BV(TOIE1);
618 }
619 
-
646 void DMD::enableTimer2()
+
646 void DMD::enableTimer2()
647 {
648  // Configure Timer2 for the period we want. With the prescaler set
649  // to 128, then 256 increments of Timer2 gives roughly 4 ms between
@@ -422,25 +423,42 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
666  TIMSK2 = _BV(TOIE2);
667 }
668 
-
674 void DMD::disableTimer2()
+
674 void DMD::disableTimer2()
675 {
676  // Turn off the Timer2 overflow interrupt.
677  TIMSK2 &= ~_BV(TOIE2);
678 }
679 
-
690 DMD::Color DMD::fromRGB(uint8_t r, uint8_t g, uint8_t b)
+
690 DMD::Color DMD::fromRGB(uint8_t r, uint8_t g, uint8_t b)
691 {
692  if (r || g || b)
-
693  return White;
+
693  return White;
694  else
-
695  return Black;
+
695  return Black;
696 }
+
DMD::disableTimer1
void disableTimer1()
Disables Timer1 overflow interrupts.
Definition: DMD.cpp:614
+
DMD::loop
void loop()
Performs regular display refresh activities from the application's main loop.
Definition: DMD.cpp:420
+
DMD::disableTimer2
void disableTimer2()
Disables Timer2 overflow interrupts.
Definition: DMD.cpp:674
+
Bitmap
Represents a monochrome bitmap within main memory.
Definition: Bitmap.h:32
+
DMD::doubleBuffer
bool doubleBuffer() const
Returns true if the display is double-buffered; false if single-buffered. The default is false...
Definition: DMD.h:34
+
DMD::swapBuffers
void swapBuffers()
Swaps the buffers that are used for rendering to the display.
Definition: DMD.cpp:363
+
DMD::enableTimer1
void enableTimer1()
Enables Timer1 overflow interrupts for updating this display.
Definition: DMD.cpp:563
+
DMD::~DMD
~DMD()
Destroys this dot matrix display handler.
Definition: DMD.cpp:278
+
Bitmap::Color
uint8_t Color
Type that represents the color of a pixel in a bitmap.
Definition: Bitmap.h:40
+
DMD::swapBuffersAndCopy
void swapBuffersAndCopy()
Swaps the buffers that are used for rendering to the display and copies the former back buffer conten...
Definition: DMD.cpp:396
+
DMD::DMD
DMD(int widthPanels=1, int heightPanels=1)
Constructs a new dot matrix display handler for a display that is widthPanels x heightPanels in size...
Definition: DMD.cpp:237
+
DMD::enableTimer2
void enableTimer2()
Enables Timer2 overflow interrupts for updating this display.
Definition: DMD.cpp:646
+
DMD::fromRGB
static Color fromRGB(uint8_t r, uint8_t g, uint8_t b)
Converts an RGB value into a pixel color value.
Definition: DMD.cpp:690
+
Bitmap::White
static const Color White
Color value corresponding to "white". If the bitmap is displayed on a LED array, then it may have a d...
Definition: Bitmap.h:45
+
DMD::refresh
void refresh()
Refresh the display.
Definition: DMD.cpp:478
+
DMD::setDoubleBuffer
void setDoubleBuffer(bool doubleBuffer)
Enables or disables double-buffering according to doubleBuffer.
Definition: DMD.cpp:314
+
Bitmap::Black
static const Color Black
Color value corresponding to "black".
Definition: Bitmap.h:44
diff --git a/DMD_8h_source.html b/DMD_8h_source.html index 7986e95b..ddd1cc79 100644 --- a/DMD_8h_source.html +++ b/DMD_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: DMD.h Source File @@ -29,7 +30,7 @@ - + @@ -114,32 +115,32 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
25 
26 #include "Bitmap.h"
27 
-
28 class DMD : public Bitmap
+
28 class DMD : public Bitmap
29 {
30 public:
-
31  explicit DMD(int widthPanels = 1, int heightPanels = 1);
-
32  ~DMD();
+
31  explicit DMD(int widthPanels = 1, int heightPanels = 1);
+
32  ~DMD();
33 
-
34  bool doubleBuffer() const { return _doubleBuffer; }
-
35  void setDoubleBuffer(bool doubleBuffer);
-
36  void swapBuffers();
-
37  void swapBuffersAndCopy();
+
34  bool doubleBuffer() const { return _doubleBuffer; }
+
35  void setDoubleBuffer(bool doubleBuffer);
+
36  void swapBuffers();
+
37  void swapBuffersAndCopy();
38 
-
39  void loop();
-
40  void refresh();
+
39  void loop();
+
40  void refresh();
41 
-
42  void enableTimer1();
-
43  void disableTimer1();
+
42  void enableTimer1();
+
43  void disableTimer1();
44 
-
45  void enableTimer2();
-
46  void disableTimer2();
+
45  void enableTimer2();
+
46  void disableTimer2();
47 
-
48  static Color fromRGB(uint8_t r, uint8_t g, uint8_t b);
+
48  static Color fromRGB(uint8_t r, uint8_t g, uint8_t b);
49 
50 private:
51  // Disable copy constructor and operator=().
-
52  DMD(const DMD &other) : Bitmap(other) {}
-
53  DMD &operator=(const DMD &) { return *this; }
+
52  DMD(const DMD &other) : Bitmap(other) {}
+
53  DMD &operator=(const DMD &) { return *this; }
54 
55  bool _doubleBuffer;
56  uint8_t phase;
@@ -150,12 +151,28 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
61 };
62 
63 #endif
+
DMD
Handle large dot matrix displays composed of LED's.
Definition: DMD.h:28
+
DMD::disableTimer1
void disableTimer1()
Disables Timer1 overflow interrupts.
Definition: DMD.cpp:614
+
DMD::loop
void loop()
Performs regular display refresh activities from the application's main loop.
Definition: DMD.cpp:420
+
DMD::disableTimer2
void disableTimer2()
Disables Timer2 overflow interrupts.
Definition: DMD.cpp:674
+
Bitmap
Represents a monochrome bitmap within main memory.
Definition: Bitmap.h:32
+
DMD::doubleBuffer
bool doubleBuffer() const
Returns true if the display is double-buffered; false if single-buffered. The default is false...
Definition: DMD.h:34
+
DMD::swapBuffers
void swapBuffers()
Swaps the buffers that are used for rendering to the display.
Definition: DMD.cpp:363
+
DMD::enableTimer1
void enableTimer1()
Enables Timer1 overflow interrupts for updating this display.
Definition: DMD.cpp:563
+
DMD::~DMD
~DMD()
Destroys this dot matrix display handler.
Definition: DMD.cpp:278
+
Bitmap::Color
uint8_t Color
Type that represents the color of a pixel in a bitmap.
Definition: Bitmap.h:40
+
DMD::swapBuffersAndCopy
void swapBuffersAndCopy()
Swaps the buffers that are used for rendering to the display and copies the former back buffer conten...
Definition: DMD.cpp:396
+
DMD::DMD
DMD(int widthPanels=1, int heightPanels=1)
Constructs a new dot matrix display handler for a display that is widthPanels x heightPanels in size...
Definition: DMD.cpp:237
+
DMD::enableTimer2
void enableTimer2()
Enables Timer2 overflow interrupts for updating this display.
Definition: DMD.cpp:646
+
DMD::fromRGB
static Color fromRGB(uint8_t r, uint8_t g, uint8_t b)
Converts an RGB value into a pixel color value.
Definition: DMD.cpp:690
+
DMD::refresh
void refresh()
Refresh the display.
Definition: DMD.cpp:478
+
DMD::setDoubleBuffer
void setDoubleBuffer(bool doubleBuffer)
Enables or disables double-buffering according to doubleBuffer.
Definition: DMD.cpp:314
diff --git a/DS1307RTC_8cpp_source.html b/DS1307RTC_8cpp_source.html index dd2a90c1..dc4a6b5d 100644 --- a/DS1307RTC_8cpp_source.html +++ b/DS1307RTC_8cpp_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: DS1307RTC.cpp Source File @@ -29,7 +30,7 @@ - + @@ -136,17 +137,17 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
70 #define DS1307_ALARMS (64 - RTC::ALARM_COUNT * DS1307_ALARM_SIZE - 1)
71 #define DS1307_ALARM_MAGIC 63
72 
-
83 DS1307RTC::DS1307RTC(I2CMaster &bus, uint8_t oneHzPin)
+
83 DS1307RTC::DS1307RTC(I2CMaster &bus, uint8_t oneHzPin)
84  : _bus(&bus)
85  , _oneHzPin(oneHzPin)
86  , prevOneHz(false)
87  , _isRealTime(true)
88 {
89  // Make sure the CH bit in register 0 is off or the clock won't update.
-
90  _bus->startWrite(DS1307_I2C_ADDRESS);
-
91  _bus->write(DS1307_SECOND);
-
92  if (_bus->startRead(DS1307_I2C_ADDRESS, 1)) {
-
93  uint8_t value = _bus->read();
+
90  _bus->startWrite(DS1307_I2C_ADDRESS);
+
91  _bus->write(DS1307_SECOND);
+
92  if (_bus->startRead(DS1307_I2C_ADDRESS, 1)) {
+
93  uint8_t value = _bus->read();
94  if ((value & 0x80) != 0)
95  writeRegister(DS1307_SECOND, value & 0x7F);
96  } else {
@@ -166,7 +167,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
110  initAlarms();
111 }
112 
-
118 bool DS1307RTC::hasUpdates()
+
118 bool DS1307RTC::hasUpdates()
119 {
120  // If not using a 1 Hz pin or there is no RTC chip available,
121  // then assume that there is an update available.
@@ -205,43 +206,43 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
154  }
155 }
156 
-
157 void DS1307RTC::readTime(RTCTime *value)
+
157 void DS1307RTC::readTime(RTCTime *value)
158 {
159  if (_isRealTime) {
-
160  _bus->startWrite(DS1307_I2C_ADDRESS);
-
161  _bus->write(DS1307_SECOND);
-
162  if (_bus->startRead(DS1307_I2C_ADDRESS, 3)) {
-
163  value->second = fromBCD(_bus->read() & 0x7F);
-
164  value->minute = fromBCD(_bus->read());
-
165  value->hour = fromHourBCD(_bus->read());
+
160  _bus->startWrite(DS1307_I2C_ADDRESS);
+
161  _bus->write(DS1307_SECOND);
+
162  if (_bus->startRead(DS1307_I2C_ADDRESS, 3)) {
+
163  value->second = fromBCD(_bus->read() & 0x7F);
+
164  value->minute = fromBCD(_bus->read());
+
165  value->hour = fromHourBCD(_bus->read());
166  } else {
167  // RTC chip is not responding.
-
168  value->second = 0;
-
169  value->minute = 0;
-
170  value->hour = 0;
+
168  value->second = 0;
+
169  value->minute = 0;
+
170  value->hour = 0;
171  }
172  } else {
-
173  RTC::readTime(value);
+
173  RTC::readTime(value);
174  }
175 }
176 
-
177 void DS1307RTC::readDate(RTCDate *value)
+
177 void DS1307RTC::readDate(RTCDate *value)
178 {
179  if (!_isRealTime) {
-
180  RTC::readDate(value);
+
180  RTC::readDate(value);
181  return;
182  }
-
183  _bus->startWrite(DS1307_I2C_ADDRESS);
-
184  _bus->write(DS1307_DATE);
-
185  if (_bus->startRead(DS1307_I2C_ADDRESS, 3)) {
-
186  value->day = fromBCD(_bus->read());
-
187  value->month = fromBCD(_bus->read());
-
188  value->year = fromBCD(_bus->read()) + 2000;
+
183  _bus->startWrite(DS1307_I2C_ADDRESS);
+
184  _bus->write(DS1307_DATE);
+
185  if (_bus->startRead(DS1307_I2C_ADDRESS, 3)) {
+
186  value->day = fromBCD(_bus->read());
+
187  value->month = fromBCD(_bus->read());
+
188  value->year = fromBCD(_bus->read()) + 2000;
189  } else {
190  // RTC chip is not responding.
-
191  value->day = 1;
-
192  value->month = 1;
-
193  value->year = 2000;
+
191  value->day = 1;
+
192  value->month = 1;
+
193  value->year = 2000;
194  }
195 }
196 
@@ -250,135 +251,173 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
199  return ((value / 10) << 4) + (value % 10);
200 }
201 
-
202 void DS1307RTC::writeTime(const RTCTime *value)
+
202 void DS1307RTC::writeTime(const RTCTime *value)
203 {
204  if (_isRealTime) {
-
205  _bus->startWrite(DS1307_I2C_ADDRESS);
-
206  _bus->write(DS1307_SECOND);
-
207  _bus->write(toBCD(value->second));
-
208  _bus->write(toBCD(value->minute));
-
209  _bus->write(toBCD(value->hour)); // Changes mode to 24-hour clock.
-
210  _bus->endWrite();
+
205  _bus->startWrite(DS1307_I2C_ADDRESS);
+
206  _bus->write(DS1307_SECOND);
+
207  _bus->write(toBCD(value->second));
+
208  _bus->write(toBCD(value->minute));
+
209  _bus->write(toBCD(value->hour)); // Changes mode to 24-hour clock.
+
210  _bus->endWrite();
211  } else {
-
212  RTC::writeTime(value);
+
212  RTC::writeTime(value);
213  }
214 }
215 
-
216 void DS1307RTC::writeDate(const RTCDate *value)
+
216 void DS1307RTC::writeDate(const RTCDate *value)
217 {
218  if (_isRealTime) {
-
219  _bus->startWrite(DS1307_I2C_ADDRESS);
-
220  _bus->write(DS1307_DATE);
-
221  _bus->write(toBCD(value->day));
-
222  _bus->write(toBCD(value->month));
-
223  _bus->write(toBCD(value->year % 100));
-
224  _bus->endWrite();
+
219  _bus->startWrite(DS1307_I2C_ADDRESS);
+
220  _bus->write(DS1307_DATE);
+
221  _bus->write(toBCD(value->day));
+
222  _bus->write(toBCD(value->month));
+
223  _bus->write(toBCD(value->year % 100));
+
224  _bus->endWrite();
225  } else {
-
226  RTC::writeDate(value);
+
226  RTC::writeDate(value);
227  }
228 }
229 
-
230 void DS1307RTC::readAlarm(uint8_t alarmNum, RTCAlarm *value)
+
230 void DS1307RTC::readAlarm(uint8_t alarmNum, RTCAlarm *value)
231 {
232  if (_isRealTime) {
-
233  _bus->startWrite(DS1307_I2C_ADDRESS);
-
234  _bus->write(DS1307_ALARMS + alarmNum * DS1307_ALARM_SIZE);
-
235  if (_bus->startRead(DS1307_I2C_ADDRESS, 3)) {
-
236  value->hour = fromBCD(_bus->read());
-
237  value->minute = fromBCD(_bus->read());
-
238  value->flags = _bus->read();
+
233  _bus->startWrite(DS1307_I2C_ADDRESS);
+
234  _bus->write(DS1307_ALARMS + alarmNum * DS1307_ALARM_SIZE);
+
235  if (_bus->startRead(DS1307_I2C_ADDRESS, 3)) {
+
236  value->hour = fromBCD(_bus->read());
+
237  value->minute = fromBCD(_bus->read());
+
238  value->flags = _bus->read();
239  } else {
240  // RTC chip is not responding.
-
241  value->hour = 0;
-
242  value->minute = 0;
-
243  value->flags = 0;
+
241  value->hour = 0;
+
242  value->minute = 0;
+
243  value->flags = 0;
244  }
245  } else {
-
246  RTC::readAlarm(alarmNum, value);
+
246  RTC::readAlarm(alarmNum, value);
247  }
248 }
249 
-
250 void DS1307RTC::writeAlarm(uint8_t alarmNum, const RTCAlarm *value)
+
250 void DS1307RTC::writeAlarm(uint8_t alarmNum, const RTCAlarm *value)
251 {
252  if (_isRealTime) {
-
253  _bus->startWrite(DS1307_I2C_ADDRESS);
-
254  _bus->write(DS1307_ALARMS + alarmNum * DS1307_ALARM_SIZE);
-
255  _bus->write(toBCD(value->hour));
-
256  _bus->write(toBCD(value->minute));
-
257  _bus->write(value->flags);
-
258  _bus->endWrite();
+
253  _bus->startWrite(DS1307_I2C_ADDRESS);
+
254  _bus->write(DS1307_ALARMS + alarmNum * DS1307_ALARM_SIZE);
+
255  _bus->write(toBCD(value->hour));
+
256  _bus->write(toBCD(value->minute));
+
257  _bus->write(value->flags);
+
258  _bus->endWrite();
259  } else {
-
260  RTC::writeAlarm(alarmNum, value);
+
260  RTC::writeAlarm(alarmNum, value);
261  }
262 }
263 
-
264 int DS1307RTC::byteCount() const
+
264 int DS1307RTC::byteCount() const
265 {
266  return DS1307_ALARMS - DS1307_NVRAM;
267 }
268 
-
269 uint8_t DS1307RTC::readByte(uint8_t offset)
+
269 uint8_t DS1307RTC::readByte(uint8_t offset)
270 {
271  if (_isRealTime)
272  return readRegister(DS1307_NVRAM + offset);
273  else
-
274  return RTC::readByte(offset);
+
274  return RTC::readByte(offset);
275 }
276 
-
277 void DS1307RTC::writeByte(uint8_t offset, uint8_t value)
+
277 void DS1307RTC::writeByte(uint8_t offset, uint8_t value)
278 {
279  if (_isRealTime)
280  writeRegister(DS1307_NVRAM + offset, value);
281  else
-
282  RTC::writeByte(offset, value);
+
282  RTC::writeByte(offset, value);
283 }
284 
285 void DS1307RTC::initAlarms()
286 {
287  uint8_t value = readRegister(DS1307_ALARM_MAGIC);
-
288  if (value != (0xB0 + ALARM_COUNT)) {
+
288  if (value != (0xB0 + ALARM_COUNT)) {
289  // This is the first time we have used this clock chip,
290  // so initialize all alarms to their default state.
-
291  RTCAlarm alarm;
-
292  alarm.hour = 6; // Default to 6am for alarms.
-
293  alarm.minute = 0;
-
294  alarm.flags = 0;
-
295  for (uint8_t index = 0; index < ALARM_COUNT; ++index)
-
296  writeAlarm(index, &alarm);
+
291  RTCAlarm alarm;
+
292  alarm.hour = 6; // Default to 6am for alarms.
+
293  alarm.minute = 0;
+
294  alarm.flags = 0;
+
295  for (uint8_t index = 0; index < ALARM_COUNT; ++index)
+
296  writeAlarm(index, &alarm);
297  writeRegister(DS1307_ALARM_MAGIC, 0xB0 + ALARM_COUNT);
298 
299  // Also clear the rest of NVRAM so that it is in a known state.
300  // Otherwise we'll have whatever garbage was present at power-on.
-
301  _bus->startWrite(DS1307_I2C_ADDRESS);
-
302  _bus->write(DS1307_NVRAM);
+
301  _bus->startWrite(DS1307_I2C_ADDRESS);
+
302  _bus->write(DS1307_NVRAM);
303  for (uint8_t index = DS1307_NVRAM; index < DS1307_ALARMS; ++index)
-
304  _bus->write(0);
-
305  _bus->endWrite();
+
304  _bus->write(0);
+
305  _bus->endWrite();
306  }
307 }
308 
309 uint8_t DS1307RTC::readRegister(uint8_t reg)
310 {
-
311  _bus->startWrite(DS1307_I2C_ADDRESS);
-
312  _bus->write(reg);
-
313  if (!_bus->startRead(DS1307_I2C_ADDRESS, 1))
+
311  _bus->startWrite(DS1307_I2C_ADDRESS);
+
312  _bus->write(reg);
+
313  if (!_bus->startRead(DS1307_I2C_ADDRESS, 1))
314  return 0; // RTC chip is not responding.
-
315  return _bus->read();
+
315  return _bus->read();
316 }
317 
318 bool DS1307RTC::writeRegister(uint8_t reg, uint8_t value)
319 {
-
320  _bus->startWrite(DS1307_I2C_ADDRESS);
-
321  _bus->write(reg);
-
322  _bus->write(value);
-
323  return _bus->endWrite();
+
320  _bus->startWrite(DS1307_I2C_ADDRESS);
+
321  _bus->write(reg);
+
322  _bus->write(value);
+
323  return _bus->endWrite();
324 }
+
RTCDate::month
uint8_t month
Month of the year (1-12)
Definition: RTC.h:38
+
RTC::writeTime
virtual void writeTime(const RTCTime *value)
Updates the time in the realtime clock to match value.
Definition: RTC.cpp:179
+
RTCTime::minute
uint8_t minute
Minute within the hour (0-59)
Definition: RTC.h:31
+
RTC::readAlarm
virtual void readAlarm(uint8_t alarmNum, RTCAlarm *value)
Reads the details of the alarm with index alarmNum into value.
Definition: RTC.cpp:209
+
RTC::readDate
virtual void readDate(RTCDate *value)
Reads the current date from the realtime clock into value.
Definition: RTC.cpp:169
+
DS1307RTC::readTime
void readTime(RTCTime *value)
Reads the current time from the realtime clock into value.
Definition: DS1307RTC.cpp:157
+
DS1307RTC::hasUpdates
bool hasUpdates()
Returns true if the realtime clock has updated since the last call to this function.
Definition: DS1307RTC.cpp:118
+
DS1307RTC::writeAlarm
void writeAlarm(uint8_t alarmNum, const RTCAlarm *value)
Updates the details of the alarm with index alarmNum from value.
Definition: DS1307RTC.cpp:250
+
I2CMaster::write
virtual void write(uint8_t value)=0
Writes a single byte value on the I2C bus.
+
RTC::writeAlarm
virtual void writeAlarm(uint8_t alarmNum, const RTCAlarm *value)
Updates the details of the alarm with index alarmNum from value.
Definition: RTC.cpp:224
+
RTC::ALARM_COUNT
static const uint8_t ALARM_COUNT
Number of alarms that are supported by RTC::readAlarm() and RTC::writeAlarm().
Definition: RTC.h:74
+
DS1307RTC::writeTime
void writeTime(const RTCTime *value)
Updates the time in the realtime clock to match value.
Definition: DS1307RTC.cpp:202
+
RTC::writeDate
virtual void writeDate(const RTCDate *value)
Updates the date in the realtime clock to match value.
Definition: RTC.cpp:194
+
I2CMaster::startRead
virtual bool startRead(unsigned int address, unsigned int count)=0
Starts a read operation for count bytes by sending the start condition and the I2C control byte...
+
RTCAlarm::hour
uint8_t hour
Hour of the day for the alarm (0-23).
Definition: RTC.h:44
+
RTCAlarm::flags
uint8_t flags
Additional flags for the alarm.
Definition: RTC.h:46
+
RTCDate
Stores date information from a realtime clock chip.
Definition: RTC.h:35
+
DS1307RTC::readDate
void readDate(RTCDate *value)
Reads the current date from the realtime clock into value.
Definition: DS1307RTC.cpp:177
+
I2CMaster::startWrite
virtual void startWrite(unsigned int address)
Starts a write operation by sending a start condition and the I2C control byte.
+
I2CMaster::endWrite
virtual bool endWrite()=0
Ends the current write operation.
+
RTCDate::year
unsigned int year
Year (4-digit)
Definition: RTC.h:37
+
RTC::writeByte
virtual void writeByte(uint8_t offset, uint8_t value)
Writes value to offset within the realtime clock's non-volatile memory.
Definition: RTC.cpp:262
+
RTCAlarm::minute
uint8_t minute
Minute of the hour for the alarm (0-59).
Definition: RTC.h:45
+
RTC::readByte
virtual uint8_t readByte(uint8_t offset)
Reads the byte at offset within the realtime clock's non-volatile memory.
Definition: RTC.cpp:247
+
RTCTime
Stores time information from a realtime clock chip.
Definition: RTC.h:28
+
I2CMaster
Abstract base class for I2C master implementations.
Definition: I2CMaster.h:28
+
DS1307RTC::writeDate
void writeDate(const RTCDate *value)
Updates the date in the realtime clock to match value.
Definition: DS1307RTC.cpp:216
+
RTCAlarm
Stores alarm information from a realtime clock chip.
Definition: RTC.h:42
+
DS1307RTC::readAlarm
void readAlarm(uint8_t alarmNum, RTCAlarm *value)
Reads the details of the alarm with index alarmNum into value.
Definition: DS1307RTC.cpp:230
+
DS1307RTC::DS1307RTC
DS1307RTC(I2CMaster &bus, uint8_t oneHzPin=255)
Attaches to a realtime clock slave device on bus.
Definition: DS1307RTC.cpp:83
+
DS1307RTC::byteCount
int byteCount() const
Returns the number of bytes of non-volatile memory that can be used for storage of arbitrary settings...
Definition: DS1307RTC.cpp:264
+
I2CMaster::read
virtual uint8_t read()=0
Reads a single byte from the I2C bus.
+
DS1307RTC::readByte
uint8_t readByte(uint8_t offset)
Reads the byte at offset within the realtime clock's non-volatile memory.
Definition: DS1307RTC.cpp:269
+
RTCTime::hour
uint8_t hour
Hour of the day (0-23)
Definition: RTC.h:30
+
RTCDate::day
uint8_t day
Day of the month (1-31)
Definition: RTC.h:39
+
RTCTime::second
uint8_t second
Second within the minute (0-59)
Definition: RTC.h:32
+
RTC::readTime
virtual void readTime(RTCTime *value)
Reads the current time from the realtime clock into value.
Definition: RTC.cpp:144
+
DS1307RTC::writeByte
void writeByte(uint8_t offset, uint8_t value)
Writes value to offset within the realtime clock's non-volatile memory.
Definition: DS1307RTC.cpp:277
diff --git a/DS1307RTC_8h_source.html b/DS1307RTC_8h_source.html index 04110a7d..9b1c5c27 100644 --- a/DS1307RTC_8h_source.html +++ b/DS1307RTC_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: DS1307RTC.h Source File @@ -29,7 +30,7 @@ - + @@ -114,31 +115,31 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
25 
26 #include "RTC.h"
27 
-
28 class I2CMaster;
+
28 class I2CMaster;
29 
-
30 class DS1307RTC : public RTC {
+
30 class DS1307RTC : public RTC {
31 public:
-
32  DS1307RTC(I2CMaster &bus, uint8_t oneHzPin = 255);
+
32  DS1307RTC(I2CMaster &bus, uint8_t oneHzPin = 255);
33 
-
34  bool isRealTime() const { return _isRealTime; }
+
34  bool isRealTime() const { return _isRealTime; }
35 
-
36  bool hasUpdates();
+
36  bool hasUpdates();
37 
-
38  void readTime(RTCTime *value);
-
39  void readDate(RTCDate *value);
+
38  void readTime(RTCTime *value);
+
39  void readDate(RTCDate *value);
40 
-
41  void writeTime(const RTCTime *value);
-
42  void writeDate(const RTCDate *value);
+
41  void writeTime(const RTCTime *value);
+
42  void writeDate(const RTCDate *value);
43 
-
44  void readAlarm(uint8_t alarmNum, RTCAlarm *value);
-
45  void writeAlarm(uint8_t alarmNum, const RTCAlarm *value);
+
44  void readAlarm(uint8_t alarmNum, RTCAlarm *value);
+
45  void writeAlarm(uint8_t alarmNum, const RTCAlarm *value);
46 
-
47  int byteCount() const;
-
48  uint8_t readByte(uint8_t offset);
-
49  void writeByte(uint8_t offset, uint8_t value);
+
47  int byteCount() const;
+
48  uint8_t readByte(uint8_t offset);
+
49  void writeByte(uint8_t offset, uint8_t value);
50 
51 private:
-
52  I2CMaster *_bus;
+
52  I2CMaster *_bus;
53  uint8_t _oneHzPin;
54  bool prevOneHz;
55  bool _isRealTime;
@@ -150,12 +151,30 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
61 };
62 
63 #endif
+
DS1307RTC::readTime
void readTime(RTCTime *value)
Reads the current time from the realtime clock into value.
Definition: DS1307RTC.cpp:157
+
DS1307RTC::hasUpdates
bool hasUpdates()
Returns true if the realtime clock has updated since the last call to this function.
Definition: DS1307RTC.cpp:118
+
DS1307RTC::writeAlarm
void writeAlarm(uint8_t alarmNum, const RTCAlarm *value)
Updates the details of the alarm with index alarmNum from value.
Definition: DS1307RTC.cpp:250
+
DS1307RTC::writeTime
void writeTime(const RTCTime *value)
Updates the time in the realtime clock to match value.
Definition: DS1307RTC.cpp:202
+
RTCDate
Stores date information from a realtime clock chip.
Definition: RTC.h:35
+
DS1307RTC
Communicates with a DS1307 realtime clock chip via I2C.
Definition: DS1307RTC.h:30
+
DS1307RTC::readDate
void readDate(RTCDate *value)
Reads the current date from the realtime clock into value.
Definition: DS1307RTC.cpp:177
+
DS1307RTC::isRealTime
bool isRealTime() const
Returns true if the realtime clock is on the I2C bus; false if the time and date are simulated...
Definition: DS1307RTC.h:34
+
RTCTime
Stores time information from a realtime clock chip.
Definition: RTC.h:28
+
I2CMaster
Abstract base class for I2C master implementations.
Definition: I2CMaster.h:28
+
DS1307RTC::writeDate
void writeDate(const RTCDate *value)
Updates the date in the realtime clock to match value.
Definition: DS1307RTC.cpp:216
+
RTCAlarm
Stores alarm information from a realtime clock chip.
Definition: RTC.h:42
+
DS1307RTC::readAlarm
void readAlarm(uint8_t alarmNum, RTCAlarm *value)
Reads the details of the alarm with index alarmNum into value.
Definition: DS1307RTC.cpp:230
+
DS1307RTC::DS1307RTC
DS1307RTC(I2CMaster &bus, uint8_t oneHzPin=255)
Attaches to a realtime clock slave device on bus.
Definition: DS1307RTC.cpp:83
+
DS1307RTC::byteCount
int byteCount() const
Returns the number of bytes of non-volatile memory that can be used for storage of arbitrary settings...
Definition: DS1307RTC.cpp:264
+
DS1307RTC::readByte
uint8_t readByte(uint8_t offset)
Reads the byte at offset within the realtime clock's non-volatile memory.
Definition: DS1307RTC.cpp:269
+
RTC
Base class for realtime clock handlers.
Definition: RTC.h:49
+
DS1307RTC::writeByte
void writeByte(uint8_t offset, uint8_t value)
Writes value to offset within the realtime clock's non-volatile memory.
Definition: DS1307RTC.cpp:277
diff --git a/DS3232RTC_8cpp_source.html b/DS3232RTC_8cpp_source.html index 096b8256..6c3be4e8 100644 --- a/DS3232RTC_8cpp_source.html +++ b/DS3232RTC_8cpp_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: DS3232RTC.cpp Source File @@ -29,7 +30,7 @@ - + @@ -172,7 +173,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
111 #define DS3232_ALARMS (256 - RTC::ALARM_COUNT * DS3232_ALARM_SIZE - 1)
112 #define DS3232_ALARM_MAGIC 255
113 
-
126 DS3232RTC::DS3232RTC(I2CMaster &bus, uint8_t oneHzPin)
+
126 DS3232RTC::DS3232RTC(I2CMaster &bus, uint8_t oneHzPin)
127  : _bus(&bus)
128  , _oneHzPin(oneHzPin)
129  , prevOneHz(false)
@@ -180,17 +181,17 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
131  , alarmInterrupts(false)
132 {
133  // Probe the device and configure it for our use.
-
134  _bus->startWrite(DS3232_I2C_ADDRESS);
-
135  _bus->write(DS3232_CONTROL);
-
136  if (_bus->startRead(DS3232_I2C_ADDRESS, 1)) {
-
137  uint8_t value = _bus->read() & DS3232_CONV;
+
134  _bus->startWrite(DS3232_I2C_ADDRESS);
+
135  _bus->write(DS3232_CONTROL);
+
136  if (_bus->startRead(DS3232_I2C_ADDRESS, 1)) {
+
137  uint8_t value = _bus->read() & DS3232_CONV;
138  if (oneHzPin != 255)
139  value |= DS3232_BBSQW | DS3232_RS_1HZ;
-
140  _bus->startWrite(DS3232_I2C_ADDRESS);
-
141  _bus->write(DS3232_CONTROL);
-
142  _bus->write(value);
-
143  _bus->write(DS3232_CRATE_64);
-
144  _bus->endWrite();
+
140  _bus->startWrite(DS3232_I2C_ADDRESS);
+
141  _bus->write(DS3232_CONTROL);
+
142  _bus->write(value);
+
143  _bus->write(DS3232_CRATE_64);
+
144  _bus->endWrite();
145  } else {
146  // Did not get an acknowledgement from the RTC chip.
147  _isRealTime = false;
@@ -207,7 +208,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
158  initAlarms();
159 }
160 
-
166 bool DS3232RTC::hasUpdates()
+
166 bool DS3232RTC::hasUpdates()
167 {
168  // If not using a 1 Hz pin or there is no RTC chip available,
169  // then assume that there is an update available.
@@ -246,43 +247,43 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
202  }
203 }
204 
-
205 void DS3232RTC::readTime(RTCTime *value)
+
205 void DS3232RTC::readTime(RTCTime *value)
206 {
207  if (_isRealTime) {
-
208  _bus->startWrite(DS3232_I2C_ADDRESS);
-
209  _bus->write(DS3232_SECOND);
-
210  if (_bus->startRead(DS3232_I2C_ADDRESS, 3)) {
-
211  value->second = fromBCD(_bus->read());
-
212  value->minute = fromBCD(_bus->read());
-
213  value->hour = fromHourBCD(_bus->read());
+
208  _bus->startWrite(DS3232_I2C_ADDRESS);
+
209  _bus->write(DS3232_SECOND);
+
210  if (_bus->startRead(DS3232_I2C_ADDRESS, 3)) {
+
211  value->second = fromBCD(_bus->read());
+
212  value->minute = fromBCD(_bus->read());
+
213  value->hour = fromHourBCD(_bus->read());
214  } else {
215  // RTC chip is not responding.
-
216  value->second = 0;
-
217  value->minute = 0;
-
218  value->hour = 0;
+
216  value->second = 0;
+
217  value->minute = 0;
+
218  value->hour = 0;
219  }
220  } else {
-
221  RTC::readTime(value);
+
221  RTC::readTime(value);
222  }
223 }
224 
-
225 void DS3232RTC::readDate(RTCDate *value)
+
225 void DS3232RTC::readDate(RTCDate *value)
226 {
227  if (!_isRealTime) {
-
228  RTC::readDate(value);
+
228  RTC::readDate(value);
229  return;
230  }
-
231  _bus->startWrite(DS3232_I2C_ADDRESS);
-
232  _bus->write(DS3232_DATE);
-
233  if (_bus->startRead(DS3232_I2C_ADDRESS, 3)) {
-
234  value->day = fromBCD(_bus->read());
-
235  value->month = fromBCD(_bus->read() & 0x7F); // Strip century bit.
-
236  value->year = fromBCD(_bus->read()) + 2000;
+
231  _bus->startWrite(DS3232_I2C_ADDRESS);
+
232  _bus->write(DS3232_DATE);
+
233  if (_bus->startRead(DS3232_I2C_ADDRESS, 3)) {
+
234  value->day = fromBCD(_bus->read());
+
235  value->month = fromBCD(_bus->read() & 0x7F); // Strip century bit.
+
236  value->year = fromBCD(_bus->read()) + 2000;
237  } else {
238  // RTC chip is not responding.
-
239  value->day = 1;
-
240  value->month = 1;
-
241  value->year = 2000;
+
239  value->day = 1;
+
240  value->month = 1;
+
241  value->year = 2000;
242  }
243 }
244 
@@ -291,123 +292,123 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
247  return ((value / 10) << 4) + (value % 10);
248 }
249 
-
250 void DS3232RTC::writeTime(const RTCTime *value)
+
250 void DS3232RTC::writeTime(const RTCTime *value)
251 {
252  if (_isRealTime) {
-
253  _bus->startWrite(DS3232_I2C_ADDRESS);
-
254  _bus->write(DS3232_SECOND);
-
255  _bus->write(toBCD(value->second));
-
256  _bus->write(toBCD(value->minute));
-
257  _bus->write(toBCD(value->hour)); // Changes mode to 24-hour clock.
-
258  _bus->endWrite();
+
253  _bus->startWrite(DS3232_I2C_ADDRESS);
+
254  _bus->write(DS3232_SECOND);
+
255  _bus->write(toBCD(value->second));
+
256  _bus->write(toBCD(value->minute));
+
257  _bus->write(toBCD(value->hour)); // Changes mode to 24-hour clock.
+
258  _bus->endWrite();
259  } else {
-
260  RTC::writeTime(value);
+
260  RTC::writeTime(value);
261  }
262 }
263 
-
264 void DS3232RTC::writeDate(const RTCDate *value)
+
264 void DS3232RTC::writeDate(const RTCDate *value)
265 {
266  if (_isRealTime) {
-
267  _bus->startWrite(DS3232_I2C_ADDRESS);
-
268  _bus->write(DS3232_DATE);
-
269  _bus->write(toBCD(value->day));
-
270  _bus->write(toBCD(value->month));
-
271  _bus->write(toBCD(value->year % 100));
-
272  _bus->endWrite();
+
267  _bus->startWrite(DS3232_I2C_ADDRESS);
+
268  _bus->write(DS3232_DATE);
+
269  _bus->write(toBCD(value->day));
+
270  _bus->write(toBCD(value->month));
+
271  _bus->write(toBCD(value->year % 100));
+
272  _bus->endWrite();
273  } else {
-
274  RTC::writeDate(value);
+
274  RTC::writeDate(value);
275  }
276 }
277 
-
278 void DS3232RTC::readAlarm(uint8_t alarmNum, RTCAlarm *value)
+
278 void DS3232RTC::readAlarm(uint8_t alarmNum, RTCAlarm *value)
279 {
280  if (_isRealTime) {
-
281  _bus->startWrite(DS3232_I2C_ADDRESS);
-
282  _bus->write(DS3232_ALARMS + alarmNum * DS3232_ALARM_SIZE);
-
283  if (_bus->startRead(DS3232_I2C_ADDRESS, 3)) {
-
284  value->hour = fromBCD(_bus->read());
-
285  value->minute = fromBCD(_bus->read());
-
286  value->flags = _bus->read();
+
281  _bus->startWrite(DS3232_I2C_ADDRESS);
+
282  _bus->write(DS3232_ALARMS + alarmNum * DS3232_ALARM_SIZE);
+
283  if (_bus->startRead(DS3232_I2C_ADDRESS, 3)) {
+
284  value->hour = fromBCD(_bus->read());
+
285  value->minute = fromBCD(_bus->read());
+
286  value->flags = _bus->read();
287  } else {
288  // RTC chip is not responding.
-
289  value->hour = 0;
-
290  value->minute = 0;
-
291  value->flags = 0;
+
289  value->hour = 0;
+
290  value->minute = 0;
+
291  value->flags = 0;
292  }
293  } else {
-
294  RTC::readAlarm(alarmNum, value);
+
294  RTC::readAlarm(alarmNum, value);
295  }
296 }
297 
-
298 void DS3232RTC::writeAlarm(uint8_t alarmNum, const RTCAlarm *value)
+
298 void DS3232RTC::writeAlarm(uint8_t alarmNum, const RTCAlarm *value)
299 {
300  if (_isRealTime) {
301  // Write the alarm details to NVRAM.
-
302  _bus->startWrite(DS3232_I2C_ADDRESS);
-
303  _bus->write(DS3232_ALARMS + alarmNum * DS3232_ALARM_SIZE);
-
304  _bus->write(toBCD(value->hour));
-
305  _bus->write(toBCD(value->minute));
-
306  _bus->write(value->flags);
-
307  _bus->endWrite();
+
302  _bus->startWrite(DS3232_I2C_ADDRESS);
+
303  _bus->write(DS3232_ALARMS + alarmNum * DS3232_ALARM_SIZE);
+
304  _bus->write(toBCD(value->hour));
+
305  _bus->write(toBCD(value->minute));
+
306  _bus->write(value->flags);
+
307  _bus->endWrite();
308 
309  // Keep the DS3232's built-in alarms in sync with the first two alarms.
310  if (alarmNum == 0) {
-
311  _bus->startWrite(DS3232_I2C_ADDRESS);
-
312  _bus->write(DS3232_ALARM1_SEC);
-
313  _bus->write(0);
-
314  _bus->write(toBCD(value->minute));
-
315  _bus->write(toBCD(value->hour));
-
316  _bus->write(0x81); // Match hours, mins, secs; day = 1
-
317  _bus->endWrite();
+
311  _bus->startWrite(DS3232_I2C_ADDRESS);
+
312  _bus->write(DS3232_ALARM1_SEC);
+
313  _bus->write(0);
+
314  _bus->write(toBCD(value->minute));
+
315  _bus->write(toBCD(value->hour));
+
316  _bus->write(0x81); // Match hours, mins, secs; day = 1
+
317  _bus->endWrite();
318  if (alarmInterrupts)
319  updateAlarmInterrupts();
320  } else if (alarmNum == 1) {
-
321  _bus->startWrite(DS3232_I2C_ADDRESS);
-
322  _bus->write(DS3232_ALARM2_MIN);
-
323  _bus->write(toBCD(value->minute));
-
324  _bus->write(toBCD(value->hour));
-
325  _bus->write(0x81); // Match hours, mins; day = 1
-
326  _bus->endWrite();
+
321  _bus->startWrite(DS3232_I2C_ADDRESS);
+
322  _bus->write(DS3232_ALARM2_MIN);
+
323  _bus->write(toBCD(value->minute));
+
324  _bus->write(toBCD(value->hour));
+
325  _bus->write(0x81); // Match hours, mins; day = 1
+
326  _bus->endWrite();
327  if (alarmInterrupts)
328  updateAlarmInterrupts();
329  }
330  } else {
-
331  RTC::writeAlarm(alarmNum, value);
+
331  RTC::writeAlarm(alarmNum, value);
332  }
333 }
334 
-
335 int DS3232RTC::byteCount() const
+
335 int DS3232RTC::byteCount() const
336 {
337  return DS3232_ALARMS - DS3232_NVRAM;
338 }
339 
-
340 uint8_t DS3232RTC::readByte(uint8_t offset)
+
340 uint8_t DS3232RTC::readByte(uint8_t offset)
341 {
342  if (_isRealTime)
343  return readRegister(DS3232_NVRAM + offset);
344  else
-
345  return RTC::readByte(offset);
+
345  return RTC::readByte(offset);
346 }
347 
-
348 void DS3232RTC::writeByte(uint8_t offset, uint8_t value)
+
348 void DS3232RTC::writeByte(uint8_t offset, uint8_t value)
349 {
350  if (_isRealTime)
351  writeRegister(DS3232_NVRAM + offset, value);
352  else
-
353  RTC::writeByte(offset, value);
+
353  RTC::writeByte(offset, value);
354 }
355 
-
356 int DS3232RTC::readTemperature()
+
356 int DS3232RTC::readTemperature()
357 {
358  if (_isRealTime) {
359  return (((int)(signed char)readRegister(DS3232_TEMP_MSB)) << 2) |
360  (readRegister(DS3232_TEMP_LSB) >> 6);
361  } else {
-
362  return NO_TEMPERATURE;
+
362  return NO_TEMPERATURE;
363  }
364 }
365 
-
380 void DS3232RTC::enableAlarmInterrupts()
+
380 void DS3232RTC::enableAlarmInterrupts()
381 {
382  if (_oneHzPin == 255 && _isRealTime) {
383  updateAlarmInterrupts();
@@ -415,7 +416,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
385  }
386 }
387 
-
393 void DS3232RTC::disableAlarmInterrupts()
+
393 void DS3232RTC::disableAlarmInterrupts()
394 {
395  if (alarmInterrupts) {
396  uint8_t value = readRegister(DS3232_CONTROL);
@@ -425,7 +426,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
400  }
401 }
402 
-
416 int DS3232RTC::firedAlarm()
+
416 int DS3232RTC::firedAlarm()
417 {
418  if (!_isRealTime)
419  return -1;
@@ -448,7 +449,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
436  return alarm;
437 }
438 
-
444 void DS3232RTC::enable32kHzOutput()
+
444 void DS3232RTC::enable32kHzOutput()
445 {
446  if (_isRealTime) {
447  uint8_t value = readRegister(DS3232_STATUS);
@@ -457,7 +458,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
450  }
451 }
452 
-
458 void DS3232RTC::disable32kHzOutput()
+
458 void DS3232RTC::disable32kHzOutput()
459 {
460  if (_isRealTime) {
461  uint8_t value = readRegister(DS3232_STATUS);
@@ -469,42 +470,42 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
467 void DS3232RTC::initAlarms()
468 {
469  uint8_t value = readRegister(DS3232_ALARM_MAGIC);
-
470  if (value != (0xB0 + ALARM_COUNT)) {
+
470  if (value != (0xB0 + ALARM_COUNT)) {
471  // This is the first time we have used this clock chip,
472  // so initialize all alarms to their default state.
-
473  RTCAlarm alarm;
-
474  alarm.hour = 6; // Default to 6am for alarms.
-
475  alarm.minute = 0;
-
476  alarm.flags = 0;
-
477  for (uint8_t index = 0; index < ALARM_COUNT; ++index)
-
478  writeAlarm(index, &alarm);
+
473  RTCAlarm alarm;
+
474  alarm.hour = 6; // Default to 6am for alarms.
+
475  alarm.minute = 0;
+
476  alarm.flags = 0;
+
477  for (uint8_t index = 0; index < ALARM_COUNT; ++index)
+
478  writeAlarm(index, &alarm);
479  writeRegister(DS3232_ALARM_MAGIC, 0xB0 + ALARM_COUNT);
480 
481  // Also clear the rest of NVRAM so that it is in a known state.
482  // Otherwise we'll have whatever garbage was present at power-on.
-
483  _bus->startWrite(DS3232_I2C_ADDRESS);
-
484  _bus->write(DS3232_NVRAM);
+
483  _bus->startWrite(DS3232_I2C_ADDRESS);
+
484  _bus->write(DS3232_NVRAM);
485  for (uint8_t index = DS3232_NVRAM; index < DS3232_ALARMS; ++index)
-
486  _bus->write(0);
-
487  _bus->endWrite();
+
486  _bus->write(0);
+
487  _bus->endWrite();
488  }
489 }
490 
491 uint8_t DS3232RTC::readRegister(uint8_t reg)
492 {
-
493  _bus->startWrite(DS3232_I2C_ADDRESS);
-
494  _bus->write(reg);
-
495  if (!_bus->startRead(DS3232_I2C_ADDRESS, 1))
+
493  _bus->startWrite(DS3232_I2C_ADDRESS);
+
494  _bus->write(reg);
+
495  if (!_bus->startRead(DS3232_I2C_ADDRESS, 1))
496  return 0; // RTC chip is not responding.
-
497  return _bus->read();
+
497  return _bus->read();
498 }
499 
500 bool DS3232RTC::writeRegister(uint8_t reg, uint8_t value)
501 {
-
502  _bus->startWrite(DS3232_I2C_ADDRESS);
-
503  _bus->write(reg);
-
504  _bus->write(value);
-
505  return _bus->endWrite();
+
502  _bus->startWrite(DS3232_I2C_ADDRESS);
+
503  _bus->write(reg);
+
504  _bus->write(value);
+
505  return _bus->endWrite();
506 }
507 
508 #define DS3232_ALARM1_FLAGS (DS3232_ALARMS + 2)
@@ -526,12 +527,57 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
524  value &= ~DS3232_A2IE;
525  writeRegister(DS3232_CONTROL, value);
526 }
+
RTCDate::month
uint8_t month
Month of the year (1-12)
Definition: RTC.h:38
+
RTC::writeTime
virtual void writeTime(const RTCTime *value)
Updates the time in the realtime clock to match value.
Definition: RTC.cpp:179
+
DS3232RTC::enableAlarmInterrupts
void enableAlarmInterrupts()
Enables the generation of interrupts for alarms 0 and 1.
Definition: DS3232RTC.cpp:380
+
DS3232RTC::disable32kHzOutput
void disable32kHzOutput()
Disables the 32 kHz output on the DS3232 chip.
Definition: DS3232RTC.cpp:458
+
DS3232RTC::readTime
void readTime(RTCTime *value)
Reads the current time from the realtime clock into value.
Definition: DS3232RTC.cpp:205
+
DS3232RTC::readTemperature
int readTemperature()
Reads the value of the temperature sensor and returns the temperature in quarters of a degree celcius...
Definition: DS3232RTC.cpp:356
+
RTCTime::minute
uint8_t minute
Minute within the hour (0-59)
Definition: RTC.h:31
+
RTC::readAlarm
virtual void readAlarm(uint8_t alarmNum, RTCAlarm *value)
Reads the details of the alarm with index alarmNum into value.
Definition: RTC.cpp:209
+
RTC::readDate
virtual void readDate(RTCDate *value)
Reads the current date from the realtime clock into value.
Definition: RTC.cpp:169
+
DS3232RTC::byteCount
int byteCount() const
Returns the number of bytes of non-volatile memory that can be used for storage of arbitrary settings...
Definition: DS3232RTC.cpp:335
+
DS3232RTC::readDate
void readDate(RTCDate *value)
Reads the current date from the realtime clock into value.
Definition: DS3232RTC.cpp:225
+
DS3232RTC::enable32kHzOutput
void enable32kHzOutput()
Enables the 32 kHz output on the DS3232 chip.
Definition: DS3232RTC.cpp:444
+
I2CMaster::write
virtual void write(uint8_t value)=0
Writes a single byte value on the I2C bus.
+
DS3232RTC::writeAlarm
void writeAlarm(uint8_t alarmNum, const RTCAlarm *value)
Updates the details of the alarm with index alarmNum from value.
Definition: DS3232RTC.cpp:298
+
RTC::writeAlarm
virtual void writeAlarm(uint8_t alarmNum, const RTCAlarm *value)
Updates the details of the alarm with index alarmNum from value.
Definition: RTC.cpp:224
+
RTC::ALARM_COUNT
static const uint8_t ALARM_COUNT
Number of alarms that are supported by RTC::readAlarm() and RTC::writeAlarm().
Definition: RTC.h:74
+
RTC::writeDate
virtual void writeDate(const RTCDate *value)
Updates the date in the realtime clock to match value.
Definition: RTC.cpp:194
+
DS3232RTC::disableAlarmInterrupts
void disableAlarmInterrupts()
Disables the generation of interrupts for alarms 0 and 1.
Definition: DS3232RTC.cpp:393
+
I2CMaster::startRead
virtual bool startRead(unsigned int address, unsigned int count)=0
Starts a read operation for count bytes by sending the start condition and the I2C control byte...
+
RTCAlarm::hour
uint8_t hour
Hour of the day for the alarm (0-23).
Definition: RTC.h:44
+
RTC::NO_TEMPERATURE
static const int NO_TEMPERATURE
Value that is returned from readTemperature() if the realtime clock chip cannot determine the tempera...
Definition: RTC.h:83
+
RTCAlarm::flags
uint8_t flags
Additional flags for the alarm.
Definition: RTC.h:46
+
RTCDate
Stores date information from a realtime clock chip.
Definition: RTC.h:35
+
DS3232RTC::writeTime
void writeTime(const RTCTime *value)
Updates the time in the realtime clock to match value.
Definition: DS3232RTC.cpp:250
+
DS3232RTC::readByte
uint8_t readByte(uint8_t offset)
Reads the byte at offset within the realtime clock's non-volatile memory.
Definition: DS3232RTC.cpp:340
+
DS3232RTC::firedAlarm
int firedAlarm()
Determines which of alarms 0 or 1 have fired since the last call.
Definition: DS3232RTC.cpp:416
+
DS3232RTC::DS3232RTC
DS3232RTC(I2CMaster &bus, uint8_t oneHzPin=255)
Attaches to a realtime clock slave device on bus.
Definition: DS3232RTC.cpp:126
+
I2CMaster::startWrite
virtual void startWrite(unsigned int address)
Starts a write operation by sending a start condition and the I2C control byte.
+
I2CMaster::endWrite
virtual bool endWrite()=0
Ends the current write operation.
+
RTCDate::year
unsigned int year
Year (4-digit)
Definition: RTC.h:37
+
RTC::writeByte
virtual void writeByte(uint8_t offset, uint8_t value)
Writes value to offset within the realtime clock's non-volatile memory.
Definition: RTC.cpp:262
+
RTCAlarm::minute
uint8_t minute
Minute of the hour for the alarm (0-59).
Definition: RTC.h:45
+
DS3232RTC::hasUpdates
bool hasUpdates()
Returns true if the realtime clock has updated since the last call to this function.
Definition: DS3232RTC.cpp:166
+
RTC::readByte
virtual uint8_t readByte(uint8_t offset)
Reads the byte at offset within the realtime clock's non-volatile memory.
Definition: RTC.cpp:247
+
RTCTime
Stores time information from a realtime clock chip.
Definition: RTC.h:28
+
I2CMaster
Abstract base class for I2C master implementations.
Definition: I2CMaster.h:28
+
DS3232RTC::writeDate
void writeDate(const RTCDate *value)
Updates the date in the realtime clock to match value.
Definition: DS3232RTC.cpp:264
+
RTCAlarm
Stores alarm information from a realtime clock chip.
Definition: RTC.h:42
+
I2CMaster::read
virtual uint8_t read()=0
Reads a single byte from the I2C bus.
+
RTCTime::hour
uint8_t hour
Hour of the day (0-23)
Definition: RTC.h:30
+
RTCDate::day
uint8_t day
Day of the month (1-31)
Definition: RTC.h:39
+
DS3232RTC::readAlarm
void readAlarm(uint8_t alarmNum, RTCAlarm *value)
Reads the details of the alarm with index alarmNum into value.
Definition: DS3232RTC.cpp:278
+
RTCTime::second
uint8_t second
Second within the minute (0-59)
Definition: RTC.h:32
+
DS3232RTC::writeByte
void writeByte(uint8_t offset, uint8_t value)
Writes value to offset within the realtime clock's non-volatile memory.
Definition: DS3232RTC.cpp:348
+
RTC::readTime
virtual void readTime(RTCTime *value)
Reads the current time from the realtime clock into value.
Definition: RTC.cpp:144
diff --git a/DS3232RTC_8h_source.html b/DS3232RTC_8h_source.html index 09bbe9ea..cc2aae00 100644 --- a/DS3232RTC_8h_source.html +++ b/DS3232RTC_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: DS3232RTC.h Source File @@ -29,7 +30,7 @@ - + @@ -114,40 +115,40 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
25 
26 #include "RTC.h"
27 
-
28 class I2CMaster;
+
28 class I2CMaster;
29 
-
30 class DS3232RTC : public RTC {
+
30 class DS3232RTC : public RTC {
31 public:
-
32  DS3232RTC(I2CMaster &bus, uint8_t oneHzPin = 255);
+
32  DS3232RTC(I2CMaster &bus, uint8_t oneHzPin = 255);
33 
-
34  bool isRealTime() const { return _isRealTime; }
+
34  bool isRealTime() const { return _isRealTime; }
35 
-
36  bool hasUpdates();
+
36  bool hasUpdates();
37 
-
38  void readTime(RTCTime *value);
-
39  void readDate(RTCDate *value);
+
38  void readTime(RTCTime *value);
+
39  void readDate(RTCDate *value);
40 
-
41  void writeTime(const RTCTime *value);
-
42  void writeDate(const RTCDate *value);
+
41  void writeTime(const RTCTime *value);
+
42  void writeDate(const RTCDate *value);
43 
-
44  void readAlarm(uint8_t alarmNum, RTCAlarm *value);
-
45  void writeAlarm(uint8_t alarmNum, const RTCAlarm *value);
+
44  void readAlarm(uint8_t alarmNum, RTCAlarm *value);
+
45  void writeAlarm(uint8_t alarmNum, const RTCAlarm *value);
46 
-
47  int byteCount() const;
-
48  uint8_t readByte(uint8_t offset);
-
49  void writeByte(uint8_t offset, uint8_t value);
+
47  int byteCount() const;
+
48  uint8_t readByte(uint8_t offset);
+
49  void writeByte(uint8_t offset, uint8_t value);
50 
-
51  int readTemperature();
+
51  int readTemperature();
52 
-
53  void enableAlarmInterrupts();
-
54  void disableAlarmInterrupts();
-
55  int firedAlarm();
+
53  void enableAlarmInterrupts();
+
54  void disableAlarmInterrupts();
+
55  int firedAlarm();
56 
-
57  void enable32kHzOutput();
-
58  void disable32kHzOutput();
+
57  void enable32kHzOutput();
+
58  void disable32kHzOutput();
59 
60 private:
-
61  I2CMaster *_bus;
+
61  I2CMaster *_bus;
62  uint8_t _oneHzPin;
63  bool prevOneHz;
64  bool _isRealTime;
@@ -162,12 +163,36 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
73 };
74 
75 #endif
+
DS3232RTC::enableAlarmInterrupts
void enableAlarmInterrupts()
Enables the generation of interrupts for alarms 0 and 1.
Definition: DS3232RTC.cpp:380
+
DS3232RTC::disable32kHzOutput
void disable32kHzOutput()
Disables the 32 kHz output on the DS3232 chip.
Definition: DS3232RTC.cpp:458
+
DS3232RTC::readTime
void readTime(RTCTime *value)
Reads the current time from the realtime clock into value.
Definition: DS3232RTC.cpp:205
+
DS3232RTC::readTemperature
int readTemperature()
Reads the value of the temperature sensor and returns the temperature in quarters of a degree celcius...
Definition: DS3232RTC.cpp:356
+
DS3232RTC::byteCount
int byteCount() const
Returns the number of bytes of non-volatile memory that can be used for storage of arbitrary settings...
Definition: DS3232RTC.cpp:335
+
DS3232RTC::readDate
void readDate(RTCDate *value)
Reads the current date from the realtime clock into value.
Definition: DS3232RTC.cpp:225
+
DS3232RTC::enable32kHzOutput
void enable32kHzOutput()
Enables the 32 kHz output on the DS3232 chip.
Definition: DS3232RTC.cpp:444
+
DS3232RTC::writeAlarm
void writeAlarm(uint8_t alarmNum, const RTCAlarm *value)
Updates the details of the alarm with index alarmNum from value.
Definition: DS3232RTC.cpp:298
+
DS3232RTC
Communicates with a DS3232 realtime clock chip via I2C.
Definition: DS3232RTC.h:30
+
DS3232RTC::disableAlarmInterrupts
void disableAlarmInterrupts()
Disables the generation of interrupts for alarms 0 and 1.
Definition: DS3232RTC.cpp:393
+
RTCDate
Stores date information from a realtime clock chip.
Definition: RTC.h:35
+
DS3232RTC::writeTime
void writeTime(const RTCTime *value)
Updates the time in the realtime clock to match value.
Definition: DS3232RTC.cpp:250
+
DS3232RTC::readByte
uint8_t readByte(uint8_t offset)
Reads the byte at offset within the realtime clock's non-volatile memory.
Definition: DS3232RTC.cpp:340
+
DS3232RTC::firedAlarm
int firedAlarm()
Determines which of alarms 0 or 1 have fired since the last call.
Definition: DS3232RTC.cpp:416
+
DS3232RTC::DS3232RTC
DS3232RTC(I2CMaster &bus, uint8_t oneHzPin=255)
Attaches to a realtime clock slave device on bus.
Definition: DS3232RTC.cpp:126
+
DS3232RTC::isRealTime
bool isRealTime() const
Returns true if the realtime clock is on the I2C bus; false if the time and date are simulated...
Definition: DS3232RTC.h:34
+
DS3232RTC::hasUpdates
bool hasUpdates()
Returns true if the realtime clock has updated since the last call to this function.
Definition: DS3232RTC.cpp:166
+
RTCTime
Stores time information from a realtime clock chip.
Definition: RTC.h:28
+
I2CMaster
Abstract base class for I2C master implementations.
Definition: I2CMaster.h:28
+
DS3232RTC::writeDate
void writeDate(const RTCDate *value)
Updates the date in the realtime clock to match value.
Definition: DS3232RTC.cpp:264
+
RTCAlarm
Stores alarm information from a realtime clock chip.
Definition: RTC.h:42
+
DS3232RTC::readAlarm
void readAlarm(uint8_t alarmNum, RTCAlarm *value)
Reads the details of the alarm with index alarmNum into value.
Definition: DS3232RTC.cpp:278
+
DS3232RTC::writeByte
void writeByte(uint8_t offset, uint8_t value)
Writes value to offset within the realtime clock's non-volatile memory.
Definition: DS3232RTC.cpp:348
+
RTC
Base class for realtime clock handlers.
Definition: RTC.h:49
diff --git a/DejaVuSans9_8h_source.html b/DejaVuSans9_8h_source.html index 42f07a01..eb67895e 100644 --- a/DejaVuSans9_8h_source.html +++ b/DejaVuSans9_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: DejaVuSans9.h Source File @@ -29,7 +30,7 @@ - + @@ -256,9 +257,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/DejaVuSansBold9_8h_source.html b/DejaVuSansBold9_8h_source.html index ee8c9f9c..de041051 100644 --- a/DejaVuSansBold9_8h_source.html +++ b/DejaVuSansBold9_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: DejaVuSansBold9.h Source File @@ -29,7 +30,7 @@ - + @@ -256,9 +257,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/DejaVuSansItalic9_8h_source.html b/DejaVuSansItalic9_8h_source.html index a68321d4..9de3e31a 100644 --- a/DejaVuSansItalic9_8h_source.html +++ b/DejaVuSansItalic9_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: DejaVuSansItalic9.h Source File @@ -29,7 +30,7 @@ - + @@ -256,9 +257,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/EEPROM24_8cpp_source.html b/EEPROM24_8cpp_source.html index ffece55d..6d3ecef4 100644 --- a/EEPROM24_8cpp_source.html +++ b/EEPROM24_8cpp_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: EEPROM24.cpp Source File @@ -29,7 +30,7 @@ - + @@ -112,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
23 #include "EEPROM24.h"
24 #include "I2CMaster.h"
25 
-
95 EEPROM24::EEPROM24(I2CMaster &bus, unsigned long type, uint8_t bank)
+
95 EEPROM24::EEPROM24(I2CMaster &bus, unsigned long type, uint8_t bank)
96  : _bus(&bus)
97  , _size((type & 0xFFFF) * ((type >> 16) & 0x0FFF))
98  , _pageSize((type >> 16) & 0x0FFF)
@@ -126,7 +127,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
106  break;
107  case EE_BSEL_8BIT_ADDR: {
108  uint8_t addrBits = 8;
-
109  unsigned long size = 0x0100;
+
109  unsigned long size = 0x0100;
110  while (size < _size) {
111  ++addrBits;
112  size <<= 1;
@@ -143,54 +144,54 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
123  }
124 }
125 
-
152 bool EEPROM24::available()
+
152 bool EEPROM24::available()
153 {
154  // Perform a "Current Address Read" on the EEPROM. We don't care about
155  // the returned byte. We only care if the read request was ACK'ed or not.
-
156  if (!_bus->startRead(i2cAddress, 1))
+
156  if (!_bus->startRead(i2cAddress, 1))
157  return false;
-
158  _bus->read();
+
158  _bus->read();
159  return true;
160 }
161 
-
167 uint8_t EEPROM24::read(unsigned long address)
+
167 uint8_t EEPROM24::read(unsigned long address)
168 {
169  if (address >= _size)
170  return 0;
171  writeAddress(address);
-
172  if (!_bus->startRead(i2cAddress, 1))
+
172  if (!_bus->startRead(i2cAddress, 1))
173  return 0;
-
174  return _bus->read();
+
174  return _bus->read();
175 }
176 
-
187 size_t EEPROM24::read(unsigned long address, void *data, size_t length)
+
187 size_t EEPROM24::read(unsigned long address, void *data, size_t length)
188 {
189  if (address >= _size || !length)
190  return 0;
191  if ((address + length) > _size)
192  length = (size_t)(_size - address);
193  writeAddress(address);
-
194  if (!_bus->startRead(i2cAddress, length))
+
194  if (!_bus->startRead(i2cAddress, length))
195  return 0;
196  uint8_t *d = (uint8_t *)data;
197  unsigned int count = 0;
-
198  while (_bus->available()) {
-
199  *d++ = _bus->read();
+
198  while (_bus->available()) {
+
199  *d++ = _bus->read();
200  ++count;
201  }
202  return count;
203 }
204 
-
213 bool EEPROM24::write(unsigned long address, uint8_t value)
+
213 bool EEPROM24::write(unsigned long address, uint8_t value)
214 {
215  if (address >= _size)
216  return false;
217  writeAddress(address);
-
218  _bus->write(value);
+
218  _bus->write(value);
219  return waitForWrite();
220 }
221 
-
235 size_t EEPROM24::write(unsigned long address, const void *data, size_t length)
+
235 size_t EEPROM24::write(unsigned long address, const void *data, size_t length)
236 {
237  if (address >= _size)
238  return 0;
@@ -205,7 +206,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
247  writeAddress(address);
248  needAddress = false;
249  }
-
250  _bus->write(*d++);
+
250  _bus->write(*d++);
251  ++address;
252  ++page;
253  if ((address & (_pageSize - 1)) == 0) {
@@ -229,23 +230,23 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
271 {
272  switch (_mode) {
273  case EE_BSEL_NONE:
-
274  _bus->startWrite(i2cAddress);
-
275  _bus->write((uint8_t)(address >> 8));
-
276  _bus->write((uint8_t)address);
+
274  _bus->startWrite(i2cAddress);
+
275  _bus->write((uint8_t)(address >> 8));
+
276  _bus->write((uint8_t)address);
277  break;
278  case EE_BSEL_8BIT_ADDR:
-
279  _bus->startWrite(i2cAddress | (((uint8_t)(address >> 8)) & 0x07));
-
280  _bus->write((uint8_t)address);
+
279  _bus->startWrite(i2cAddress | (((uint8_t)(address >> 8)) & 0x07));
+
280  _bus->write((uint8_t)address);
281  break;
282  case EE_BSEL_17BIT_ADDR:
-
283  _bus->startWrite(i2cAddress | (((uint8_t)(address >> 16)) & 0x01));
-
284  _bus->write((uint8_t)(address >> 8));
-
285  _bus->write((uint8_t)address);
+
283  _bus->startWrite(i2cAddress | (((uint8_t)(address >> 16)) & 0x01));
+
284  _bus->write((uint8_t)(address >> 8));
+
285  _bus->write((uint8_t)address);
286  break;
287  case EE_BSEL_17BIT_ADDR_ALT:
-
288  _bus->startWrite(i2cAddress | (((uint8_t)(address >> 14)) & 0x04));
-
289  _bus->write((uint8_t)(address >> 8));
-
290  _bus->write((uint8_t)address);
+
288  _bus->startWrite(i2cAddress | (((uint8_t)(address >> 14)) & 0x04));
+
289  _bus->write((uint8_t)(address >> 8));
+
290  _bus->write((uint8_t)address);
291  break;
292  }
293 }
@@ -255,23 +256,35 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
297  // 1000 iterations is going to be approximately 100ms when the I2C
298  // clock is 100 kHz. If there has been no response in that time
299  // then we assume that the write has failed and timeout.
-
300  if (!_bus->endWrite())
+
300  if (!_bus->endWrite())
301  return false;
302  unsigned count = 1000;
303  while (count > 0) {
-
304  _bus->startWrite(i2cAddress);
-
305  if (_bus->endWrite())
+
304  _bus->startWrite(i2cAddress);
+
305  if (_bus->endWrite())
306  return true;
307  --count;
308  }
309  return false;
310 }
+
EEPROM24::size
unsigned long size() const
Returns the size of the EEPROM in bytes.
Definition: EEPROM24.h:65
+
EEPROM24::read
uint8_t read(unsigned long address)
Reads a single byte from the EEPROM at address.
Definition: EEPROM24.cpp:167
+
I2CMaster::write
virtual void write(uint8_t value)=0
Writes a single byte value on the I2C bus.
+
I2CMaster::startRead
virtual bool startRead(unsigned int address, unsigned int count)=0
Starts a read operation for count bytes by sending the start condition and the I2C control byte...
+
EEPROM24::EEPROM24
EEPROM24(I2CMaster &bus, unsigned long type, uint8_t bank=0)
Constructs a new EEPROM access object on bus for an EEPROM of the specified type. ...
Definition: EEPROM24.cpp:95
+
EEPROM24::write
bool write(unsigned long address, uint8_t value)
Writes a byte value to address in the EEPROM.
Definition: EEPROM24.cpp:213
+
I2CMaster::available
virtual unsigned int available()=0
Returns the number of bytes that are still available for reading.
+
I2CMaster::startWrite
virtual void startWrite(unsigned int address)
Starts a write operation by sending a start condition and the I2C control byte.
+
I2CMaster::endWrite
virtual bool endWrite()=0
Ends the current write operation.
+
I2CMaster
Abstract base class for I2C master implementations.
Definition: I2CMaster.h:28
+
EEPROM24::available
bool available()
Returns true if the EEPROM is available on the I2C bus; false otherwise.
Definition: EEPROM24.cpp:152
+
I2CMaster::read
virtual uint8_t read()=0
Reads a single byte from the I2C bus.
diff --git a/EEPROM24_8h_source.html b/EEPROM24_8h_source.html index eb43a109..2813203b 100644 --- a/EEPROM24_8h_source.html +++ b/EEPROM24_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: EEPROM24.h Source File @@ -29,7 +30,7 @@ - + @@ -115,7 +116,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
26 #include <inttypes.h>
27 #include <stddef.h>
28 
-
29 class I2CMaster;
+
29 class I2CMaster;
30 
31 // Block select modes.
32 #define EE_BSEL_NONE 0
@@ -146,24 +147,24 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
57 #define EEPROM_24LC1025 _EE24(131072UL, 128, EE_BSEL_17BIT_ADDR_ALT)
58 #define EEPROM_24LC1026 _EE24(131072UL, 128, EE_BSEL_17BIT_ADDR)
59 
-
60 class EEPROM24
+
60 class EEPROM24
61 {
62 public:
-
63  EEPROM24(I2CMaster &bus, unsigned long type, uint8_t bank = 0);
+
63  EEPROM24(I2CMaster &bus, unsigned long type, uint8_t bank = 0);
64 
-
65  unsigned long size() const { return _size; }
-
66  unsigned long pageSize() const { return _pageSize; }
+
65  unsigned long size() const { return _size; }
+
66  unsigned long pageSize() const { return _pageSize; }
67 
-
68  bool available();
+
68  bool available();
69 
-
70  uint8_t read(unsigned long address);
-
71  size_t read(unsigned long address, void *data, size_t length);
+
70  uint8_t read(unsigned long address);
+
71  size_t read(unsigned long address, void *data, size_t length);
72 
-
73  bool write(unsigned long address, uint8_t value);
-
74  size_t write(unsigned long address, const void *data, size_t length);
+
73  bool write(unsigned long address, uint8_t value);
+
74  size_t write(unsigned long address, const void *data, size_t length);
75 
76 private:
-
77  I2CMaster *_bus;
+
77  I2CMaster *_bus;
78  unsigned long _size;
79  unsigned long _pageSize;
80  uint8_t _mode;
@@ -174,12 +175,20 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
85 };
86 
87 #endif
+
EEPROM24::size
unsigned long size() const
Returns the size of the EEPROM in bytes.
Definition: EEPROM24.h:65
+
EEPROM24::read
uint8_t read(unsigned long address)
Reads a single byte from the EEPROM at address.
Definition: EEPROM24.cpp:167
+
EEPROM24
Reading and writing EEPROM's from the 24LCXX family.
Definition: EEPROM24.h:60
+
EEPROM24::EEPROM24
EEPROM24(I2CMaster &bus, unsigned long type, uint8_t bank=0)
Constructs a new EEPROM access object on bus for an EEPROM of the specified type. ...
Definition: EEPROM24.cpp:95
+
EEPROM24::write
bool write(unsigned long address, uint8_t value)
Writes a byte value to address in the EEPROM.
Definition: EEPROM24.cpp:213
+
EEPROM24::pageSize
unsigned long pageSize() const
Returns the size of a single EEPROM page in bytes.
Definition: EEPROM24.h:66
+
I2CMaster
Abstract base class for I2C master implementations.
Definition: I2CMaster.h:28
+
EEPROM24::available
bool available()
Returns true if the EEPROM is available on the I2C bus; false otherwise.
Definition: EEPROM24.cpp:152
diff --git a/Field_8cpp_source.html b/Field_8cpp_source.html index 26a53c1d..26807d3f 100644 --- a/Field_8cpp_source.html +++ b/Field_8cpp_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: Field.cpp Source File @@ -29,7 +30,7 @@ - + @@ -111,7 +112,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
22 
23 #include "Field.h"
24 
-
40 Field::Field(const String &label)
+
40 Field::Field(const String &label)
41  : _label(label)
42  , _form(0)
43  , next(0)
@@ -119,70 +120,85 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
45 {
46 }
47 
-
52 Field::Field(Form &form, const String &label)
+
52 Field::Field(Form &form, const String &label)
53  : _label(label)
54  , _form(0)
55  , next(0)
56  , prev(0)
57 {
-
58  form.addField(this);
+
58  form.addField(this);
59 }
60 
-
66 Field::~Field()
+
66 Field::~Field()
67 {
68  if (_form)
-
69  _form->removeField(this);
+
69  _form->removeField(this);
70 }
71 
-
96 int Field::dispatch(int event)
+
96 int Field::dispatch(int event)
97 {
98  // Nothing to do here.
99  return -1;
100 }
101 
-
116 void Field::enterField(bool reverse)
+
116 void Field::enterField(bool reverse)
117 {
-
118  lcd()->print(_label);
+
118  lcd()->print(_label);
119 }
120 
-
129 void Field::exitField()
+
129 void Field::exitField()
130 {
131  // Nothing to do here.
132 }
133 
-
146 void Field::setLabel(const String &label)
+
146 void Field::setLabel(const String &label)
147 {
-
148  if (isCurrent()) {
+
148  if (isCurrent()) {
149  unsigned int prevLen = _label.length();
150  unsigned int newLen = label.length();
-
151  _label = label;
-
152  lcd()->setCursor(0, 0);
-
153  lcd()->print(label);
+
151  _label = label;
+
152  lcd()->setCursor(0, 0);
+
153  lcd()->print(label);
154  while (newLen++ < prevLen)
-
155  lcd()->write(' ');
-
156  updateCursor();
+
155  lcd()->write(' ');
+
156  updateCursor();
157  } else {
-
158  _label = label;
+
158  _label = label;
159  }
160 }
161 
-
169 bool Field::isCurrent() const
+
169 bool Field::isCurrent() const
170 {
-
171  if (!_form->isVisible())
+
171  if (!_form->isVisible())
172  return false;
-
173  return _form->currentField() == this;
+
173  return _form->currentField() == this;
174 }
175 
-
191 void Field::updateCursor()
+
191 void Field::updateCursor()
192 {
193  // Nothing to do here.
194 }
+
Form::isVisible
bool isVisible() const
Returns true if the form is shown; false if the form is hidden.
Definition: Form.h:53
+
Form
Manager for a form containing data input/output fields.
Definition: Form.h:32
+
Field::enterField
virtual void enterField(bool reverse)
Enters the field due to form navigation.
Definition: Field.cpp:116
+
Field::dispatch
virtual int dispatch(int event)
Dispatches event via this field.
Definition: Field.cpp:96
+
Form::addField
void addField(Field *field)
Adds field to this form.
Definition: Form.cpp:165
+
Field::label
const String & label() const
Returns the label to display in the first line of this field.
Definition: Field.h:41
+
Field::lcd
LiquidCrystal * lcd() const
Returns the LCD that this field is being drawn on.
Definition: Field.h:47
+
Field::Field
Field(const String &label)
Constructs a new field with a specific label.
Definition: Field.cpp:40
+
Field::exitField
virtual void exitField()
Exits the field due to form navigation.
Definition: Field.cpp:129
+
Field::updateCursor
virtual void updateCursor()
Updates the cursor position after the label has been drawn by setLabel().
Definition: Field.cpp:191
+
Form::removeField
void removeField(Field *field)
Removes field from this form.
Definition: Form.cpp:187
+
Field::setLabel
void setLabel(const String &label)
Sets the label to display in the first line of this field.
Definition: Field.cpp:146
+
Field::~Field
~Field()
Destroys this field and removes it from its owning Form.
Definition: Field.cpp:66
+
Field::isCurrent
bool isCurrent() const
Returns true if this field is the currently-displayed field in its owning form; false otherwise...
Definition: Field.cpp:169
+
Form::currentField
Field * currentField() const
Returns the current field that is displayed on-screen.
Definition: Form.h:46
diff --git a/Field_8h_source.html b/Field_8h_source.html index 6207e134..b5b6fde1 100644 --- a/Field_8h_source.html +++ b/Field_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: Field.h Source File @@ -29,7 +30,7 @@ - + @@ -114,45 +115,58 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
25 
26 #include "Form.h"
27 
-
28 class Field {
+
28 class Field {
29 public:
-
30  explicit Field(const String &label);
-
31  Field(Form &form, const String &label);
-
32  ~Field();
+
30  explicit Field(const String &label);
+
31  Field(Form &form, const String &label);
+
32  ~Field();
33 
-
34  Form *form() const { return _form; }
+
34  Form *form() const { return _form; }
35 
-
36  virtual int dispatch(int event);
+
36  virtual int dispatch(int event);
37 
-
38  virtual void enterField(bool reverse);
-
39  virtual void exitField();
+
38  virtual void enterField(bool reverse);
+
39  virtual void exitField();
40 
-
41  const String &label() const { return _label; }
-
42  void setLabel(const String &label);
+
41  const String &label() const { return _label; }
+
42  void setLabel(const String &label);
43 
-
44  bool isCurrent() const;
+
44  bool isCurrent() const;
45 
46 protected:
-
47  LiquidCrystal *lcd() const { return _form->_lcd; }
+
47  LiquidCrystal *lcd() const { return _form->_lcd; }
48 
-
49  virtual void updateCursor();
+
49  virtual void updateCursor();
50 
51 private:
52  String _label;
-
53  Form *_form;
-
54  Field *next;
-
55  Field *prev;
+
53  Form *_form;
+
54  Field *next;
+
55  Field *prev;
56 
-
57  friend class Form;
+
57  friend class Form;
58 };
59 
60 #endif
+
Field
Manages a single data input/output field within a Form.
Definition: Field.h:28
+
Form
Manager for a form containing data input/output fields.
Definition: Form.h:32
+
Field::enterField
virtual void enterField(bool reverse)
Enters the field due to form navigation.
Definition: Field.cpp:116
+
Field::form
Form * form() const
Returns the Form that owns this field; null if not associated with a Form.
Definition: Field.h:34
+
Field::dispatch
virtual int dispatch(int event)
Dispatches event via this field.
Definition: Field.cpp:96
+
Field::label
const String & label() const
Returns the label to display in the first line of this field.
Definition: Field.h:41
+
Field::lcd
LiquidCrystal * lcd() const
Returns the LCD that this field is being drawn on.
Definition: Field.h:47
+
Field::Field
Field(const String &label)
Constructs a new field with a specific label.
Definition: Field.cpp:40
+
Field::exitField
virtual void exitField()
Exits the field due to form navigation.
Definition: Field.cpp:129
+
Field::updateCursor
virtual void updateCursor()
Updates the cursor position after the label has been drawn by setLabel().
Definition: Field.cpp:191
+
Field::setLabel
void setLabel(const String &label)
Sets the label to display in the first line of this field.
Definition: Field.cpp:146
+
Field::~Field
~Field()
Destroys this field and removes it from its owning Form.
Definition: Field.cpp:66
+
Field::isCurrent
bool isCurrent() const
Returns true if this field is the currently-displayed field in its owning form; false otherwise...
Definition: Field.cpp:169
diff --git a/Form_8cpp_source.html b/Form_8cpp_source.html index 9f9f0dcf..ce43524a 100644 --- a/Form_8cpp_source.html +++ b/Form_8cpp_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: Form.cpp Source File @@ -29,7 +30,7 @@ - + @@ -112,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
23 #include "Form.h"
24 #include "Field.h"
25 
-
47 Form::Form(LiquidCrystal &lcd)
+
47 Form::Form(LiquidCrystal &lcd)
48  : _lcd(&lcd)
49  , first(0)
50  , last(0)
@@ -120,10 +121,10 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
52 {
53 }
54 
-
58 Form::~Form()
+
58 Form::~Form()
59 {
-
60  Field *field = first;
-
61  Field *next;
+
60  Field *field = first;
+
61  Field *next;
62  while (field != 0) {
63  next = field->next;
64  field->_form = 0;
@@ -133,50 +134,50 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
68  }
69 }
70 
-
99 int Form::dispatch(int event)
+
99 int Form::dispatch(int event)
100 {
101  if (current) {
-
102  int exitval = current->dispatch(event);
+
102  int exitval = current->dispatch(event);
103  if (exitval >= 0)
104  return exitval;
105  }
106  if (event == LCD_BUTTON_LEFT)
-
107  prevField();
+
107  prevField();
108  else if (event == LCD_BUTTON_RIGHT)
-
109  nextField();
+
109  nextField();
110  return 0;
111 }
112 
-
118 void Form::nextField()
+
118 void Form::nextField()
119 {
-
120  Field *field = current;
+
120  Field *field = current;
121  if (!field)
122  field = first;
123  if (field && field->next)
124  field = field->next;
125  else
126  field = first;
-
127  setCurrentField(field);
+
127  setCurrentField(field);
128 }
129 
-
135 void Form::prevField()
+
135 void Form::prevField()
136 {
-
137  Field *field = current;
+
137  Field *field = current;
138  if (!field)
139  field = last;
140  if (field && field->prev)
141  field = field->prev;
142  else
143  field = last;
-
144  setCurrentField(field);
+
144  setCurrentField(field);
145 }
146 
-
152 void Form::defaultField()
+
152 void Form::defaultField()
153 {
-
154  setCurrentField(first);
+
154  setCurrentField(first);
155 }
156 
-
165 void Form::addField(Field *field)
+
165 void Form::addField(Field *field)
166 {
167  if (field->_form)
168  return; // Already added to a form.
@@ -190,17 +191,17 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
176  last = field;
177 }
178 
-
187 void Form::removeField(Field *field)
+
187 void Form::removeField(Field *field)
188 {
189  if (field->_form != this)
190  return; // Not a member of this form.
191  if (current == field) {
192  if (field->next)
-
193  setCurrentField(field->next);
+
193  setCurrentField(field->next);
194  else if (field->prev)
-
195  setCurrentField(field->prev);
+
195  setCurrentField(field->prev);
196  else
-
197  setCurrentField(0);
+
197  setCurrentField(0);
198  }
199  if (field->next)
200  field->next->prev = field->prev;
@@ -215,14 +216,14 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
209  field->prev = 0;
210 }
211 
-
230 void Form::setCurrentField(Field *field)
+
230 void Form::setCurrentField(Field *field)
231 {
232  if (field && field->_form != this)
233  return; // Wrong form.
234  if (visible) {
235  bool reverse = false;
236  if (current) {
-
237  current->exitField();
+
237  current->exitField();
238  if (field->next == current)
239  reverse = true;
240  else if (!field->next && current == first)
@@ -231,13 +232,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
243  current = field;
244  _lcd->clear();
245  if (current)
-
246  current->enterField(reverse);
+
246  current->enterField(reverse);
247  } else {
248  current = field;
249  }
250 }
251 
-
274 void Form::show()
+
274 void Form::show()
275 {
276  if (!visible) {
277  if (!current)
@@ -245,26 +246,41 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
279  visible = true;
280  _lcd->clear();
281  if (current)
-
282  current->enterField(false);
+
282  current->enterField(false);
283  }
284 }
285 
-
293 void Form::hide()
+
293 void Form::hide()
294 {
295  if (visible) {
296  if (current)
-
297  current->exitField();
+
297  current->exitField();
298  visible = false;
299  _lcd->clear();
300  }
301 }
302 
+
Form::Form
Form(LiquidCrystal &lcd)
Constructs a new form and associates it with lcd.
Definition: Form.cpp:47
+
Field
Manages a single data input/output field within a Form.
Definition: Field.h:28
+
Form::dispatch
int dispatch(int event)
Dispatches event to the currently active field using Field::dispatch().
Definition: Form.cpp:99
+
Form::nextField
void nextField()
Changes to the next field in the "tab order".
Definition: Form.cpp:118
+
Field::enterField
virtual void enterField(bool reverse)
Enters the field due to form navigation.
Definition: Field.cpp:116
+
Field::dispatch
virtual int dispatch(int event)
Dispatches event via this field.
Definition: Field.cpp:96
+
Form::addField
void addField(Field *field)
Adds field to this form.
Definition: Form.cpp:165
+
Form::hide
void hide()
Hides the form, or does nothing if the form is not on-screen.
Definition: Form.cpp:293
+
Field::exitField
virtual void exitField()
Exits the field due to form navigation.
Definition: Field.cpp:129
+
Form::removeField
void removeField(Field *field)
Removes field from this form.
Definition: Form.cpp:187
+
Form::setCurrentField
void setCurrentField(Field *field)
Sets the current field that is displayed on-screen.
Definition: Form.cpp:230
+
Form::~Form
~Form()
Detaches all remaining fields and destroys this form.
Definition: Form.cpp:58
+
Form::show
void show()
Shows the form, or does nothing if the form is already on-screen.
Definition: Form.cpp:274
+
Form::defaultField
void defaultField()
Changes to default field (i.e., the first field).
Definition: Form.cpp:152
+
Form::prevField
void prevField()
Changes to the previous field in the "tab order".
Definition: Form.cpp:135
diff --git a/Form_8h_source.html b/Form_8h_source.html index 34c45736..74df00a3 100644 --- a/Form_8h_source.html +++ b/Form_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: Form.h Source File @@ -29,7 +30,7 @@ - + @@ -114,50 +115,66 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
25 
26 #include "LCD.h"
27 
-
28 class Field;
+
28 class Field;
29 
30 #define FORM_CHANGED 1
31 
-
32 class Form {
+
32 class Form {
33 public:
-
34  explicit Form(LiquidCrystal &lcd);
-
35  ~Form();
+
34  explicit Form(LiquidCrystal &lcd);
+
35  ~Form();
36 
-
37  int dispatch(int event);
+
37  int dispatch(int event);
38 
-
39  void nextField();
-
40  void prevField();
-
41  void defaultField();
+
39  void nextField();
+
40  void prevField();
+
41  void defaultField();
42 
-
43  void addField(Field *field);
-
44  void removeField(Field *field);
+
43  void addField(Field *field);
+
44  void removeField(Field *field);
45 
-
46  Field *currentField() const { return current; }
-
47  void setCurrentField(Field *field);
+
46  Field *currentField() const { return current; }
+
47  void setCurrentField(Field *field);
48 
-
49  bool isCurrent(Field &field) const { return current == &field; }
+
49  bool isCurrent(Field &field) const { return current == &field; }
50 
-
51  void show();
-
52  void hide();
-
53  bool isVisible() const { return visible; }
+
51  void show();
+
52  void hide();
+
53  bool isVisible() const { return visible; }
54 
55 private:
56  LiquidCrystal *_lcd;
-
57  Field *first;
-
58  Field *last;
-
59  Field *current;
+
57  Field *first;
+
58  Field *last;
+
59  Field *current;
60  bool visible;
61 
-
62  friend class Field;
+
62  friend class Field;
63 };
64 
65 #endif
+
Form::isVisible
bool isVisible() const
Returns true if the form is shown; false if the form is hidden.
Definition: Form.h:53
+
Form::Form
Form(LiquidCrystal &lcd)
Constructs a new form and associates it with lcd.
Definition: Form.cpp:47
+
Field
Manages a single data input/output field within a Form.
Definition: Field.h:28
+
Form::dispatch
int dispatch(int event)
Dispatches event to the currently active field using Field::dispatch().
Definition: Form.cpp:99
+
Form
Manager for a form containing data input/output fields.
Definition: Form.h:32
+
Form::nextField
void nextField()
Changes to the next field in the "tab order".
Definition: Form.cpp:118
+
Form::addField
void addField(Field *field)
Adds field to this form.
Definition: Form.cpp:165
+
Form::hide
void hide()
Hides the form, or does nothing if the form is not on-screen.
Definition: Form.cpp:293
+
Form::removeField
void removeField(Field *field)
Removes field from this form.
Definition: Form.cpp:187
+
Form::setCurrentField
void setCurrentField(Field *field)
Sets the current field that is displayed on-screen.
Definition: Form.cpp:230
+
Form::~Form
~Form()
Detaches all remaining fields and destroys this form.
Definition: Form.cpp:58
+
Form::show
void show()
Shows the form, or does nothing if the form is already on-screen.
Definition: Form.cpp:274
+
Form::defaultField
void defaultField()
Changes to default field (i.e., the first field).
Definition: Form.cpp:152
+
Form::isCurrent
bool isCurrent(Field &field) const
Returns true if field is currently displayed on-screen, false otherwise.
Definition: Form.h:49
+
Form::prevField
void prevField()
Changes to the previous field in the "tab order".
Definition: Form.cpp:135
+
Form::currentField
Field * currentField() const
Returns the current field that is displayed on-screen.
Definition: Form.h:46
diff --git a/Hash_8cpp_source.html b/Hash_8cpp_source.html new file mode 100644 index 00000000..ebc1a03b --- /dev/null +++ b/Hash_8cpp_source.html @@ -0,0 +1,133 @@ + + + + + + +ArduinoLibs: Hash.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
Hash.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #include "Hash.h"
+
24 
+ +
36 {
+
37 }
+
38 
+ +
48 {
+
49 }
+
50 
+
Hash()
Constructs a new hash object.
Definition: Hash.cpp:35
+
virtual ~Hash()
Destroys this hash object.
Definition: Hash.cpp:47
+
+ + + + diff --git a/Hash_8h_source.html b/Hash_8h_source.html new file mode 100644 index 00000000..a3c6bb92 --- /dev/null +++ b/Hash_8h_source.html @@ -0,0 +1,153 @@ + + + + + + +ArduinoLibs: Hash.h Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
Hash.h
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #ifndef CRYPTO_HASH_h
+
24 #define CRYPTO_HASH_h
+
25 
+
26 #include <inttypes.h>
+
27 #include <stddef.h>
+
28 
+
29 class Hash
+
30 {
+
31 public:
+
32  Hash();
+
33  virtual ~Hash();
+
34 
+
35  virtual size_t hashSize() const = 0;
+
36  virtual size_t blockSize() const = 0;
+
37 
+
38  virtual void reset() = 0;
+
39  virtual void update(const void *data, size_t len) = 0;
+
40  virtual void finalize(void *hash, size_t len) = 0;
+
41 
+
42  virtual void clear() = 0;
+
43 };
+
44 
+
45 #endif
+
virtual size_t blockSize() const =0
Size of the internal block used by the hash algorithm.
+
virtual void clear()=0
Clears the hash state, removing all sensitive data, and then resets the hash ready for a new hashing ...
+
Hash()
Constructs a new hash object.
Definition: Hash.cpp:35
+
Abstract base class for cryptographic hash algorithms.
Definition: Hash.h:29
+
virtual void reset()=0
Resets the hash ready for a new hashing process.
+
virtual size_t hashSize() const =0
Size of the hash result from finalize().
+
virtual ~Hash()
Destroys this hash object.
Definition: Hash.cpp:47
+
virtual void update(const void *data, size_t len)=0
Updates the hash with more data.
+
virtual void finalize(void *hash, size_t len)=0
Finalizes the hashing process and returns the hash.
+
+ + + + diff --git a/I2CMaster_8cpp_source.html b/I2CMaster_8cpp_source.html index 10dd972f..613178fc 100644 --- a/I2CMaster_8cpp_source.html +++ b/I2CMaster_8cpp_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: I2CMaster.cpp Source File @@ -29,7 +30,7 @@ - + @@ -114,9 +115,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/I2CMaster_8h_source.html b/I2CMaster_8h_source.html index d3dfd3d0..48cbd7d6 100644 --- a/I2CMaster_8h_source.html +++ b/I2CMaster_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: I2CMaster.h Source File @@ -29,7 +30,7 @@ - + @@ -114,26 +115,34 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
25 
26 #include <inttypes.h>
27 
-
28 class I2CMaster {
+
28 class I2CMaster {
29 public:
-
30  virtual unsigned int maxTransferSize() const = 0;
+
30  virtual unsigned int maxTransferSize() const = 0;
31 
-
32  virtual void startWrite(unsigned int address);
-
33  virtual void write(uint8_t value) = 0;
-
34  virtual bool endWrite() = 0;
+
32  virtual void startWrite(unsigned int address);
+
33  virtual void write(uint8_t value) = 0;
+
34  virtual bool endWrite() = 0;
35 
-
36  virtual bool startRead(unsigned int address, unsigned int count) = 0;
-
37  virtual unsigned int available() = 0;
-
38  virtual uint8_t read() = 0;
+
36  virtual bool startRead(unsigned int address, unsigned int count) = 0;
+
37  virtual unsigned int available() = 0;
+
38  virtual uint8_t read() = 0;
39 };
40 
41 #endif
+
I2CMaster::write
virtual void write(uint8_t value)=0
Writes a single byte value on the I2C bus.
+
I2CMaster::startRead
virtual bool startRead(unsigned int address, unsigned int count)=0
Starts a read operation for count bytes by sending the start condition and the I2C control byte...
+
I2CMaster::maxTransferSize
virtual unsigned int maxTransferSize() const =0
Returns the maximum number of bytes that can be read or written in a single request by this bus maste...
+
I2CMaster::available
virtual unsigned int available()=0
Returns the number of bytes that are still available for reading.
+
I2CMaster::startWrite
virtual void startWrite(unsigned int address)
Starts a write operation by sending a start condition and the I2C control byte.
+
I2CMaster::endWrite
virtual bool endWrite()=0
Ends the current write operation.
+
I2CMaster
Abstract base class for I2C master implementations.
Definition: I2CMaster.h:28
+
I2CMaster::read
virtual uint8_t read()=0
Reads a single byte from the I2C bus.
diff --git a/IRreceiver_8cpp_source.html b/IRreceiver_8cpp_source.html index fb521c22..fcc9802c 100644 --- a/IRreceiver_8cpp_source.html +++ b/IRreceiver_8cpp_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: IRreceiver.cpp Source File @@ -29,7 +30,7 @@ - + @@ -116,14 +117,14 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
27 #include <WProgram.h>
28 #endif
29 
-
159 static IRreceiver *receiver = 0;
+
159 static IRreceiver *receiver = 0;
160 
161 void _IR_receive_interrupt(void)
162 {
163  receiver->handleInterrupt();
164 }
165 
-
176 IRreceiver::IRreceiver(int interruptNumber)
+
176 IRreceiver::IRreceiver(int interruptNumber)
177  : _system(0)
178  , _systemFilter(-1)
179  , started(false)
@@ -146,7 +147,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
196  attachInterrupt(interruptNumber, _IR_receive_interrupt, CHANGE);
197 }
198 
-
220 int IRreceiver::command()
+
220 int IRreceiver::command()
221 {
222  unsigned buf;
223 
@@ -176,7 +177,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
247  // Is this a new command or an auto-repeat of the previous command?
248  // Bit 11 will toggle whenever a new button press is started.
249  if (lastBuffer == buf)
-
250  cmd += AUTO_REPEAT;
+
250  cmd += AUTO_REPEAT;
251  else
252  lastBuffer = buf;
253  _system = (buf >> 6) & 0x1F;
@@ -253,12 +254,16 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
371  }
372  }
373 }
+
IRreceiver::IRreceiver
IRreceiver(int interruptNumber=0)
Constructs a new infrared remote control receiver that is attached to interruptNumber.
Definition: IRreceiver.cpp:176
+
IRreceiver
Manages the reception of RC-5 commands from an infrared remote control.
Definition: IRreceiver.h:29
+
IRreceiver::command
int command()
Returns the next command from the remote control.
Definition: IRreceiver.cpp:220
+
IRreceiver::AUTO_REPEAT
static const int AUTO_REPEAT
Flag that is added to the output of command() when the command is an auto-repeated button press rathe...
Definition: IRreceiver.h:34
diff --git a/IRreceiver_8h_source.html b/IRreceiver_8h_source.html index 36a817cd..da8fdc9d 100644 --- a/IRreceiver_8h_source.html +++ b/IRreceiver_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: IRreceiver.h Source File @@ -29,7 +30,7 @@ - + @@ -115,18 +116,18 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
26 #include <inttypes.h>
27 #include "RC5.h"
28 
-
29 class IRreceiver
+
29 class IRreceiver
30 {
31 public:
-
32  explicit IRreceiver(int interruptNumber = 0);
+
32  explicit IRreceiver(int interruptNumber = 0);
33 
-
34  static const int AUTO_REPEAT = 128;
+
34  static const int AUTO_REPEAT = 128;
35 
-
36  int command();
-
37  int system() const { return _system; }
+
36  int command();
+
37  int system() const { return _system; }
38 
-
39  int systemFilter() const { return _systemFilter; }
-
40  void setSystemFilter(int system) { _systemFilter = system; }
+
39  int systemFilter() const { return _systemFilter; }
+
40  void setSystemFilter(int system) { _systemFilter = system; }
41 
42 private:
43  int _system;
@@ -146,12 +147,19 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
57 };
58 
59 #endif
+
IRreceiver::system
int system() const
Returns the system number of the previous command(), indicating whether the command was for a TV...
Definition: IRreceiver.h:37
+
IRreceiver::IRreceiver
IRreceiver(int interruptNumber=0)
Constructs a new infrared remote control receiver that is attached to interruptNumber.
Definition: IRreceiver.cpp:176
+
IRreceiver
Manages the reception of RC-5 commands from an infrared remote control.
Definition: IRreceiver.h:29
+
IRreceiver::command
int command()
Returns the next command from the remote control.
Definition: IRreceiver.cpp:220
+
IRreceiver::setSystemFilter
void setSystemFilter(int system)
Sets the system to filter commands against, or -1 to turn off the system filter.
Definition: IRreceiver.h:40
+
IRreceiver::AUTO_REPEAT
static const int AUTO_REPEAT
Flag that is added to the output of command() when the command is an auto-repeated button press rathe...
Definition: IRreceiver.h:34
+
IRreceiver::systemFilter
int systemFilter() const
Returns the system to filter commands against, or -1 if no filter is set.
Definition: IRreceiver.h:39
diff --git a/IntField_8cpp_source.html b/IntField_8cpp_source.html index f2806a0f..076dbe5b 100644 --- a/IntField_8cpp_source.html +++ b/IntField_8cpp_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: IntField.cpp Source File @@ -29,7 +30,7 @@ - + @@ -111,8 +112,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
22 
23 #include "IntField.h"
24 
-
71 IntField::IntField(const String &label)
-
72  : Field(label)
+
71 IntField::IntField(const String &label)
+
72  : Field(label)
73  , _minValue(0)
74  , _maxValue(100)
75  , _stepValue(1)
@@ -121,8 +122,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
78 {
79 }
80 
-
88 IntField::IntField(Form &form, const String &label, int minValue, int maxValue, int stepValue, int value)
-
89  : Field(form, label)
+
88 IntField::IntField(Form &form, const String &label, int minValue, int maxValue, int stepValue, int value)
+
89  : Field(form, label)
90  , _minValue(minValue)
91  , _maxValue(maxValue)
92  , _stepValue(stepValue)
@@ -131,8 +132,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
95 {
96 }
97 
-
103 IntField::IntField(Form &form, const String &label, int minValue, int maxValue, int stepValue, int value, const String &suffix)
-
104  : Field(form, label)
+
103 IntField::IntField(Form &form, const String &label, int minValue, int maxValue, int stepValue, int value, const String &suffix)
+
104  : Field(form, label)
105  , _minValue(minValue)
106  , _maxValue(maxValue)
107  , _stepValue(stepValue)
@@ -142,41 +143,41 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
111 {
112 }
113 
-
114 int IntField::dispatch(int event)
+
114 int IntField::dispatch(int event)
115 {
116  if (event == LCD_BUTTON_UP) {
-
117  setValue(_value + _stepValue);
+
117  setValue(_value + _stepValue);
118  return FORM_CHANGED;
119  } else if (event == LCD_BUTTON_DOWN) {
-
120  setValue(_value - _stepValue);
+
120  setValue(_value - _stepValue);
121  return FORM_CHANGED;
122  }
123  return -1;
124 }
125 
-
126 void IntField::enterField(bool reverse)
+
126 void IntField::enterField(bool reverse)
127 {
-
128  Field::enterField(reverse);
+
128  Field::enterField(reverse);
129  printValue();
130 }
131 
-
198 void IntField::setValue(int value)
+
198 void IntField::setValue(int value)
199 {
200  if (value < _minValue)
201  value = _minValue;
202  else if (value > _maxValue)
203  value = _maxValue;
204  if (value != _value) {
-
205  _value = value;
-
206  if (isCurrent())
+
205  _value = value;
+
206  if (isCurrent())
207  printValue();
208  }
209 }
210 
-
231 void IntField::setSuffix(const String &suffix)
+
231 void IntField::setSuffix(const String &suffix)
232 {
-
233  _suffix = suffix;
-
234  if (isCurrent())
+
233  _suffix = suffix;
+
234  if (isCurrent())
235  printValue();
236 }
237 
@@ -185,19 +186,31 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
240  String str(_value);
241  if (_suffix.length())
242  str += _suffix;
-
243  lcd()->setCursor(0, 1);
-
244  lcd()->print(str);
+
243  lcd()->setCursor(0, 1);
+
244  lcd()->print(str);
245  unsigned int len = str.length();
246  while (len++ < _printLen)
-
247  lcd()->write(' ');
+
247  lcd()->write(' ');
248  _printLen = str.length();
249 }
+
Field
Manages a single data input/output field within a Form.
Definition: Field.h:28
+
Form
Manager for a form containing data input/output fields.
Definition: Form.h:32
+
Field::enterField
virtual void enterField(bool reverse)
Enters the field due to form navigation.
Definition: Field.cpp:116
+
IntField::setValue
void setValue(int value)
Sets the current value of this field.
Definition: IntField.cpp:198
+
IntField::dispatch
int dispatch(int event)
Dispatches event via this field.
Definition: IntField.cpp:114
+
Field::lcd
LiquidCrystal * lcd() const
Returns the LCD that this field is being drawn on.
Definition: Field.h:47
+
IntField::suffix
const String & suffix() const
Returns the suffix string to be displayed after the field's value.
Definition: IntField.h:50
+
IntField::value
int value() const
Returns the current value of this field.
Definition: IntField.h:47
+
IntField::IntField
IntField(const String &label)
Constructs a new integer field with a specific label.
Definition: IntField.cpp:71
+
IntField::setSuffix
void setSuffix(const String &suffix)
Sets the suffix string to be displayed after the field's value.
Definition: IntField.cpp:231
+
Field::isCurrent
bool isCurrent() const
Returns true if this field is the currently-displayed field in its owning form; false otherwise...
Definition: Field.cpp:169
+
IntField::enterField
void enterField(bool reverse)
Enters the field due to form navigation.
Definition: IntField.cpp:126
diff --git a/IntField_8h_source.html b/IntField_8h_source.html index a21a09cd..b1919b47 100644 --- a/IntField_8h_source.html +++ b/IntField_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: IntField.h Source File @@ -29,7 +30,7 @@ - + @@ -114,30 +115,30 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
25 
26 #include "Field.h"
27 
-
28 class IntField : public Field {
+
28 class IntField : public Field {
29 public:
-
30  explicit IntField(const String &label);
-
31  IntField(Form &form, const String &label, int minValue, int maxValue, int stepValue, int value);
-
32  IntField(Form &form, const String &label, int minValue, int maxValue, int stepValue, int value, const String &suffix);
+
30  explicit IntField(const String &label);
+
31  IntField(Form &form, const String &label, int minValue, int maxValue, int stepValue, int value);
+
32  IntField(Form &form, const String &label, int minValue, int maxValue, int stepValue, int value, const String &suffix);
33 
-
34  int dispatch(int event);
+
34  int dispatch(int event);
35 
-
36  void enterField(bool reverse);
+
36  void enterField(bool reverse);
37 
-
38  int minValue() const { return _minValue; }
-
39  void setMinValue(int value) { _minValue = value; }
+
38  int minValue() const { return _minValue; }
+
39  void setMinValue(int value) { _minValue = value; }
40 
-
41  int maxValue() const { return _maxValue; }
-
42  void setMaxValue(int value) { _maxValue = value; }
+
41  int maxValue() const { return _maxValue; }
+
42  void setMaxValue(int value) { _maxValue = value; }
43 
-
44  int stepValue() const { return _stepValue; }
-
45  void setStepValue(int value) { _stepValue = value; }
+
44  int stepValue() const { return _stepValue; }
+
45  void setStepValue(int value) { _stepValue = value; }
46 
-
47  int value() const { return _value; }
-
48  void setValue(int value);
+
47  int value() const { return _value; }
+
48  void setValue(int value);
49 
-
50  const String &suffix() const { return _suffix; }
-
51  void setSuffix(const String &suffix);
+
50  const String &suffix() const { return _suffix; }
+
51  void setSuffix(const String &suffix);
52 
53 private:
54  int _minValue;
@@ -151,12 +152,30 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
62 };
63 
64 #endif
+
IntField
Field that manages the input of an integer value.
Definition: IntField.h:28
+
Field
Manages a single data input/output field within a Form.
Definition: Field.h:28
+
Form
Manager for a form containing data input/output fields.
Definition: Form.h:32
+
Field::form
Form * form() const
Returns the Form that owns this field; null if not associated with a Form.
Definition: Field.h:34
+
IntField::setValue
void setValue(int value)
Sets the current value of this field.
Definition: IntField.cpp:198
+
IntField::minValue
int minValue() const
Returns the minimum value for the input field.
Definition: IntField.h:38
+
Field::label
const String & label() const
Returns the label to display in the first line of this field.
Definition: Field.h:41
+
IntField::dispatch
int dispatch(int event)
Dispatches event via this field.
Definition: IntField.cpp:114
+
IntField::setMinValue
void setMinValue(int value)
Sets the minimum value for the input field.
Definition: IntField.h:39
+
IntField::suffix
const String & suffix() const
Returns the suffix string to be displayed after the field's value.
Definition: IntField.h:50
+
IntField::stepValue
int stepValue() const
Returns the step value to use when increasing or decreasing the value() due to Up and Down button pre...
Definition: IntField.h:44
+
IntField::value
int value() const
Returns the current value of this field.
Definition: IntField.h:47
+
IntField::setMaxValue
void setMaxValue(int value)
Sets the maximum value for the input field.
Definition: IntField.h:42
+
IntField::IntField
IntField(const String &label)
Constructs a new integer field with a specific label.
Definition: IntField.cpp:71
+
IntField::maxValue
int maxValue() const
Returns the maximum value for the input field.
Definition: IntField.h:41
+
IntField::setStepValue
void setStepValue(int value)
Sets the step value value to use when increasing or decreasing the value() due to Up and Down button ...
Definition: IntField.h:45
+
IntField::setSuffix
void setSuffix(const String &suffix)
Sets the suffix string to be displayed after the field's value.
Definition: IntField.cpp:231
+
IntField::enterField
void enterField(bool reverse)
Enters the field due to form navigation.
Definition: IntField.cpp:126
diff --git a/LCD_8cpp_source.html b/LCD_8cpp_source.html index ec582bd9..6921b682 100644 --- a/LCD_8cpp_source.html +++ b/LCD_8cpp_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: LCD.cpp Source File @@ -29,7 +30,7 @@ - + @@ -145,10 +146,10 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
150  timeout = 0;
151  lastRestore = millis();
152  screenSaved = false;
-
153  mode = DisplayOff;
+
153  mode = DisplayOff;
154 }
155 
-
182 void LCD::setBacklightPin(uint8_t pin)
+
182 void LCD::setBacklightPin(uint8_t pin)
183 {
184  if (_backlightPin != pin) {
185  if (backlightInit) {
@@ -163,9 +164,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
194  }
195 }
196 
-
206 void LCD::display()
+
206 void LCD::display()
207 {
-
208  LiquidCrystal::display();
+
208  LiquidCrystal::display();
209  pinMode(_backlightPin, OUTPUT);
210  digitalWrite(_backlightPin, HIGH);
211  screenSaved = false;
@@ -173,40 +174,40 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
213  lastRestore = millis();
214 }
215 
-
223 void LCD::noDisplay()
+
223 void LCD::noDisplay()
224 {
-
225  if (mode == DisplayOff)
-
226  LiquidCrystal::noDisplay();
+
225  if (mode == DisplayOff)
+
226  LiquidCrystal::noDisplay();
227  pinMode(_backlightPin, OUTPUT);
228  digitalWrite(_backlightPin, LOW);
229  screenSaved = true;
230  backlightInit = true;
231 }
232 
-
268 void LCD::setScreenSaverMode(ScreenSaverMode mode)
+
268 void LCD::setScreenSaverMode(ScreenSaverMode mode)
269 {
270  if (this->mode != mode) {
271  this->mode = mode;
272  if (screenSaved)
-
273  noDisplay();
+
273  noDisplay();
274  else
-
275  display();
+
275  display();
276  }
277 }
278 
-
294 void LCD::enableScreenSaver(int timeoutSecs)
+
294 void LCD::enableScreenSaver(int timeoutSecs)
295 {
296  if (timeoutSecs < 0)
297  timeout = 0;
298  else
299  timeout = ((unsigned long)timeoutSecs) * 1000;
-
300  display();
+
300  display();
301 }
302 
-
308 void LCD::disableScreenSaver()
+
308 void LCD::disableScreenSaver()
309 {
310  timeout = 0;
-
311  display();
+
311  display();
312 }
313 
321 // Button mapping table generated by genlookup.c
@@ -216,11 +217,11 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
325 };
326 #define mapButton(value) (pgm_read_byte(&(buttonMappings[(value) >> 5])))
327 
-
353 int LCD::getButton()
+
353 int LCD::getButton()
354 {
355  // Initialize the backlight for the first time if necessary.
356  if (!backlightInit)
-
357  display();
+
357  display();
358 
359  // Read the currently pressed button.
360  int button = mapButton(analogRead(LCD_BUTTON_PIN));
@@ -238,7 +239,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
372  prevButton = button;
373  if (screenSaved) {
374  // Button pressed when screen saver active.
-
375  if (mode == BacklightOnSelect) {
+
375  if (mode == BacklightOnSelect) {
376  // Turn on the back light only if Select was pressed.
377  if (button == LCD_BUTTON_SELECT) {
378  pinMode(_backlightPin, OUTPUT);
@@ -246,14 +247,14 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
380  screenSaved = false;
381  backlightInit = true;
382  }
-
383  } else if (mode == DisplayOff) {
-
384  display();
+
383  } else if (mode == DisplayOff) {
+
384  display();
385  eatRelease = true;
386  return LCD_BUTTON_NONE;
387  } else {
-
388  display();
+
388  display();
389  }
-
390  } else if (mode == BacklightOnSelect && button != LCD_BUTTON_SELECT) {
+
390  } else if (mode == BacklightOnSelect && button != LCD_BUTTON_SELECT) {
391  eatRelease = false;
392  return button;
393  }
@@ -272,16 +273,26 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
406  } else {
407  if (!screenSaved && prevButton == LCD_BUTTON_NONE &&
408  timeout != 0 && (currentTime - lastRestore) >= timeout)
-
409  noDisplay(); // Activate screen saver.
+
409  noDisplay(); // Activate screen saver.
410  return LCD_BUTTON_NONE;
411  }
412 }
+
LCD::setScreenSaverMode
void setScreenSaverMode(ScreenSaverMode mode)
Sets the current screen saver mode.
Definition: LCD.cpp:268
+
LCD::getButton
int getButton()
Gets the next button press, release, or idle event.
Definition: LCD.cpp:353
+
LCD::BacklightOnSelect
Same as BacklightOff but the screen saver is only deactivated when Select is pressed; other buttons h...
Definition: LCD.h:66
+
LCD::ScreenSaverMode
ScreenSaverMode
Screen saver mode that controls the display and back light.
Definition: LCD.h:62
+
LCD::setBacklightPin
void setBacklightPin(uint8_t pin)
Sets the back light pin for the LCD shield.
Definition: LCD.cpp:182
+
LCD::enableScreenSaver
void enableScreenSaver(int timeoutSecs=10)
Enables the screen saver and causes it to activate after timeoutSecs of inactivity on the buttons...
Definition: LCD.cpp:294
+
LCD::noDisplay
void noDisplay()
Turns off the display of text on the LCD and the back light.
Definition: LCD.cpp:223
+
LCD::DisplayOff
Turn off both the display and the backlight when the screen saver is activated.
Definition: LCD.h:64
+
LCD::disableScreenSaver
void disableScreenSaver()
Disables the screen saver.
Definition: LCD.cpp:308
+
LCD::display
void display()
Turns on the display of text on the LCD and the back light.
Definition: LCD.cpp:206
diff --git a/LCD_8h_source.html b/LCD_8h_source.html index 853abd82..ee349b6f 100644 --- a/LCD_8h_source.html +++ b/LCD_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: LCD.h Source File @@ -29,7 +30,7 @@ - + @@ -134,55 +135,75 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
45 #define LCD_BUTTON_DOWN_RELEASED -4
46 #define LCD_BUTTON_SELECT_RELEASED -5
47 
-
48 class LCD : public LiquidCrystal {
+
48 class LCD : public LiquidCrystal {
49 public:
-
50  LCD() : LiquidCrystal(8, 9, 4, 5, 6, 7) { init(); }
-
51  LCD(uint8_t pin9) : LiquidCrystal(8, pin9, 4, 5, 6, 7) { init(); }
-
52 
-
53  uint8_t backlightPin() const { return _backlightPin; }
-
54  void setBacklightPin(uint8_t pin);
+
50  LCD() : LiquidCrystal(8, 9, 4, 5, 6, 7) { init(); }
+
51  LCD(uint8_t pin9) : LiquidCrystal(8, pin9, 4, 5, 6, 7) { init(); }
+
52  LCD(uint8_t rs, uint8_t enable,
+
53  uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
+
54  : LiquidCrystal(rs, enable, d0, d1, d2, d3) { init(); }
55 
-
56  void display();
-
57  void noDisplay();
+
56  uint8_t backlightPin() const { return _backlightPin; }
+
57  void setBacklightPin(uint8_t pin);
58 
-
59  enum ScreenSaverMode
-
60  {
-
61  DisplayOff,
-
62  BacklightOff,
-
63  BacklightOnSelect
-
64  };
-
65 
-
66  ScreenSaverMode screenSaverMode() const { return mode; }
-
67  void setScreenSaverMode(ScreenSaverMode mode);
+
59  void display();
+
60  void noDisplay();
+
61 
+
62  enum ScreenSaverMode
+
63  {
+
64  DisplayOff,
+
65  BacklightOff,
+
66  BacklightOnSelect
+
67  };
68 
-
69  void enableScreenSaver(int timeoutSecs = 10);
-
70  void disableScreenSaver();
-
71  bool isScreenSaved() const { return screenSaved; }
-
72 
-
73  int getButton();
-
74 
-
75 private:
-
76  uint8_t _backlightPin;
-
77  bool backlightInit;
-
78  int prevButton;
-
79  int debounceButton;
-
80  unsigned long timeout;
-
81  unsigned long lastRestore;
-
82  unsigned long lastDebounce;
-
83  bool screenSaved;
-
84  bool eatRelease;
-
85  ScreenSaverMode mode;
-
86 
-
87  void init();
-
88 };
+
69  ScreenSaverMode screenSaverMode() const { return mode; }
+
70  void setScreenSaverMode(ScreenSaverMode mode);
+
71 
+
72  void enableScreenSaver(int timeoutSecs = 10);
+
73  void disableScreenSaver();
+
74  bool isScreenSaved() const { return screenSaved; }
+
75 
+
76  int getButton();
+
77 
+
78 private:
+
79  uint8_t _backlightPin;
+
80  bool backlightInit;
+
81  int prevButton;
+
82  int debounceButton;
+
83  unsigned long timeout;
+
84  unsigned long lastRestore;
+
85  unsigned long lastDebounce;
+
86  bool screenSaved;
+
87  bool eatRelease;
+
88  ScreenSaverMode mode;
89 
-
90 #endif
+
90  void init();
+
91 };
+
92 
+
93 #endif
+
LCD::setScreenSaverMode
void setScreenSaverMode(ScreenSaverMode mode)
Sets the current screen saver mode.
Definition: LCD.cpp:268
+
LCD::getButton
int getButton()
Gets the next button press, release, or idle event.
Definition: LCD.cpp:353
+
LCD::BacklightOnSelect
Same as BacklightOff but the screen saver is only deactivated when Select is pressed; other buttons h...
Definition: LCD.h:66
+
LCD::ScreenSaverMode
ScreenSaverMode
Screen saver mode that controls the display and back light.
Definition: LCD.h:62
+
LCD::BacklightOff
Turn off the back light but leave the display on when the screen saver is activated.
Definition: LCD.h:65
+
LCD::setBacklightPin
void setBacklightPin(uint8_t pin)
Sets the back light pin for the LCD shield.
Definition: LCD.cpp:182
+
LCD::LCD
LCD()
Initialize the Freetronics LCD display with the default pin assignment.
Definition: LCD.h:50
+
LCD::enableScreenSaver
void enableScreenSaver(int timeoutSecs=10)
Enables the screen saver and causes it to activate after timeoutSecs of inactivity on the buttons...
Definition: LCD.cpp:294
+
LCD::LCD
LCD(uint8_t pin9)
Initialize the Freetronics LCD display for USBDroid.
Definition: LCD.h:51
+
LCD::noDisplay
void noDisplay()
Turns off the display of text on the LCD and the back light.
Definition: LCD.cpp:223
+
LCD::DisplayOff
Turn off both the display and the backlight when the screen saver is activated.
Definition: LCD.h:64
+
LCD::disableScreenSaver
void disableScreenSaver()
Disables the screen saver.
Definition: LCD.cpp:308
+
LCD::display
void display()
Turns on the display of text on the LCD and the back light.
Definition: LCD.cpp:206
+
LCD::backlightPin
uint8_t backlightPin() const
Returns the pin that is being used to control the back light. The default is 3.
Definition: LCD.h:56
+
LCD
Enhanced library for Freetronics 16x2 LCD shields.
Definition: LCD.h:48
+
LCD::isScreenSaved
bool isScreenSaved() const
Returns true if the screen has been saved; false otherwise.
Definition: LCD.h:74
+
LCD::screenSaverMode
ScreenSaverMode screenSaverMode() const
Returns the current screen saver mode; default is DisplayOff.
Definition: LCD.h:69
diff --git a/ListField_8cpp_source.html b/ListField_8cpp_source.html index 06c0a33a..a559a8e7 100644 --- a/ListField_8cpp_source.html +++ b/ListField_8cpp_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: ListField.cpp Source File @@ -29,7 +30,7 @@ - + @@ -112,8 +113,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
23 #include "ListField.h"
24 #include <string.h>
25 
-
64 ListField::ListField(const String &label)
-
65  : Field(label)
+
64 ListField::ListField(const String &label)
+
65  : Field(label)
66  , _items(0)
67  , _itemCount(0)
68  , _value(-1)
@@ -121,96 +122,108 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
70 {
71 }
72 
-
77 ListField::ListField(Form &form, const String &label, ListItems items, int value)
-
78  : Field(form, label)
+
77 ListField::ListField(Form &form, const String &label, ListItems items, int value)
+
78  : Field(form, label)
79  , _items(0)
80  , _itemCount(0)
81  , _value(value)
82  , _printLen(0)
83 {
-
84  setItems(items);
+
84  setItems(items);
85 }
86 
-
87 int ListField::dispatch(int event)
+
87 int ListField::dispatch(int event)
88 {
89  if (event == LCD_BUTTON_DOWN) {
90  if (_value >= (_itemCount - 1))
-
91  setValue(0);
+
91  setValue(0);
92  else
-
93  setValue(_value + 1);
+
93  setValue(_value + 1);
94  return FORM_CHANGED;
95  } else if (event == LCD_BUTTON_UP) {
96  if (_value <= 0)
-
97  setValue(_itemCount - 1);
+
97  setValue(_itemCount - 1);
98  else
-
99  setValue(_value - 1);
+
99  setValue(_value - 1);
100  return FORM_CHANGED;
101  }
102  return -1;
103 }
104 
-
105 void ListField::enterField(bool reverse)
+
105 void ListField::enterField(bool reverse)
106 {
-
107  Field::enterField(reverse);
+
107  Field::enterField(reverse);
108  _printLen = 0;
109  printValue();
110 }
111 
-
141 void ListField::setItems(ListItems items)
+
141 void ListField::setItems(ListItems items)
142 {
-
143  _items = items;
+
143  _items = items;
144  _itemCount = 0;
145  if (items) {
146  for (;;) {
147  ListItem item = (ListItem)pgm_read_word(items);
148  if (!item)
149  break;
-
150  ++items;
+
150  ++items;
151  ++_itemCount;
152  }
153  }
154  if (_value >= _itemCount)
155  _value = _itemCount - 1;
-
156  if (isCurrent())
+
156  if (isCurrent())
157  printValue();
158 }
159 
-
178 void ListField::setValue(int value)
+
178 void ListField::setValue(int value)
179 {
180  if (_value != value) {
-
181  _value = value;
+
181  _value = value;
182  if (_value < 0)
183  _value = 0;
184  if (_value >= _itemCount)
185  _value = _itemCount - 1;
-
186  if (isCurrent())
+
186  if (isCurrent())
187  printValue();
188  }
189 }
190 
191 void ListField::printValue()
192 {
-
193  lcd()->setCursor(0, 1);
+
193  lcd()->setCursor(0, 1);
194  int len = 0;
195  if (_value >= 0) {
196  ListItem str = (ListItem)pgm_read_word(&(_items[_value]));
197  char ch;
198  while ((ch = pgm_read_byte(str)) != 0) {
-
199  lcd()->write(ch);
+
199  lcd()->write(ch);
200  ++len;
201  ++str;
202  }
203  }
204  while (_printLen-- > len)
-
205  lcd()->write(' ');
+
205  lcd()->write(' ');
206  _printLen = len;
207 }
+
ListField::ListField
ListField(const String &label)
Constructs a new list field with a specific label.
Definition: ListField.cpp:64
+
Field
Manages a single data input/output field within a Form.
Definition: Field.h:28
+
ListField::value
int value() const
Returns the value of this list; i.e. the index within items() of the selected item.
Definition: ListField.h:44
+
Form
Manager for a form containing data input/output fields.
Definition: Form.h:32
+
Field::enterField
virtual void enterField(bool reverse)
Enters the field due to form navigation.
Definition: Field.cpp:116
+
ListField::setItems
void setItems(ListItems items)
Sets the array of items for this list.
Definition: ListField.cpp:141
+
Field::lcd
LiquidCrystal * lcd() const
Returns the LCD that this field is being drawn on.
Definition: Field.h:47
+
ListField::items
ListItems items() const
Returns the array of items in this list.
Definition: ListField.h:41
+
ListField::enterField
void enterField(bool reverse)
Enters the field due to form navigation.
Definition: ListField.cpp:105
+
ListField::setValue
void setValue(int value)
Sets the value of this list; i.e. the index within items() of the selected item.
Definition: ListField.cpp:178
+
ListField::dispatch
int dispatch(int event)
Dispatches event via this field.
Definition: ListField.cpp:87
+
Field::isCurrent
bool isCurrent() const
Returns true if this field is the currently-displayed field in its owning form; false otherwise...
Definition: Field.cpp:169
diff --git a/ListField_8h_source.html b/ListField_8h_source.html index 749400ce..781ed465 100644 --- a/ListField_8h_source.html +++ b/ListField_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: ListField.h Source File @@ -29,7 +30,7 @@ - + @@ -118,20 +119,20 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
29 typedef PGM_P ListItem;
30 typedef const PROGMEM ListItem *ListItems;
31 
-
32 class ListField : public Field {
+
32 class ListField : public Field {
33 public:
-
34  explicit ListField(const String &label);
-
35  ListField(Form &form, const String &label, ListItems items, int value = 0);
+
34  explicit ListField(const String &label);
+
35  ListField(Form &form, const String &label, ListItems items, int value = 0);
36 
-
37  int dispatch(int event);
+
37  int dispatch(int event);
38 
-
39  void enterField(bool reverse);
+
39  void enterField(bool reverse);
40 
-
41  ListItems items() const { return _items; }
-
42  void setItems(ListItems items);
+
41  ListItems items() const { return _items; }
+
42  void setItems(ListItems items);
43 
-
44  int value() const { return _value; }
-
45  void setValue(int value);
+
44  int value() const { return _value; }
+
45  void setValue(int value);
46 
47 private:
48  ListItems _items;
@@ -143,12 +144,24 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
54 };
55 
56 #endif
+
ListField::ListField
ListField(const String &label)
Constructs a new list field with a specific label.
Definition: ListField.cpp:64
+
Field
Manages a single data input/output field within a Form.
Definition: Field.h:28
+
ListField::value
int value() const
Returns the value of this list; i.e. the index within items() of the selected item.
Definition: ListField.h:44
+
Form
Manager for a form containing data input/output fields.
Definition: Form.h:32
+
Field::form
Form * form() const
Returns the Form that owns this field; null if not associated with a Form.
Definition: Field.h:34
+
ListField::setItems
void setItems(ListItems items)
Sets the array of items for this list.
Definition: ListField.cpp:141
+
Field::label
const String & label() const
Returns the label to display in the first line of this field.
Definition: Field.h:41
+
ListField::items
ListItems items() const
Returns the array of items in this list.
Definition: ListField.h:41
+
ListField::enterField
void enterField(bool reverse)
Enters the field due to form navigation.
Definition: ListField.cpp:105
+
ListField::setValue
void setValue(int value)
Sets the value of this list; i.e. the index within items() of the selected item.
Definition: ListField.cpp:178
+
ListField
Field that manages selection from a static list of items.
Definition: ListField.h:32
+
ListField::dispatch
int dispatch(int event)
Dispatches event via this field.
Definition: ListField.cpp:87
diff --git a/Melody_8cpp_source.html b/Melody_8cpp_source.html index 2784b67b..61b93880 100644 --- a/Melody_8cpp_source.html +++ b/Melody_8cpp_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: Melody.cpp Source File @@ -29,7 +30,7 @@ - + @@ -116,7 +117,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
27 #include <WProgram.h>
28 #endif
29 
-
85 Melody::Melody(uint8_t pin)
+
85 Melody::Melody(uint8_t pin)
86  : _pin(pin)
87  , playing(false)
88  , _loopCount(0)
@@ -130,7 +131,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
96 {
97 }
98 
-
131 void Melody::setLoopDuration(unsigned long ms)
+
131 void Melody::setLoopDuration(unsigned long ms)
132 {
133  unsigned long duration = 0;
134  for (unsigned int index = 0; index < size; ++index)
@@ -140,9 +141,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
138  _loopCount = 1; // Play the melody at least once.
139 }
140 
-
146 void Melody::play()
+
146 void Melody::play()
147 {
-
148  stop();
+
148  stop();
149  if (size == 0)
150  return; // No melody to play.
151  loopsLeft = _loopCount;
@@ -151,9 +152,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
154  nextNote();
155 }
156 
-
162 void Melody::playOnce()
+
162 void Melody::playOnce()
163 {
-
164  stop();
+
164  stop();
165  if (size == 0)
166  return; // No melody to play.
167  loopsLeft = 1;
@@ -162,7 +163,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
170  nextNote();
171 }
172 
-
178 void Melody::stop()
+
178 void Melody::stop()
179 {
180  if (!playing)
181  return;
@@ -170,15 +171,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
183  noTone(_pin);
184 }
185 
-
199 void Melody::setMelody(const int *notes, const uint8_t *lengths, unsigned int size)
+
199 void Melody::setMelody(const int *notes, const uint8_t *lengths, unsigned int size)
200 {
-
201  stop();
+
201  stop();
202  this->notes = notes;
203  this->lengths = lengths;
204  this->size = size;
205 }
206 
-
214 void Melody::run()
+
214 void Melody::run()
215 {
216  if (!playing)
217  return;
@@ -192,7 +193,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
225 {
226  if (posn >= size) {
227  if (loopsLeft != 0 && --loopsLeft <= 0) {
-
228  stop();
+
228  stop();
229  return;
230  }
231  posn = 0;
@@ -204,12 +205,19 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
237  duration = duration * 13 / 10; // i.e., duration * 1.3
238  startNote = millis();
239 }
+
Melody::setMelody
void setMelody(const int *notes, const uint8_t *lengths, unsigned int size)
Sets the melody to the size elements of notes and lengths.
Definition: Melody.cpp:199
+
Melody::stop
void stop()
Stops playing the melody.
Definition: Melody.cpp:178
+
Melody::run
void run()
Runs the melody control loop.
Definition: Melody.cpp:214
+
Melody::playOnce
void playOnce()
Plays the melody once and then stops.
Definition: Melody.cpp:162
+
Melody::Melody
Melody(uint8_t pin)
Constructs a new melody playing object for pin.
Definition: Melody.cpp:85
+
Melody::setLoopDuration
void setLoopDuration(unsigned long ms)
Sets the maximum number of loops to last no longer than ms milliseconds.
Definition: Melody.cpp:131
+
Melody::play
void play()
Starts playing the melody, or restarts it if already playing.
Definition: Melody.cpp:146
diff --git a/Melody_8h_source.html b/Melody_8h_source.html index ecdb817a..8ec982ee 100644 --- a/Melody_8h_source.html +++ b/Melody_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: Melody.h Source File @@ -29,7 +30,7 @@ - + @@ -208,24 +209,24 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
119 // Special note value that indicates a rest.
120 #define NOTE_REST 0
121 
-
122 class Melody {
+
122 class Melody {
123 public:
-
124  Melody(uint8_t pin);
+
124  Melody(uint8_t pin);
125 
-
126  bool isPlaying() const { return playing; }
+
126  bool isPlaying() const { return playing; }
127 
-
128  int loopCount() const { return _loopCount; }
-
129  void setLoopCount(int count) { _loopCount = count; }
+
128  int loopCount() const { return _loopCount; }
+
129  void setLoopCount(int count) { _loopCount = count; }
130 
-
131  void setLoopDuration(unsigned long ms);
+
131  void setLoopDuration(unsigned long ms);
132 
-
133  void play();
-
134  void playOnce();
-
135  void stop();
+
133  void play();
+
134  void playOnce();
+
135  void stop();
136 
-
137  void setMelody(const int *notes, const uint8_t *lengths, unsigned int size);
+
137  void setMelody(const int *notes, const uint8_t *lengths, unsigned int size);
138 
-
139  void run();
+
139  void run();
140 
141 private:
142  uint8_t _pin;
@@ -243,12 +244,23 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
154 };
155 
156 #endif
+
Melody::setMelody
void setMelody(const int *notes, const uint8_t *lengths, unsigned int size)
Sets the melody to the size elements of notes and lengths.
Definition: Melody.cpp:199
+
Melody::stop
void stop()
Stops playing the melody.
Definition: Melody.cpp:178
+
Melody::run
void run()
Runs the melody control loop.
Definition: Melody.cpp:214
+
Melody::isPlaying
bool isPlaying() const
Returns true if the melody is currently playing; false if not.
Definition: Melody.h:126
+
Melody::playOnce
void playOnce()
Plays the melody once and then stops.
Definition: Melody.cpp:162
+
Melody::Melody
Melody(uint8_t pin)
Constructs a new melody playing object for pin.
Definition: Melody.cpp:85
+
Melody::loopCount
int loopCount() const
Returns the number of times the melody should loop before stopping.
Definition: Melody.h:128
+
Melody
Plays a melody on a digital output pin using tone().
Definition: Melody.h:122
+
Melody::setLoopDuration
void setLoopDuration(unsigned long ms)
Sets the maximum number of loops to last no longer than ms milliseconds.
Definition: Melody.cpp:131
+
Melody::play
void play()
Starts playing the melody, or restarts it if already playing.
Definition: Melody.cpp:146
+
Melody::setLoopCount
void setLoopCount(int count)
Sets the number of times the melody should loop to count.
Definition: Melody.h:129
diff --git a/Mono5x7_8h_source.html b/Mono5x7_8h_source.html index 3f7f4472..9e2c9ca2 100644 --- a/Mono5x7_8h_source.html +++ b/Mono5x7_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: Mono5x7.h Source File @@ -29,7 +30,7 @@ - + @@ -245,9 +246,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/NoiseSource_8cpp_source.html b/NoiseSource_8cpp_source.html new file mode 100644 index 00000000..10ace87e --- /dev/null +++ b/NoiseSource_8cpp_source.html @@ -0,0 +1,140 @@ + + + + + + +ArduinoLibs: NoiseSource.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
NoiseSource.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #include "NoiseSource.h"
+
24 #include "RNG.h"
+
25 
+ +
37 {
+
38 }
+
39 
+ +
44 {
+
45 }
+
46 
+
102 void NoiseSource::output(const uint8_t *data, size_t len, unsigned int credit)
+
103 {
+
104  RNG.stir(data, len, credit);
+
105 }
+
NoiseSource()
Constructs a new random noise source.
Definition: NoiseSource.cpp:36
+
virtual void output(const uint8_t *data, size_t len, unsigned int credit)
Called from subclasses to output noise to the global random number pool.
+
virtual ~NoiseSource()
Destroys this random noise source.
Definition: NoiseSource.cpp:43
+
void stir(const uint8_t *data, size_t len, unsigned int credit=0)
Stirs additional entropy data into the random pool.
Definition: RNG.cpp:387
+
+ + + + diff --git a/NoiseSource_8h_source.html b/NoiseSource_8h_source.html new file mode 100644 index 00000000..159c96f5 --- /dev/null +++ b/NoiseSource_8h_source.html @@ -0,0 +1,147 @@ + + + + + + +ArduinoLibs: NoiseSource.h Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
NoiseSource.h
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #ifndef CRYPTO_NOISESOURCE_H
+
24 #define CRYPTO_NOISESOURCE_H
+
25 
+
26 #include <inttypes.h>
+
27 #include <stddef.h>
+
28 
+ +
30 {
+
31 public:
+
32  NoiseSource();
+
33  virtual ~NoiseSource();
+
34 
+
35  virtual bool calibrating() const = 0;
+
36  virtual void stir() = 0;
+
37 
+
38 protected:
+
39  virtual void output(const uint8_t *data, size_t len, unsigned int credit);
+
40 };
+
41 
+
42 #endif
+
NoiseSource()
Constructs a new random noise source.
Definition: NoiseSource.cpp:36
+
virtual void stir()=0
Stirs entropy from this noise source into the global random number pool.
+
Abstract base class for random noise sources.
Definition: NoiseSource.h:29
+
virtual void output(const uint8_t *data, size_t len, unsigned int credit)
Called from subclasses to output noise to the global random number pool.
+
virtual ~NoiseSource()
Destroys this random noise source.
Definition: NoiseSource.cpp:43
+
virtual bool calibrating() const =0
Determine if the noise source is still calibrating itself.
+
+ + + + diff --git a/OFB_8cpp_source.html b/OFB_8cpp_source.html new file mode 100644 index 00000000..c43623d6 --- /dev/null +++ b/OFB_8cpp_source.html @@ -0,0 +1,214 @@ + + + + + + +ArduinoLibs: OFB.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
OFB.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #include "OFB.h"
+
24 #include "Crypto.h"
+
25 #include <string.h>
+
26 
+ +
43  : blockCipher(0)
+
44  , posn(16)
+
45 {
+
46 }
+
47 
+ +
52 {
+
53  clean(iv);
+
54 }
+
55 
+
56 size_t OFBCommon::keySize() const
+
57 {
+
58  return blockCipher->keySize();
+
59 }
+
60 
+
61 size_t OFBCommon::ivSize() const
+
62 {
+
63  return 16;
+
64 }
+
65 
+
66 bool OFBCommon::setKey(const uint8_t *key, size_t len)
+
67 {
+
68  // Verify the cipher's block size, just in case.
+
69  if (blockCipher->blockSize() != 16)
+
70  return false;
+
71 
+
72  // Set the key on the underlying block cipher.
+
73  return blockCipher->setKey(key, len);
+
74 }
+
75 
+
76 bool OFBCommon::setIV(const uint8_t *iv, size_t len)
+
77 {
+
78  if (len != 16)
+
79  return false;
+
80  memcpy(this->iv, iv, 16);
+
81  posn = 16;
+
82  return true;
+
83 }
+
84 
+
85 void OFBCommon::encrypt(uint8_t *output, const uint8_t *input, size_t len)
+
86 {
+
87  uint8_t size;
+
88  while (len > 0) {
+
89  // If we have exhausted the current keystream block, then encrypt
+
90  // the IV/ciphertext to get another keystream block.
+
91  if (posn >= 16) {
+
92  blockCipher->encryptBlock(iv, iv);
+
93  posn = 0;
+
94  }
+
95 
+
96  // XOR the plaintext with the encrypted IV to get the new ciphertext.
+
97  size = 16 - posn;
+
98  if (size > len)
+
99  size = len;
+
100  len -= size;
+
101  while (size > 0) {
+
102  *output++ = *input++ ^ iv[posn++];
+
103  --size;
+
104  }
+
105  }
+
106 }
+
107 
+
108 void OFBCommon::decrypt(uint8_t *output, const uint8_t *input, size_t len)
+
109 {
+
110  encrypt(output, input, len);
+
111 }
+
112 
+ +
114 {
+
115  blockCipher->clear();
+
116  clean(iv);
+
117  posn = 16;
+
118 }
+
119 
+
void clear()
Clears all security-sensitive state from this cipher.
Definition: OFB.cpp:113
+
bool setKey(const uint8_t *key, size_t len)
Sets the key to use for future encryption and decryption operations.
Definition: OFB.cpp:66
+
virtual void encryptBlock(uint8_t *output, const uint8_t *input)=0
Encrypts a single block using this cipher.
+
OFBCommon()
Constructs a new cipher in OFB mode.
Definition: OFB.cpp:42
+
void encrypt(uint8_t *output, const uint8_t *input, size_t len)
Encrypts an input buffer and writes the ciphertext to an output buffer.
Definition: OFB.cpp:85
+
virtual bool setKey(const uint8_t *key, size_t len)=0
Sets the key to use for future encryption and decryption operations.
+
void decrypt(uint8_t *output, const uint8_t *input, size_t len)
Decrypts an input buffer and writes the plaintext to an output buffer.
Definition: OFB.cpp:108
+
size_t keySize() const
Default size of the key for this cipher, in bytes.
Definition: OFB.cpp:56
+
virtual void clear()=0
Clears all security-sensitive state from this block cipher.
+
bool setIV(const uint8_t *iv, size_t len)
Sets the initialization vector to use for future encryption and decryption operations.
Definition: OFB.cpp:76
+
virtual size_t blockSize() const =0
Size of a single block processed by this cipher, in bytes.
+
virtual size_t keySize() const =0
Default size of the key for this block cipher, in bytes.
+
virtual ~OFBCommon()
Destroys this cipher object after clearing sensitive information.
Definition: OFB.cpp:51
+
size_t ivSize() const
Size of the initialization vector for this cipher, in bytes.
Definition: OFB.cpp:61
+
+ + + + diff --git a/OFB_8h_source.html b/OFB_8h_source.html new file mode 100644 index 00000000..99dd66c1 --- /dev/null +++ b/OFB_8h_source.html @@ -0,0 +1,179 @@ + + + + + + +ArduinoLibs: OFB.h Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
OFB.h
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #ifndef CRYPTO_OFB_h
+
24 #define CRYPTO_OFB_h
+
25 
+
26 #include "Cipher.h"
+
27 #include "BlockCipher.h"
+
28 
+
29 class OFBCommon : public Cipher
+
30 {
+
31 public:
+
32  virtual ~OFBCommon();
+
33 
+
34  size_t keySize() const;
+
35  size_t ivSize() const;
+
36 
+
37  bool setKey(const uint8_t *key, size_t len);
+
38  bool setIV(const uint8_t *iv, size_t len);
+
39 
+
40  void encrypt(uint8_t *output, const uint8_t *input, size_t len);
+
41  void decrypt(uint8_t *output, const uint8_t *input, size_t len);
+
42 
+
43  void clear();
+
44 
+
45 protected:
+
46  OFBCommon();
+
47  void setBlockCipher(BlockCipher *cipher) { blockCipher = cipher; }
+
48 
+
49 private:
+
50  BlockCipher *blockCipher;
+
51  uint8_t iv[16];
+
52  uint8_t posn;
+
53 };
+
54 
+
55 template <typename T>
+
56 class OFB : public OFBCommon
+
57 {
+
58 public:
+
59  OFB() { setBlockCipher(&cipher); }
+
60 
+
61 private:
+
62  T cipher;
+
63 };
+
64 
+
65 #endif
+
Abstract base class for stream ciphers.
Definition: Cipher.h:29
+
Abstract base class for block ciphers.
Definition: BlockCipher.h:29
+
Concrete base class to assist with implementing OFB for 128-bit block ciphers.
Definition: OFB.h:29
+
void clear()
Clears all security-sensitive state from this cipher.
Definition: OFB.cpp:113
+
bool setKey(const uint8_t *key, size_t len)
Sets the key to use for future encryption and decryption operations.
Definition: OFB.cpp:66
+
OFBCommon()
Constructs a new cipher in OFB mode.
Definition: OFB.cpp:42
+
void encrypt(uint8_t *output, const uint8_t *input, size_t len)
Encrypts an input buffer and writes the ciphertext to an output buffer.
Definition: OFB.cpp:85
+
void decrypt(uint8_t *output, const uint8_t *input, size_t len)
Decrypts an input buffer and writes the plaintext to an output buffer.
Definition: OFB.cpp:108
+
size_t keySize() const
Default size of the key for this cipher, in bytes.
Definition: OFB.cpp:56
+
OFB()
Constructs a new OFB object for the block cipher T.
Definition: OFB.h:59
+
bool setIV(const uint8_t *iv, size_t len)
Sets the initialization vector to use for future encryption and decryption operations.
Definition: OFB.cpp:76
+
virtual ~OFBCommon()
Destroys this cipher object after clearing sensitive information.
Definition: OFB.cpp:51
+
void setBlockCipher(BlockCipher *cipher)
Sets the block cipher to use for this OFB object.
Definition: OFB.h:47
+
size_t ivSize() const
Size of the initialization vector for this cipher, in bytes.
Definition: OFB.cpp:61
+
Implementation of the Output Feedback (OFB) mode for 128-bit block ciphers.
Definition: OFB.h:56
+
+ + + + diff --git a/PowerSave_8cpp_source.html b/PowerSave_8cpp_source.html index 9f32365f..876a058c 100644 --- a/PowerSave_8cpp_source.html +++ b/PowerSave_8cpp_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: PowerSave.cpp Source File @@ -29,7 +30,7 @@ - + @@ -121,7 +122,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
49 {
50  wdt_disable();
51 }
-
132 void sleepFor(SleepDuration duration, uint8_t mode)
+
132 void sleepFor(SleepDuration duration, uint8_t mode)
133 {
134  // Turn off the analog to digital converter.
135  ADCSRA &= ~(1 << ADEN);
@@ -149,12 +150,14 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
157 }
158 
159 /*\@}*/
+
sleepFor
void sleepFor(SleepDuration duration, uint8_t mode)
Puts the CPU to sleep for a specific duration.The analog to digital converter and the brown out detec...
Definition: PowerSave.cpp:132
+
SleepDuration
SleepDuration
Duration to put the CPU to sleep with sleepFor().
Definition: PowerSave.h:38
diff --git a/PowerSave_8h_source.html b/PowerSave_8h_source.html index 97a8c5ec..f116d2b0 100644 --- a/PowerSave_8h_source.html +++ b/PowerSave_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: PowerSave.h Source File @@ -29,7 +30,7 @@ - + @@ -118,35 +119,48 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
29 #include <WProgram.h>
30 #endif
31 
-
32 inline void unusedPin(uint8_t pin)
+
32 inline void unusedPin(uint8_t pin)
33 {
34  pinMode(pin, INPUT);
35  digitalWrite(pin, HIGH);
36 }
37 
-
38 enum SleepDuration
+
38 enum SleepDuration
39 {
-
40  SLEEP_15_MS,
-
41  SLEEP_30_MS,
-
42  SLEEP_60_MS,
-
43  SLEEP_120_MS,
-
44  SLEEP_250_MS,
-
45  SLEEP_500_MS,
-
46  SLEEP_1_SEC,
-
47  SLEEP_2_SEC,
-
48  SLEEP_4_SEC,
-
49  SLEEP_8_SEC
+
40  SLEEP_15_MS,
+
41  SLEEP_30_MS,
+
42  SLEEP_60_MS,
+
43  SLEEP_120_MS,
+
44  SLEEP_250_MS,
+
45  SLEEP_500_MS,
+
46  SLEEP_1_SEC,
+
47  SLEEP_2_SEC,
+
48  SLEEP_4_SEC,
+
49  SLEEP_8_SEC
50 };
51 
-
52 void sleepFor(SleepDuration duration, uint8_t mode = 0);
+
52 void sleepFor(SleepDuration duration, uint8_t mode = 0);
53 
54 #endif
+
unusedPin
void unusedPin(uint8_t pin)
Marks an I/O pin as unused.This function sets pin to be an input with pullups enabled, which will reduce power consumption compared to pins that are left floating.
Definition: PowerSave.h:32
+
SLEEP_60_MS
Sleep for 60 milliseconds.
Definition: PowerSave.h:42
+
SLEEP_250_MS
Sleep for 250 milliseconds.
Definition: PowerSave.h:44
+
sleepFor
void sleepFor(SleepDuration duration, uint8_t mode=0)
Puts the CPU to sleep for a specific duration.The analog to digital converter and the brown out detec...
Definition: PowerSave.cpp:132
+
SLEEP_120_MS
Sleep for 120 milliseconds.
Definition: PowerSave.h:43
+
SleepDuration
SleepDuration
Duration to put the CPU to sleep with sleepFor().
Definition: PowerSave.h:38
+
SLEEP_30_MS
Sleep for 30 milliseconds.
Definition: PowerSave.h:41
+
SLEEP_2_SEC
Sleep for 2 seconds.
Definition: PowerSave.h:47
+
SLEEP_8_SEC
Sleep for 8 seconds.
Definition: PowerSave.h:49
+
SLEEP_1_SEC
Sleep for 1 second.
Definition: PowerSave.h:46
+
SLEEP_4_SEC
Sleep for 4 seconds.
Definition: PowerSave.h:48
+
SLEEP_500_MS
Sleep for 500 milliseconds.
Definition: PowerSave.h:45
+
SLEEP_15_MS
Sleep for 15 milliseconds.
Definition: PowerSave.h:40
diff --git a/RC5_8h_source.html b/RC5_8h_source.html index 09989393..fa80ad18 100644 --- a/RC5_8h_source.html +++ b/RC5_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: RC5.h Source File @@ -29,7 +30,7 @@ - + @@ -434,9 +435,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/RNG_8cpp_source.html b/RNG_8cpp_source.html new file mode 100644 index 00000000..85bfe62b --- /dev/null +++ b/RNG_8cpp_source.html @@ -0,0 +1,373 @@ + + + + + + +ArduinoLibs: RNG.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
RNG.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #include "RNG.h"
+
24 #include "NoiseSource.h"
+
25 #include "ChaCha.h"
+
26 #include "Crypto.h"
+
27 #include "utility/ProgMemUtil.h"
+
28 #include <Arduino.h>
+
29 #include <avr/eeprom.h>
+
30 #include <string.h>
+
31 
+
117 RNGClass RNG;
+
118 
+
124 // Number of ChaCha hash rounds to use for random number generation.
+
125 #define RNG_ROUNDS 20
+
126 
+
127 // Force a rekey after this many blocks of random data.
+
128 #define RNG_REKEY_BLOCKS 16
+
129 
+
130 // Maximum entropy credit that can be contained in the pool.
+
131 #define RNG_MAX_CREDITS 384
+
132 
+
135 // Tag for 256-bit ChaCha20 keys. This will always appear in the
+
136 // first 16 bytes of the block. The remaining 48 bytes are the seed.
+
137 static const char tagRNG[16] PROGMEM = {
+
138  'e', 'x', 'p', 'a', 'n', 'd', ' ', '3',
+
139  '2', '-', 'b', 'y', 't', 'e', ' ', 'k'
+
140 };
+
141 
+
142 // Initialization seed. This is the ChaCha20 output of hashing
+
143 // "expand 32-byte k" followed by 48 bytes set to the numbers 1 to 48.
+
144 // The ChaCha20 output block is then truncated to the first 48 bytes.
+
145 //
+
146 // This value is intended to start the RNG in a semi-chaotic state if
+
147 // we don't have a previously saved seed in EEPROM.
+
148 static const uint8_t initRNG[48] PROGMEM = {
+
149  0xB0, 0x2A, 0xAE, 0x7D, 0xEE, 0xCB, 0xBB, 0xB1,
+
150  0xFC, 0x03, 0x6F, 0xDD, 0xDC, 0x7D, 0x76, 0x67,
+
151  0x0C, 0xE8, 0x1F, 0x0D, 0xA3, 0xA0, 0xAA, 0x1E,
+
152  0xB0, 0xBD, 0x72, 0x6B, 0x2B, 0x4C, 0x8A, 0x7E,
+
153  0x34, 0xFC, 0x37, 0x60, 0xF4, 0x1E, 0x22, 0xA0,
+
154  0x0B, 0xFB, 0x18, 0x84, 0x60, 0xA5, 0x77, 0x72
+
155 };
+
156 
+ +
168  : address(0)
+
169  , credits(0)
+
170  , firstSave(1)
+
171  , timer(0)
+
172  , timeout(3600000UL) // 1 hour in milliseconds
+
173 {
+
174 }
+
175 
+ +
180 {
+
181  clean(block);
+
182  clean(stream);
+
183 }
+
184 
+
202 void RNGClass::begin(const char *tag, int eepromAddress)
+
203 {
+
204  // Save the EEPROM address for use by save().
+
205  address = eepromAddress;
+
206 
+
207  // Initialize the ChaCha20 input block from the saved seed.
+
208  memcpy_P(block, tagRNG, sizeof(tagRNG));
+
209  memcpy_P(block + 4, initRNG, sizeof(initRNG));
+
210  if (eeprom_read_byte((const uint8_t *)address) == 'S') {
+
211  // We have a saved seed: XOR it with the initialization block.
+
212  for (int posn = 0; posn < 12; ++posn) {
+
213  block[posn + 4] ^=
+
214  eeprom_read_dword((const uint32_t *)(address + posn * 4 + 1));
+
215  }
+
216  }
+
217 
+
218  // No entropy credits for the saved seed.
+
219  credits = 0;
+
220 
+
221  // Trigger an automatic save once the entropy credits max out.
+
222  firstSave = 1;
+
223 
+
224  // Rekey the random number generator immediately.
+
225  rekey();
+
226 
+
227  // Stir in the supplied tag data but don't credit any entropy to it.
+
228  if (tag)
+
229  stir((const uint8_t *)tag, strlen(tag));
+
230 
+
231  // Re-save the seed to obliterate the previous value and to ensure
+
232  // that if the system is reset without a call to save() that we won't
+
233  // accidentally generate the same sequence of random data again.
+
234  save();
+
235 }
+
236 
+
253 void RNGClass::setAutoSaveTime(uint16_t minutes)
+
254 {
+
255  if (!minutes)
+
256  minutes = 1; // Just in case.
+
257  timeout = ((uint32_t)minutes) * 60000U;
+
258 }
+
259 
+
277 void RNGClass::rand(uint8_t *data, size_t len)
+
278 {
+
279  // Decrease the amount of entropy in the pool.
+
280  if (len > (credits / 8))
+
281  credits = 0;
+
282  else
+
283  credits -= len * 8;
+
284 
+
285  // Generate the random data.
+
286  uint8_t count = 0;
+
287  while (len > 0) {
+
288  // Force a rekey if we have generated too many blocks in this request.
+
289  if (count >= RNG_REKEY_BLOCKS) {
+
290  rekey();
+
291  count = 1;
+
292  } else {
+
293  ++count;
+
294  }
+
295 
+
296  // Increment the low counter word and generate a new keystream block.
+
297  ++(block[12]);
+
298  ChaCha::hashCore(stream, block, RNG_ROUNDS);
+
299 
+
300  // Copy the data to the return buffer.
+
301  if (len < 64) {
+
302  memcpy(data, stream, len);
+
303  break;
+
304  } else {
+
305  memcpy(data, stream, 64);
+
306  data += 64;
+
307  len -= 64;
+
308  }
+
309  }
+
310 
+
311  // Force a rekey after every request.
+
312  rekey();
+
313 }
+
314 
+
354 bool RNGClass::available(size_t len) const
+
355 {
+
356  if (len >= (RNG_MAX_CREDITS / 8))
+
357  return credits >= RNG_MAX_CREDITS;
+
358  else
+
359  return len <= (credits / 8);
+
360 }
+
361 
+
387 void RNGClass::stir(const uint8_t *data, size_t len, unsigned int credit)
+
388 {
+
389  // Increase the entropy credit.
+
390  if ((credit / 8) >= len)
+
391  credit = len * 8;
+
392  if ((RNG_MAX_CREDITS - credits) > credit)
+
393  credits += credit;
+
394  else
+
395  credits = RNG_MAX_CREDITS;
+
396 
+
397  // Process the supplied input data.
+
398  if (len > 0) {
+
399  // XOR the data with the ChaCha input block in 48 byte
+
400  // chunks and rekey the ChaCha cipher for each chunk to mix
+
401  // the data in. This should scatter any "true entropy" in
+
402  // the input across the entire block.
+
403  while (len > 0) {
+
404  size_t templen = len;
+
405  if (templen > 48)
+
406  templen = 48;
+
407  uint8_t *output = ((uint8_t *)block) + 16;
+
408  len -= templen;
+
409  while (templen > 0) {
+
410  *output++ ^= *data++;
+
411  --templen;
+
412  }
+
413  rekey();
+
414  }
+
415  } else {
+
416  // There was no input data, so just force a rekey so we
+
417  // get some mixing of the state even without new data.
+
418  rekey();
+
419  }
+
420 
+
421  // Save if this is the first time we have reached max entropy.
+
422  // This provides some protection if the system is powered off before
+
423  // the first auto-save timeout occurs.
+
424  if (firstSave && credits >= RNG_MAX_CREDITS) {
+
425  firstSave = 0;
+
426  save();
+
427  }
+
428 }
+
429 
+ +
438 {
+
439  source.stir();
+
440 }
+
441 
+ +
469 {
+
470  // Generate random data from the current state and save
+
471  // that as the seed. Then force a rekey.
+
472  ++(block[12]);
+
473  ChaCha::hashCore(stream, block, RNG_ROUNDS);
+
474  eeprom_write_block(stream, (void *)(address + 1), 48);
+
475  eeprom_update_byte((uint8_t *)address, 'S');
+
476  rekey();
+
477  timer = millis();
+
478 }
+
479 
+ +
487 {
+
488  // Save the seed if the auto-save timer has expired.
+
489  if ((millis() - timer) >= timeout)
+
490  save();
+
491 }
+
492 
+ +
514 {
+
515  clean(block);
+
516  clean(stream);
+
517  for (int posn = 0; posn < SEED_SIZE; ++posn)
+
518  eeprom_write_byte((uint8_t *)(address + posn), 0xFF);
+
519 }
+
520 
+
524 void RNGClass::rekey()
+
525 {
+
526  // Rekey the cipher for the next request by generating a new block.
+
527  // This is intended to make it difficult to wind the random number
+
528  // backwards if the state is captured later. The first 16 bytes of
+
529  // "block" remain set to "tagRNG".
+
530  ++(block[12]);
+
531  ChaCha::hashCore(stream, block, RNG_ROUNDS);
+
532  memcpy(block + 4, stream, 48);
+
533 
+
534  // Permute the high word of the counter using the system microsecond
+
535  // counter to introduce a little bit of non-stir randomness for each
+
536  // request. Note: If random data is requested on a predictable schedule
+
537  // then this may not help very much. It is still necessary to stir in
+
538  // high quality entropy data on a regular basis using stir().
+
539  block[13] ^= micros();
+
540 }
+
void save()
Saves the random seed to EEPROM.
Definition: RNG.cpp:468
+
void rand(uint8_t *data, size_t len)
Generates random bytes into a caller-supplied buffer.
Definition: RNG.cpp:277
+
void begin(const char *tag, int eepromAddress)
Initializes the random number generator.
Definition: RNG.cpp:202
+
virtual void stir()=0
Stirs entropy from this noise source into the global random number pool.
+
Abstract base class for random noise sources.
Definition: NoiseSource.h:29
+
~RNGClass()
Destroys this random number generator instance.
Definition: RNG.cpp:179
+
RNGClass()
Constructs a new random number generator instance.
Definition: RNG.cpp:167
+
void destroy()
Destroys the data in the random number pool and the saved seed in EEPROM.
Definition: RNG.cpp:513
+
bool available(size_t len) const
Determine if there is sufficient entropy available for a specific request size.
Definition: RNG.cpp:354
+
void loop()
Run periodic housekeeping tasks on the random number generator.
Definition: RNG.cpp:486
+
Pseudo random number generator suitable for cryptography.
Definition: RNG.h:31
+
static const int SEED_SIZE
Size of a saved random number seed in EEPROM space.
Definition: RNG.h:53
+
static void hashCore(uint32_t *output, const uint32_t *input, uint8_t rounds)
Executes the ChaCha hash core on an input memory block.
Definition: ChaCha.cpp:230
+
void stir(const uint8_t *data, size_t len, unsigned int credit=0)
Stirs additional entropy data into the random pool.
Definition: RNG.cpp:387
+
void setAutoSaveTime(uint16_t minutes)
Sets the amount of time between automatic seed saves.
Definition: RNG.cpp:253
+
+ + + + diff --git a/RNG_8h_source.html b/RNG_8h_source.html new file mode 100644 index 00000000..b25c953d --- /dev/null +++ b/RNG_8h_source.html @@ -0,0 +1,181 @@ + + + + + + +ArduinoLibs: RNG.h Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
RNG.h
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #ifndef CRYPTO_RNG_h
+
24 #define CRYPTO_RNG_h
+
25 
+
26 #include <inttypes.h>
+
27 #include <stddef.h>
+
28 
+
29 class NoiseSource;
+
30 
+
31 class RNGClass
+
32 {
+
33 public:
+
34  RNGClass();
+
35  ~RNGClass();
+
36 
+
37  void begin(const char *tag, int eepromAddress);
+
38 
+
39  void setAutoSaveTime(uint16_t minutes);
+
40 
+
41  void rand(uint8_t *data, size_t len);
+
42  bool available(size_t len) const;
+
43 
+
44  void stir(const uint8_t *data, size_t len, unsigned int credit = 0);
+
45  void stir(NoiseSource &source);
+
46 
+
47  void save();
+
48 
+
49  void loop();
+
50 
+
51  void destroy();
+
52 
+
53  static const int SEED_SIZE = 49;
+
54 
+
55 private:
+
56  uint32_t block[16];
+
57  uint32_t stream[16];
+
58  int address;
+
59  uint16_t credits : 15;
+
60  uint16_t firstSave : 1;
+
61  unsigned long timer;
+
62  unsigned long timeout;
+
63 
+
64  void rekey();
+
65 };
+
66 
+
67 extern RNGClass RNG;
+
68 
+
69 #endif
+
void save()
Saves the random seed to EEPROM.
Definition: RNG.cpp:468
+
void rand(uint8_t *data, size_t len)
Generates random bytes into a caller-supplied buffer.
Definition: RNG.cpp:277
+
void begin(const char *tag, int eepromAddress)
Initializes the random number generator.
Definition: RNG.cpp:202
+
Abstract base class for random noise sources.
Definition: NoiseSource.h:29
+
~RNGClass()
Destroys this random number generator instance.
Definition: RNG.cpp:179
+
RNGClass()
Constructs a new random number generator instance.
Definition: RNG.cpp:167
+
void destroy()
Destroys the data in the random number pool and the saved seed in EEPROM.
Definition: RNG.cpp:513
+
bool available(size_t len) const
Determine if there is sufficient entropy available for a specific request size.
Definition: RNG.cpp:354
+
void loop()
Run periodic housekeeping tasks on the random number generator.
Definition: RNG.cpp:486
+
Pseudo random number generator suitable for cryptography.
Definition: RNG.h:31
+
static const int SEED_SIZE
Size of a saved random number seed in EEPROM space.
Definition: RNG.h:53
+
void stir(const uint8_t *data, size_t len, unsigned int credit=0)
Stirs additional entropy data into the random pool.
Definition: RNG.cpp:387
+
void setAutoSaveTime(uint16_t minutes)
Sets the amount of time between automatic seed saves.
Definition: RNG.cpp:253
+
+ + + + diff --git a/RTC_8cpp_source.html b/RTC_8cpp_source.html index 501c0dff..05e88f33 100644 --- a/RTC_8cpp_source.html +++ b/RTC_8cpp_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: RTC.cpp Source File @@ -29,7 +30,7 @@ - + @@ -152,28 +153,28 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
89  return (year % 4) == 0;
90 }
91 
-
92 inline uint8_t monthLength(const RTCDate *date)
+
92 inline uint8_t monthLength(const RTCDate *date)
93 {
-
94  if (date->month != 2 || !isLeapYear(date->year))
-
95  return monthLengths[date->month - 1];
+
94  if (date->month != 2 || !isLeapYear(date->year))
+
95  return monthLengths[date->month - 1];
96  else
97  return 29;
98 }
99 
-
105 RTC::RTC()
+
105 RTC::RTC()
106  : midnight(millis() - 9 * MILLIS_PER_HOUR) // Simulated clock starts at 9am
107  , nvram(0)
108 {
109  // Start the simulated date at 1 Jan, 2000.
-
110  date.day = 1;
-
111  date.month = 1;
-
112  date.year = 2000;
+
110  date.day = 1;
+
111  date.month = 1;
+
112  date.year = 2000;
113 
114  // Set all simulated alarms to 6am by default.
-
115  for (uint8_t index = 0; index < ALARM_COUNT; ++index) {
-
116  alarms[index].hour = 6;
-
117  alarms[index].minute = 0;
-
118  alarms[index].flags = 0;
+
115  for (uint8_t index = 0; index < ALARM_COUNT; ++index) {
+
116  alarms[index].hour = 6;
+
117  alarms[index].minute = 0;
+
118  alarms[index].flags = 0;
119  }
120 }
121 
@@ -183,12 +184,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
125  free(nvram);
126 }
127 
-
134 bool RTC::hasUpdates()
+
134 bool RTC::hasUpdates()
135 {
136  return true;
137 }
138 
-
144 void RTC::readTime(RTCTime *value)
+
144 void RTC::readTime(RTCTime *value)
145 {
146  // Determine the number of seconds since the last midnight event.
147  unsigned long sinceMidnight = millis() - midnight;
@@ -198,49 +199,49 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
151  sinceMidnight -= MILLIS_PER_DAY;
152 
153  // Increment the simulated date.
-
154  adjustDays(&date, INCREMENT);
+
154  adjustDays(&date, INCREMENT);
155  }
-
156  value->second = (uint8_t)(((sinceMidnight / MILLIS_PER_SECOND) % 60));
-
157  value->minute = (uint8_t)(((sinceMidnight / MILLIS_PER_MINUTE) % 60));
-
158  value->hour = (uint8_t)(sinceMidnight / MILLIS_PER_HOUR);
+
156  value->second = (uint8_t)(((sinceMidnight / MILLIS_PER_SECOND) % 60));
+
157  value->minute = (uint8_t)(((sinceMidnight / MILLIS_PER_MINUTE) % 60));
+
158  value->hour = (uint8_t)(sinceMidnight / MILLIS_PER_HOUR);
159 }
160 
-
169 void RTC::readDate(RTCDate *value)
+
169 void RTC::readDate(RTCDate *value)
170 {
171  *value = date;
172 }
173 
-
179 void RTC::writeTime(const RTCTime *value)
+
179 void RTC::writeTime(const RTCTime *value)
180 {
181  // Adjust the position of the last simulated midnight event.
182  unsigned long sinceMidnight =
-
183  value->second * MILLIS_PER_SECOND +
-
184  value->minute * MILLIS_PER_MINUTE +
-
185  value->hour * MILLIS_PER_HOUR;
+
183  value->second * MILLIS_PER_SECOND +
+
184  value->minute * MILLIS_PER_MINUTE +
+
185  value->hour * MILLIS_PER_HOUR;
186  midnight = millis() - sinceMidnight;
187 }
188 
-
194 void RTC::writeDate(const RTCDate *value)
+
194 void RTC::writeDate(const RTCDate *value)
195 {
196  date = *value;
197 }
198 
-
209 void RTC::readAlarm(uint8_t alarmNum, RTCAlarm *value)
+
209 void RTC::readAlarm(uint8_t alarmNum, RTCAlarm *value)
210 {
211  *value = alarms[alarmNum];
212 }
213 
-
224 void RTC::writeAlarm(uint8_t alarmNum, const RTCAlarm *value)
+
224 void RTC::writeAlarm(uint8_t alarmNum, const RTCAlarm *value)
225 {
226  alarms[alarmNum] = *value;
227 }
228 
-
235 int RTC::byteCount() const
+
235 int RTC::byteCount() const
236 {
237  return DEFAULT_BYTE_COUNT;
238 }
239 
-
247 uint8_t RTC::readByte(uint8_t offset)
+
247 uint8_t RTC::readByte(uint8_t offset)
248 {
249  if (nvram)
250  return nvram[offset];
@@ -248,7 +249,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
252  return 0;
253 }
254 
-
262 void RTC::writeByte(uint8_t offset, uint8_t value)
+
262 void RTC::writeByte(uint8_t offset, uint8_t value)
263 {
264  if (nvram) {
265  nvram[offset] = value;
@@ -261,93 +262,127 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
272  }
273 }
274 
-
288 int RTC::readTemperature()
+
288 int RTC::readTemperature()
289 {
-
290  return NO_TEMPERATURE;
+
290  return NO_TEMPERATURE;
291 }
292 
-
313 void RTC::adjustDays(RTCDate *date, uint8_t flags)
+
313 void RTC::adjustDays(RTCDate *date, uint8_t flags)
314 {
-
315  if (flags & DECREMENT) {
-
316  --(date->day);
-
317  if (date->day == 0) {
-
318  if (!(flags & WRAP)) {
-
319  --(date->month);
-
320  if (date->month == 0)
-
321  date->month = 12;
+
315  if (flags & DECREMENT) {
+
316  --(date->day);
+
317  if (date->day == 0) {
+
318  if (!(flags & WRAP)) {
+
319  --(date->month);
+
320  if (date->month == 0)
+
321  date->month = 12;
322  }
-
323  date->day = monthLength(date);
+
323  date->day = monthLength(date);
324  }
325  } else {
-
326  ++(date->day);
-
327  if (date->day > monthLength(date)) {
-
328  if (!(flags & WRAP)) {
-
329  ++(date->month);
-
330  if (date->month == 13)
-
331  date->month = 1;
+
326  ++(date->day);
+
327  if (date->day > monthLength(date)) {
+
328  if (!(flags & WRAP)) {
+
329  ++(date->month);
+
330  if (date->month == 13)
+
331  date->month = 1;
332  }
-
333  date->day = 1;
+
333  date->day = 1;
334  }
335  }
336 }
337 
-
343 void RTC::adjustMonths(RTCDate *date, uint8_t flags)
+
343 void RTC::adjustMonths(RTCDate *date, uint8_t flags)
344 {
-
345  if (flags & DECREMENT) {
-
346  --(date->month);
-
347  if (date->month == 0) {
-
348  date->month = 12;
-
349  if (!(flags & WRAP) && date->year > 2000)
-
350  --(date->year);
+
345  if (flags & DECREMENT) {
+
346  --(date->month);
+
347  if (date->month == 0) {
+
348  date->month = 12;
+
349  if (!(flags & WRAP) && date->year > 2000)
+
350  --(date->year);
351  }
352  } else {
-
353  ++(date->month);
-
354  if (date->month == 13) {
-
355  date->month = 1;
-
356  if (!(flags & WRAP) && date->year < 2099)
-
357  ++(date->year);
+
353  ++(date->month);
+
354  if (date->month == 13) {
+
355  date->month = 1;
+
356  if (!(flags & WRAP) && date->year < 2099)
+
357  ++(date->year);
358  }
359  }
360  uint8_t len = monthLength(date);
-
361  if (date->day > len)
-
362  date->day = len;
+
361  if (date->day > len)
+
362  date->day = len;
363 }
364 
-
370 void RTC::adjustYears(RTCDate *date, uint8_t flags)
+
370 void RTC::adjustYears(RTCDate *date, uint8_t flags)
371 {
-
372  if (flags & DECREMENT) {
-
373  --(date->year);
-
374  if (date->year < 2000)
-
375  date->year = 2000;
+
372  if (flags & DECREMENT) {
+
373  --(date->year);
+
374  if (date->year < 2000)
+
375  date->year = 2000;
376  } else {
-
377  ++(date->year);
-
378  if (date->year > 2099)
-
379  date->year = 2099;
+
377  ++(date->year);
+
378  if (date->year > 2099)
+
379  date->year = 2099;
380  }
381  uint8_t len = monthLength(date);
-
382  if (date->day > len)
-
383  date->day = len;
+
382  if (date->day > len)
+
383  date->day = len;
384 }
385 
-
399 RTC::DayOfWeek RTC::dayOfWeek(const RTCDate *date)
+
399 RTC::DayOfWeek RTC::dayOfWeek(const RTCDate *date)
400 {
401  // The +4 here adjusts for Jan 1, 2000 being a Saturday.
-
402  unsigned long daynum = date->day + 4;
-
403  daynum += monthOffsets[date->month - 1];
-
404  if (date->month > 2 && isLeapYear(date->year))
+
402  unsigned long daynum = date->day + 4;
+
403  daynum += monthOffsets[date->month - 1];
+
404  if (date->month > 2 && isLeapYear(date->year))
405  ++daynum;
-
406  daynum += 365UL * (date->year - 2000);
-
407  if (date->year > 2000)
-
408  daynum += ((date->year - 2001) / 4) + 1;
-
409  return (DayOfWeek)((daynum % 7) + 1);
+
406  daynum += 365UL * (date->year - 2000);
+
407  if (date->year > 2000)
+
408  daynum += ((date->year - 2001) / 4) + 1;
+
409  return (DayOfWeek)((daynum % 7) + 1);
410 }
411 
+
RTCDate::month
uint8_t month
Month of the year (1-12)
Definition: RTC.h:38
+
RTC::writeTime
virtual void writeTime(const RTCTime *value)
Updates the time in the realtime clock to match value.
Definition: RTC.cpp:179
+
RTC::RTC
RTC()
Constructs a new realtime clock handler.
Definition: RTC.cpp:105
+
RTC::dayOfWeek
static DayOfWeek dayOfWeek(const RTCDate *date)
Returns the day of the week corresponding to date.
Definition: RTC.cpp:399
+
RTCTime::minute
uint8_t minute
Minute within the hour (0-59)
Definition: RTC.h:31
+
RTC::readAlarm
virtual void readAlarm(uint8_t alarmNum, RTCAlarm *value)
Reads the details of the alarm with index alarmNum into value.
Definition: RTC.cpp:209
+
RTC::readDate
virtual void readDate(RTCDate *value)
Reads the current date from the realtime clock into value.
Definition: RTC.cpp:169
+
RTC::DECREMENT
static const uint8_t DECREMENT
Decrement the day, month, or year in a call to adjustDays(), adjustMonths(), or adjustYears().
Definition: RTC.h:89
+
RTC::DayOfWeek
DayOfWeek
Day of the week corresponding to a date.
Definition: RTC.h:55
+
RTC::writeAlarm
virtual void writeAlarm(uint8_t alarmNum, const RTCAlarm *value)
Updates the details of the alarm with index alarmNum from value.
Definition: RTC.cpp:224
+
RTC::ALARM_COUNT
static const uint8_t ALARM_COUNT
Number of alarms that are supported by RTC::readAlarm() and RTC::writeAlarm().
Definition: RTC.h:74
+
RTC::writeDate
virtual void writeDate(const RTCDate *value)
Updates the date in the realtime clock to match value.
Definition: RTC.cpp:194
+
RTC::byteCount
virtual int byteCount() const
Returns the number of bytes of non-volatile memory that can be used for storage of arbitrary settings...
Definition: RTC.cpp:235
+
RTCAlarm::hour
uint8_t hour
Hour of the day for the alarm (0-23).
Definition: RTC.h:44
+
RTC::NO_TEMPERATURE
static const int NO_TEMPERATURE
Value that is returned from readTemperature() if the realtime clock chip cannot determine the tempera...
Definition: RTC.h:83
+
RTCAlarm::flags
uint8_t flags
Additional flags for the alarm.
Definition: RTC.h:46
+
RTCDate
Stores date information from a realtime clock chip.
Definition: RTC.h:35
+
RTCDate::year
unsigned int year
Year (4-digit)
Definition: RTC.h:37
+
RTC::readTemperature
virtual int readTemperature()
Reads the value of the temperature sensor and returns the temperature in quarters of a degree celcius...
Definition: RTC.cpp:288
+
RTC::writeByte
virtual void writeByte(uint8_t offset, uint8_t value)
Writes value to offset within the realtime clock's non-volatile memory.
Definition: RTC.cpp:262
+
RTC::adjustYears
static void adjustYears(RTCDate *date, uint8_t flags)
Adjusts date up or down one year according to flags.
Definition: RTC.cpp:370
+
RTCAlarm::minute
uint8_t minute
Minute of the hour for the alarm (0-59).
Definition: RTC.h:45
+
RTC::INCREMENT
static const uint8_t INCREMENT
Increment the day, month, or year in a call to adjustDays(), adjustMonths(), or adjustYears().
Definition: RTC.h:88
+
RTC::readByte
virtual uint8_t readByte(uint8_t offset)
Reads the byte at offset within the realtime clock's non-volatile memory.
Definition: RTC.cpp:247
+
RTC::adjustDays
static void adjustDays(RTCDate *date, uint8_t flags)
Adjusts date up or down one day according to flags.
Definition: RTC.cpp:313
+
RTCTime
Stores time information from a realtime clock chip.
Definition: RTC.h:28
+
RTCAlarm
Stores alarm information from a realtime clock chip.
Definition: RTC.h:42
+
RTC::adjustMonths
static void adjustMonths(RTCDate *date, uint8_t flags)
Adjusts date up or down one month according to flags.
Definition: RTC.cpp:343
+
RTCTime::hour
uint8_t hour
Hour of the day (0-23)
Definition: RTC.h:30
+
RTCDate::day
uint8_t day
Day of the month (1-31)
Definition: RTC.h:39
+
RTCTime::second
uint8_t second
Second within the minute (0-59)
Definition: RTC.h:32
+
RTC::hasUpdates
virtual bool hasUpdates()
Returns true if the realtime clock has updated since the last call to this function.
Definition: RTC.cpp:134
+
RTC::readTime
virtual void readTime(RTCTime *value)
Reads the current time from the realtime clock into value.
Definition: RTC.cpp:144
+
RTC::WRAP
static const uint8_t WRAP
Wrap around to the beginning of the current month/year rather than advance to the next one...
Definition: RTC.h:90
diff --git a/RTC_8h_source.html b/RTC_8h_source.html index e52fb65c..3c0952ad 100644 --- a/RTC_8h_source.html +++ b/RTC_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: RTC.h Source File @@ -29,7 +30,7 @@ - + @@ -114,34 +115,34 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
25 
26 #include <inttypes.h>
27 
-
28 struct RTCTime
+
28 struct RTCTime
29 {
-
30  uint8_t hour;
-
31  uint8_t minute;
-
32  uint8_t second;
+
30  uint8_t hour;
+
31  uint8_t minute;
+
32  uint8_t second;
33 };
34 
-
35 struct RTCDate
+
35 struct RTCDate
36 {
-
37  unsigned int year;
-
38  uint8_t month;
-
39  uint8_t day;
+
37  unsigned int year;
+
38  uint8_t month;
+
39  uint8_t day;
40 };
41 
-
42 struct RTCAlarm
+
42 struct RTCAlarm
43 {
-
44  uint8_t hour;
-
45  uint8_t minute;
-
46  uint8_t flags;
+
44  uint8_t hour;
+
45  uint8_t minute;
+
46  uint8_t flags;
47 };
48 
-
49 class RTC
+
49 class RTC
50 {
51 public:
-
52  RTC();
-
53  ~RTC();
+
52  RTC();
+
53  ~RTC();
54 
-
55  enum DayOfWeek
+
55  enum DayOfWeek
56  {
57  Monday = 1,
58  Tuesday,
@@ -152,52 +153,87 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
63  Sunday,
64  };
65 
-
66  virtual bool hasUpdates();
+
66  virtual bool hasUpdates();
67 
-
68  virtual void readTime(RTCTime *value);
-
69  virtual void readDate(RTCDate *value);
+
68  virtual void readTime(RTCTime *value);
+
69  virtual void readDate(RTCDate *value);
70 
-
71  virtual void writeTime(const RTCTime *value);
-
72  virtual void writeDate(const RTCDate *value);
+
71  virtual void writeTime(const RTCTime *value);
+
72  virtual void writeDate(const RTCDate *value);
73 
-
74  static const uint8_t ALARM_COUNT = 4;
+
74  static const uint8_t ALARM_COUNT = 4;
75 
-
76  virtual void readAlarm(uint8_t alarmNum, RTCAlarm *value);
-
77  virtual void writeAlarm(uint8_t alarmNum, const RTCAlarm *value);
+
76  virtual void readAlarm(uint8_t alarmNum, RTCAlarm *value);
+
77  virtual void writeAlarm(uint8_t alarmNum, const RTCAlarm *value);
78 
-
79  virtual int byteCount() const;
-
80  virtual uint8_t readByte(uint8_t offset);
-
81  virtual void writeByte(uint8_t offset, uint8_t value);
+
79  virtual int byteCount() const;
+
80  virtual uint8_t readByte(uint8_t offset);
+
81  virtual void writeByte(uint8_t offset, uint8_t value);
82 
-
83  static const int NO_TEMPERATURE = 32767;
+
83  static const int NO_TEMPERATURE = 32767;
84 
-
85  virtual int readTemperature();
+
85  virtual int readTemperature();
86 
87  // Flags for adjustDays(), adjustMonths(), and adjustYears().
-
88  static const uint8_t INCREMENT = 0x0000;
-
89  static const uint8_t DECREMENT = 0x0001;
-
90  static const uint8_t WRAP = 0x0002;
+
88  static const uint8_t INCREMENT = 0x0000;
+
89  static const uint8_t DECREMENT = 0x0001;
+
90  static const uint8_t WRAP = 0x0002;
91 
-
92  static void adjustDays(RTCDate *date, uint8_t flags);
-
93  static void adjustMonths(RTCDate *date, uint8_t flags);
-
94  static void adjustYears(RTCDate *date, uint8_t flags);
+
92  static void adjustDays(RTCDate *date, uint8_t flags);
+
93  static void adjustMonths(RTCDate *date, uint8_t flags);
+
94  static void adjustYears(RTCDate *date, uint8_t flags);
95 
-
96  static DayOfWeek dayOfWeek(const RTCDate *date);
+
96  static DayOfWeek dayOfWeek(const RTCDate *date);
97 
98 private:
99  unsigned long midnight;
-
100  RTCDate date;
-
101  RTCAlarm alarms[ALARM_COUNT];
+
100  RTCDate date;
+
101  RTCAlarm alarms[ALARM_COUNT];
102  uint8_t *nvram;
103 };
104 
105 #endif
+
RTCDate::month
uint8_t month
Month of the year (1-12)
Definition: RTC.h:38
+
RTC::writeTime
virtual void writeTime(const RTCTime *value)
Updates the time in the realtime clock to match value.
Definition: RTC.cpp:179
+
RTC::RTC
RTC()
Constructs a new realtime clock handler.
Definition: RTC.cpp:105
+
RTC::dayOfWeek
static DayOfWeek dayOfWeek(const RTCDate *date)
Returns the day of the week corresponding to date.
Definition: RTC.cpp:399
+
RTCTime::minute
uint8_t minute
Minute within the hour (0-59)
Definition: RTC.h:31
+
RTC::readAlarm
virtual void readAlarm(uint8_t alarmNum, RTCAlarm *value)
Reads the details of the alarm with index alarmNum into value.
Definition: RTC.cpp:209
+
RTC::readDate
virtual void readDate(RTCDate *value)
Reads the current date from the realtime clock into value.
Definition: RTC.cpp:169
+
RTC::DECREMENT
static const uint8_t DECREMENT
Decrement the day, month, or year in a call to adjustDays(), adjustMonths(), or adjustYears().
Definition: RTC.h:89
+
RTC::DayOfWeek
DayOfWeek
Day of the week corresponding to a date.
Definition: RTC.h:55
+
RTC::writeAlarm
virtual void writeAlarm(uint8_t alarmNum, const RTCAlarm *value)
Updates the details of the alarm with index alarmNum from value.
Definition: RTC.cpp:224
+
RTC::ALARM_COUNT
static const uint8_t ALARM_COUNT
Number of alarms that are supported by RTC::readAlarm() and RTC::writeAlarm().
Definition: RTC.h:74
+
RTC::writeDate
virtual void writeDate(const RTCDate *value)
Updates the date in the realtime clock to match value.
Definition: RTC.cpp:194
+
RTC::byteCount
virtual int byteCount() const
Returns the number of bytes of non-volatile memory that can be used for storage of arbitrary settings...
Definition: RTC.cpp:235
+
RTCAlarm::hour
uint8_t hour
Hour of the day for the alarm (0-23).
Definition: RTC.h:44
+
RTC::NO_TEMPERATURE
static const int NO_TEMPERATURE
Value that is returned from readTemperature() if the realtime clock chip cannot determine the tempera...
Definition: RTC.h:83
+
RTCAlarm::flags
uint8_t flags
Additional flags for the alarm.
Definition: RTC.h:46
+
RTCDate
Stores date information from a realtime clock chip.
Definition: RTC.h:35
+
RTCDate::year
unsigned int year
Year (4-digit)
Definition: RTC.h:37
+
RTC::readTemperature
virtual int readTemperature()
Reads the value of the temperature sensor and returns the temperature in quarters of a degree celcius...
Definition: RTC.cpp:288
+
RTC::writeByte
virtual void writeByte(uint8_t offset, uint8_t value)
Writes value to offset within the realtime clock's non-volatile memory.
Definition: RTC.cpp:262
+
RTC::adjustYears
static void adjustYears(RTCDate *date, uint8_t flags)
Adjusts date up or down one year according to flags.
Definition: RTC.cpp:370
+
RTCAlarm::minute
uint8_t minute
Minute of the hour for the alarm (0-59).
Definition: RTC.h:45
+
RTC::INCREMENT
static const uint8_t INCREMENT
Increment the day, month, or year in a call to adjustDays(), adjustMonths(), or adjustYears().
Definition: RTC.h:88
+
RTC::readByte
virtual uint8_t readByte(uint8_t offset)
Reads the byte at offset within the realtime clock's non-volatile memory.
Definition: RTC.cpp:247
+
RTC::adjustDays
static void adjustDays(RTCDate *date, uint8_t flags)
Adjusts date up or down one day according to flags.
Definition: RTC.cpp:313
+
RTCTime
Stores time information from a realtime clock chip.
Definition: RTC.h:28
+
RTCAlarm
Stores alarm information from a realtime clock chip.
Definition: RTC.h:42
+
RTC::adjustMonths
static void adjustMonths(RTCDate *date, uint8_t flags)
Adjusts date up or down one month according to flags.
Definition: RTC.cpp:343
+
RTCTime::hour
uint8_t hour
Hour of the day (0-23)
Definition: RTC.h:30
+
RTCDate::day
uint8_t day
Day of the month (1-31)
Definition: RTC.h:39
+
RTCTime::second
uint8_t second
Second within the minute (0-59)
Definition: RTC.h:32
+
RTC::hasUpdates
virtual bool hasUpdates()
Returns true if the realtime clock has updated since the last call to this function.
Definition: RTC.cpp:134
+
RTC::readTime
virtual void readTime(RTCTime *value)
Reads the current time from the realtime clock into value.
Definition: RTC.cpp:144
+
RTC
Base class for realtime clock handlers.
Definition: RTC.h:49
+
RTC::WRAP
static const uint8_t WRAP
Wrap around to the beginning of the current month/year rather than advance to the next one...
Definition: RTC.h:90
diff --git a/SHA1_8cpp_source.html b/SHA1_8cpp_source.html new file mode 100644 index 00000000..37338df7 --- /dev/null +++ b/SHA1_8cpp_source.html @@ -0,0 +1,318 @@ + + + + + + +ArduinoLibs: SHA1.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
SHA1.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #include "SHA1.h"
+
24 #include "Crypto.h"
+
25 #include "utility/RotateUtil.h"
+
26 #include "utility/EndianUtil.h"
+
27 #include <string.h>
+
28 
+ +
42 {
+
43  reset();
+
44 }
+
45 
+ +
50 {
+
51  clean(state);
+
52 }
+
53 
+
54 size_t SHA1::hashSize() const
+
55 {
+
56  return 20;
+
57 }
+
58 
+
59 size_t SHA1::blockSize() const
+
60 {
+
61  return 64;
+
62 }
+
63 
+ +
65 {
+
66  state.h[0] = 0x67452301;
+
67  state.h[1] = 0xEFCDAB89;
+
68  state.h[2] = 0x98BADCFE;
+
69  state.h[3] = 0x10325476;
+
70  state.h[4] = 0xC3D2E1F0;
+
71  state.chunkSize = 0;
+
72  state.finalized = false;
+
73  state.length = 0;
+
74 }
+
75 
+
76 void SHA1::update(const void *data, size_t len)
+
77 {
+
78  // Reset the hashing process if finalize() was called previously.
+
79  if (state.finalized)
+
80  reset();
+
81 
+
82  // Update the total length (in bits, not bytes).
+
83  state.length += ((uint64_t)len) << 3;
+
84 
+
85  // Break the input up into 512-bit chunks and process each in turn.
+
86  const uint8_t *d = (const uint8_t *)data;
+
87  while (len > 0) {
+
88  uint8_t size = 64 - state.chunkSize;
+
89  if (size > len)
+
90  size = len;
+
91  memcpy(((uint8_t *)state.w) + state.chunkSize, d, size);
+
92  state.chunkSize += size;
+
93  len -= size;
+
94  d += size;
+
95  if (state.chunkSize == 64) {
+
96  processChunk();
+
97  state.chunkSize = 0;
+
98  }
+
99  }
+
100 }
+
101 
+
102 void SHA1::finalize(void *hash, size_t len)
+
103 {
+
104  // Finalize the hash if necessary.
+
105  if (!state.finalized) {
+
106  // Pad the last chunk. We may need two padding chunks if there
+
107  // isn't enough room in the first for the padding and length.
+
108  uint8_t *wbytes = (uint8_t *)state.w;
+
109  if (state.chunkSize <= (64 - 9)) {
+
110  wbytes[state.chunkSize] = 0x80;
+
111  memset(wbytes + state.chunkSize + 1, 0x00, 64 - 8 - (state.chunkSize + 1));
+
112  state.w[14] = htobe32((uint32_t)(state.length >> 32));
+
113  state.w[15] = htobe32((uint32_t)state.length);
+
114  processChunk();
+
115  } else {
+
116  wbytes[state.chunkSize] = 0x80;
+
117  memset(wbytes + state.chunkSize + 1, 0x00, 64 - (state.chunkSize + 1));
+
118  processChunk();
+
119  memset(wbytes, 0x00, 64 - 8);
+
120  state.w[14] = htobe32((uint32_t)(state.length >> 32));
+
121  state.w[15] = htobe32((uint32_t)state.length);
+
122  processChunk();
+
123  }
+
124 
+
125  // Convert the result into big endian and return it.
+
126  for (uint8_t posn = 0; posn < 5; ++posn)
+
127  state.w[posn] = htobe32(state.h[posn]);
+
128  state.finalized = true;
+
129  }
+
130 
+
131  // Copy the hash to the caller's return buffer.
+
132  if (len > 20)
+
133  len = 20;
+
134  memcpy(hash, state.w, len);
+
135 }
+
136 
+ +
138 {
+
139  clean(state);
+
140  reset();
+
141 }
+
142 
+
148 void SHA1::processChunk()
+
149 {
+
150  uint8_t index;
+
151 
+
152  // Convert the first 16 words from big endian to host byte order.
+
153  for (index = 0; index < 16; ++index)
+
154  state.w[index] = be32toh(state.w[index]);
+
155 
+
156  // Initialize the hash value for this chunk.
+
157  uint32_t a = state.h[0];
+
158  uint32_t b = state.h[1];
+
159  uint32_t c = state.h[2];
+
160  uint32_t d = state.h[3];
+
161  uint32_t e = state.h[4];
+
162 
+
163  // Perform the first 16 rounds of the compression function main loop.
+
164  uint32_t temp;
+
165  for (index = 0; index < 16; ++index) {
+
166  temp = leftRotate5(a) + ((b & c) | ((~b) & d)) + e + 0x5A827999 + state.w[index];
+
167  e = d;
+
168  d = c;
+
169  c = leftRotate30(b);
+
170  b = a;
+
171  a = temp;
+
172  }
+
173 
+
174  // Perform the 64 remaining rounds. We expand the first 16 words to
+
175  // 80 in-place in the "w" array. This saves 256 bytes of memory
+
176  // that would have otherwise need to be allocated to the "w" array.
+
177  for (; index < 20; ++index) {
+
178  temp = state.w[index & 0x0F] = leftRotate1
+
179  (state.w[(index - 3) & 0x0F] ^ state.w[(index - 8) & 0x0F] ^
+
180  state.w[(index - 14) & 0x0F] ^ state.w[(index - 16) & 0x0F]);
+
181  temp = leftRotate5(a) + ((b & c) | ((~b) & d)) + e + 0x5A827999 + temp;
+
182  e = d;
+
183  d = c;
+
184  c = leftRotate30(b);
+
185  b = a;
+
186  a = temp;
+
187  }
+
188  for (; index < 40; ++index) {
+
189  temp = state.w[index & 0x0F] = leftRotate1
+
190  (state.w[(index - 3) & 0x0F] ^ state.w[(index - 8) & 0x0F] ^
+
191  state.w[(index - 14) & 0x0F] ^ state.w[(index - 16) & 0x0F]);
+
192  temp = leftRotate5(a) + (b ^ c ^ d) + e + 0x6ED9EBA1 + temp;
+
193  e = d;
+
194  d = c;
+
195  c = leftRotate30(b);
+
196  b = a;
+
197  a = temp;
+
198  }
+
199  for (; index < 60; ++index) {
+
200  temp = state.w[index & 0x0F] = leftRotate1
+
201  (state.w[(index - 3) & 0x0F] ^ state.w[(index - 8) & 0x0F] ^
+
202  state.w[(index - 14) & 0x0F] ^ state.w[(index - 16) & 0x0F]);
+
203  temp = leftRotate5(a) + ((b & c) | (b & d) | (c & d)) + e + 0x8F1BBCDC + temp;
+
204  e = d;
+
205  d = c;
+
206  c = leftRotate30(b);
+
207  b = a;
+
208  a = temp;
+
209  }
+
210  for (; index < 80; ++index) {
+
211  temp = state.w[index & 0x0F] = leftRotate1
+
212  (state.w[(index - 3) & 0x0F] ^ state.w[(index - 8) & 0x0F] ^
+
213  state.w[(index - 14) & 0x0F] ^ state.w[(index - 16) & 0x0F]);
+
214  temp = leftRotate5(a) + (b ^ c ^ d) + e + 0xCA62C1D6 + temp;
+
215  e = d;
+
216  d = c;
+
217  c = leftRotate30(b);
+
218  b = a;
+
219  a = temp;
+
220  }
+
221 
+
222  // Add this chunk's hash to the result so far.
+
223  state.h[0] += a;
+
224  state.h[1] += b;
+
225  state.h[2] += c;
+
226  state.h[3] += d;
+
227  state.h[4] += e;
+
228 
+
229  // Attempt to clean up the stack.
+
230  a = b = c = d = e = temp = 0;
+
231 }
+
virtual ~SHA1()
Destroys this SHA-1 hash object after clearing sensitive information.
Definition: SHA1.cpp:49
+
void reset()
Resets the hash ready for a new hashing process.
Definition: SHA1.cpp:64
+
void update(const void *data, size_t len)
Updates the hash with more data.
Definition: SHA1.cpp:76
+
void clear()
Clears the hash state, removing all sensitive data, and then resets the hash ready for a new hashing ...
Definition: SHA1.cpp:137
+
size_t blockSize() const
Size of the internal block used by the hash algorithm.
Definition: SHA1.cpp:59
+
void finalize(void *hash, size_t len)
Finalizes the hashing process and returns the hash.
Definition: SHA1.cpp:102
+
size_t hashSize() const
Size of the hash result from finalize().
Definition: SHA1.cpp:54
+
SHA1()
Constructs a SHA-1 hash object.
Definition: SHA1.cpp:41
+
+ + + + diff --git a/SHA1_8h_source.html b/SHA1_8h_source.html new file mode 100644 index 00000000..947a397d --- /dev/null +++ b/SHA1_8h_source.html @@ -0,0 +1,164 @@ + + + + + + +ArduinoLibs: SHA1.h Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
SHA1.h
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #ifndef CRYPTO_SHA1_h
+
24 #define CRYPTO_SHA1_h
+
25 
+
26 #include "Hash.h"
+
27 
+
28 class SHA1 : public Hash
+
29 {
+
30 public:
+
31  SHA1();
+
32  virtual ~SHA1();
+
33 
+
34  size_t hashSize() const;
+
35  size_t blockSize() const;
+
36 
+
37  void reset();
+
38  void update(const void *data, size_t len);
+
39  void finalize(void *hash, size_t len);
+
40 
+
41  void clear();
+
42 
+
43 private:
+
44  struct {
+
45  uint32_t h[5];
+
46  uint32_t w[16];
+
47  uint8_t chunkSize;
+
48  bool finalized;
+
49  uint64_t length;
+
50  } state;
+
51 
+
52  void processChunk();
+
53 };
+
54 
+
55 #endif
+
virtual ~SHA1()
Destroys this SHA-1 hash object after clearing sensitive information.
Definition: SHA1.cpp:49
+
void reset()
Resets the hash ready for a new hashing process.
Definition: SHA1.cpp:64
+
Abstract base class for cryptographic hash algorithms.
Definition: Hash.h:29
+
void update(const void *data, size_t len)
Updates the hash with more data.
Definition: SHA1.cpp:76
+
void clear()
Clears the hash state, removing all sensitive data, and then resets the hash ready for a new hashing ...
Definition: SHA1.cpp:137
+
size_t blockSize() const
Size of the internal block used by the hash algorithm.
Definition: SHA1.cpp:59
+
SHA-1 hash algorithm.
Definition: SHA1.h:28
+
void finalize(void *hash, size_t len)
Finalizes the hashing process and returns the hash.
Definition: SHA1.cpp:102
+
size_t hashSize() const
Size of the hash result from finalize().
Definition: SHA1.cpp:54
+
SHA1()
Constructs a SHA-1 hash object.
Definition: SHA1.cpp:41
+
+ + + + diff --git a/SHA256_8cpp_source.html b/SHA256_8cpp_source.html new file mode 100644 index 00000000..5f9ace08 --- /dev/null +++ b/SHA256_8cpp_source.html @@ -0,0 +1,334 @@ + + + + + + +ArduinoLibs: SHA256.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
SHA256.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #include "SHA256.h"
+
24 #include "Crypto.h"
+
25 #include "utility/RotateUtil.h"
+
26 #include "utility/EndianUtil.h"
+
27 #include "utility/ProgMemUtil.h"
+
28 #include <string.h>
+
29 
+ +
43 {
+
44  reset();
+
45 }
+
46 
+ +
52 {
+
53  clean(state);
+
54 }
+
55 
+
56 size_t SHA256::hashSize() const
+
57 {
+
58  return 32;
+
59 }
+
60 
+
61 size_t SHA256::blockSize() const
+
62 {
+
63  return 64;
+
64 }
+
65 
+ +
67 {
+
68  state.h[0] = 0x6a09e667;
+
69  state.h[1] = 0xbb67ae85;
+
70  state.h[2] = 0x3c6ef372;
+
71  state.h[3] = 0xa54ff53a,
+
72  state.h[4] = 0x510e527f;
+
73  state.h[5] = 0x9b05688c;
+
74  state.h[6] = 0x1f83d9ab;
+
75  state.h[7] = 0x5be0cd19;
+
76  state.chunkSize = 0;
+
77  state.finalized = false;
+
78  state.length = 0;
+
79 }
+
80 
+
81 void SHA256::update(const void *data, size_t len)
+
82 {
+
83  // Reset the hashing process if finalize() was called previously.
+
84  if (state.finalized)
+
85  reset();
+
86 
+
87  // Update the total length (in bits, not bytes).
+
88  state.length += ((uint64_t)len) << 3;
+
89 
+
90  // Break the input up into 512-bit chunks and process each in turn.
+
91  const uint8_t *d = (const uint8_t *)data;
+
92  while (len > 0) {
+
93  uint8_t size = 64 - state.chunkSize;
+
94  if (size > len)
+
95  size = len;
+
96  memcpy(((uint8_t *)state.w) + state.chunkSize, d, size);
+
97  state.chunkSize += size;
+
98  len -= size;
+
99  d += size;
+
100  if (state.chunkSize == 64) {
+
101  processChunk();
+
102  state.chunkSize = 0;
+
103  }
+
104  }
+
105 }
+
106 
+
107 void SHA256::finalize(void *hash, size_t len)
+
108 {
+
109  // Finalize the hash if necessary.
+
110  if (!state.finalized) {
+
111  // Pad the last chunk. We may need two padding chunks if there
+
112  // isn't enough room in the first for the padding and length.
+
113  uint8_t *wbytes = (uint8_t *)state.w;
+
114  if (state.chunkSize <= (64 - 9)) {
+
115  wbytes[state.chunkSize] = 0x80;
+
116  memset(wbytes + state.chunkSize + 1, 0x00, 64 - 8 - (state.chunkSize + 1));
+
117  state.w[14] = htobe32((uint32_t)(state.length >> 32));
+
118  state.w[15] = htobe32((uint32_t)state.length);
+
119  processChunk();
+
120  } else {
+
121  wbytes[state.chunkSize] = 0x80;
+
122  memset(wbytes + state.chunkSize + 1, 0x00, 64 - (state.chunkSize + 1));
+
123  processChunk();
+
124  memset(wbytes, 0x00, 64 - 8);
+
125  state.w[14] = htobe32((uint32_t)(state.length >> 32));
+
126  state.w[15] = htobe32((uint32_t)state.length);
+
127  processChunk();
+
128  }
+
129 
+
130  // Convert the result into big endian and return it.
+
131  for (uint8_t posn = 0; posn < 8; ++posn)
+
132  state.w[posn] = htobe32(state.h[posn]);
+
133  state.finalized = true;
+
134  }
+
135 
+
136  // Copy the hash to the caller's return buffer.
+
137  if (len > 32)
+
138  len = 32;
+
139  memcpy(hash, state.w, len);
+
140 }
+
141 
+ +
143 {
+
144  clean(state);
+
145  reset();
+
146 }
+
147 
+
153 void SHA256::processChunk()
+
154 {
+
155  // Round constants for SHA-256.
+
156  static uint32_t const k[64] PROGMEM = {
+
157  0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
+
158  0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
+
159  0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
+
160  0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
+
161  0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
+
162  0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
+
163  0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
+
164  0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
+
165  0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
+
166  0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
+
167  0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
+
168  0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
+
169  0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
+
170  0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
+
171  0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
+
172  0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
+
173  };
+
174 
+
175  // Convert the first 16 words from big endian to host byte order.
+
176  uint8_t index;
+
177  for (index = 0; index < 16; ++index)
+
178  state.w[index] = be32toh(state.w[index]);
+
179 
+
180  // Initialise working variables to the current hash value.
+
181  uint32_t a = state.h[0];
+
182  uint32_t b = state.h[1];
+
183  uint32_t c = state.h[2];
+
184  uint32_t d = state.h[3];
+
185  uint32_t e = state.h[4];
+
186  uint32_t f = state.h[5];
+
187  uint32_t g = state.h[6];
+
188  uint32_t h = state.h[7];
+
189 
+
190  // Perform the first 16 rounds of the compression function main loop.
+
191  uint32_t temp1, temp2;
+
192  for (index = 0; index < 16; ++index) {
+
193  temp1 = h + pgm_read_dword(k + index) + state.w[index] +
+
194  (rightRotate6(e) ^ rightRotate11(e) ^ rightRotate25(e)) +
+
195  ((e & f) ^ ((~e) & g));
+
196  temp2 = (rightRotate2(a) ^ rightRotate13(a) ^ rightRotate22(a)) +
+
197  ((a & b) ^ (a & c) ^ (b & c));
+
198  h = g;
+
199  g = f;
+
200  f = e;
+
201  e = d + temp1;
+
202  d = c;
+
203  c = b;
+
204  b = a;
+
205  a = temp1 + temp2;
+
206  }
+
207 
+
208  // Perform the 48 remaining rounds. We expand the first 16 words to
+
209  // 64 in-place in the "w" array. This saves 192 bytes of memory
+
210  // that would have otherwise need to be allocated to the "w" array.
+
211  for (; index < 64; ++index) {
+
212  // Expand the next word.
+
213  temp1 = state.w[(index - 15) & 0x0F];
+
214  temp2 = state.w[(index - 2) & 0x0F];
+
215  temp1 = state.w[index & 0x0F] =
+
216  state.w[(index - 16) & 0x0F] + state.w[(index - 7) & 0x0F] +
+
217  (rightRotate7(temp1) ^ rightRotate18(temp1) ^ (temp1 >> 3)) +
+
218  (rightRotate17(temp2) ^ rightRotate19(temp2) ^ (temp2 >> 10));
+
219 
+
220  // Perform the round.
+
221  temp1 = h + pgm_read_dword(k + index) + temp1 +
+
222  (rightRotate6(e) ^ rightRotate11(e) ^ rightRotate25(e)) +
+
223  ((e & f) ^ ((~e) & g));
+
224  temp2 = (rightRotate2(a) ^ rightRotate13(a) ^ rightRotate22(a)) +
+
225  ((a & b) ^ (a & c) ^ (b & c));
+
226  h = g;
+
227  g = f;
+
228  f = e;
+
229  e = d + temp1;
+
230  d = c;
+
231  c = b;
+
232  b = a;
+
233  a = temp1 + temp2;
+
234  }
+
235 
+
236  // Add the compressed chunk to the current hash value.
+
237  state.h[0] += a;
+
238  state.h[1] += b;
+
239  state.h[2] += c;
+
240  state.h[3] += d;
+
241  state.h[4] += e;
+
242  state.h[5] += f;
+
243  state.h[6] += g;
+
244  state.h[7] += h;
+
245 
+
246  // Attempt to clean up the stack.
+
247  a = b = c = d = e = f = g = h = temp1 = temp2 = 0;
+
248 }
+
void reset()
Resets the hash ready for a new hashing process.
Definition: SHA256.cpp:66
+
SHA256()
Constructs a SHA-256 hash object.
Definition: SHA256.cpp:42
+
void finalize(void *hash, size_t len)
Finalizes the hashing process and returns the hash.
Definition: SHA256.cpp:107
+
virtual ~SHA256()
Destroys this SHA-256 hash object after clearing sensitive information.
Definition: SHA256.cpp:51
+
size_t blockSize() const
Size of the internal block used by the hash algorithm.
Definition: SHA256.cpp:61
+
void update(const void *data, size_t len)
Updates the hash with more data.
Definition: SHA256.cpp:81
+
size_t hashSize() const
Size of the hash result from finalize().
Definition: SHA256.cpp:56
+
void clear()
Clears the hash state, removing all sensitive data, and then resets the hash ready for a new hashing ...
Definition: SHA256.cpp:142
+
+ + + + diff --git a/SHA256_8h_source.html b/SHA256_8h_source.html new file mode 100644 index 00000000..2c461d26 --- /dev/null +++ b/SHA256_8h_source.html @@ -0,0 +1,164 @@ + + + + + + +ArduinoLibs: SHA256.h Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
SHA256.h
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #ifndef CRYPTO_SHA256_h
+
24 #define CRYPTO_SHA256_h
+
25 
+
26 #include "Hash.h"
+
27 
+
28 class SHA256 : public Hash
+
29 {
+
30 public:
+
31  SHA256();
+
32  virtual ~SHA256();
+
33 
+
34  size_t hashSize() const;
+
35  size_t blockSize() const;
+
36 
+
37  void reset();
+
38  void update(const void *data, size_t len);
+
39  void finalize(void *hash, size_t len);
+
40 
+
41  void clear();
+
42 
+
43 private:
+
44  struct {
+
45  uint32_t h[8];
+
46  uint32_t w[16];
+
47  uint8_t chunkSize;
+
48  bool finalized;
+
49  uint64_t length;
+
50  } state;
+
51 
+
52  void processChunk();
+
53 };
+
54 
+
55 #endif
+
void reset()
Resets the hash ready for a new hashing process.
Definition: SHA256.cpp:66
+
SHA256()
Constructs a SHA-256 hash object.
Definition: SHA256.cpp:42
+
Abstract base class for cryptographic hash algorithms.
Definition: Hash.h:29
+
void finalize(void *hash, size_t len)
Finalizes the hashing process and returns the hash.
Definition: SHA256.cpp:107
+
virtual ~SHA256()
Destroys this SHA-256 hash object after clearing sensitive information.
Definition: SHA256.cpp:51
+
SHA-256 hash algorithm.
Definition: SHA256.h:28
+
size_t blockSize() const
Size of the internal block used by the hash algorithm.
Definition: SHA256.cpp:61
+
void update(const void *data, size_t len)
Updates the hash with more data.
Definition: SHA256.cpp:81
+
size_t hashSize() const
Size of the hash result from finalize().
Definition: SHA256.cpp:56
+
void clear()
Clears the hash state, removing all sensitive data, and then resets the hash ready for a new hashing ...
Definition: SHA256.cpp:142
+
+ + + + diff --git a/SoftI2C_8cpp_source.html b/SoftI2C_8cpp_source.html index b172ff93..193f44f1 100644 --- a/SoftI2C_8cpp_source.html +++ b/SoftI2C_8cpp_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: SoftI2C.cpp Source File @@ -29,7 +30,7 @@ - + @@ -118,7 +119,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
29 
45 #define i2cDelay() delayMicroseconds(5)
46 
-
50 SoftI2C::SoftI2C(uint8_t dataPin, uint8_t clockPin)
+
50 SoftI2C::SoftI2C(uint8_t dataPin, uint8_t clockPin)
51  : _dataPin(dataPin)
52  , _clockPin(clockPin)
53  , started(false)
@@ -133,7 +134,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
62  digitalWrite(_dataPin, HIGH);
63 }
64 
-
65 unsigned int SoftI2C::maxTransferSize() const
+
65 unsigned int SoftI2C::maxTransferSize() const
66 {
67  return 0xFFFF;
68 }
@@ -172,21 +173,21 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
101 #define I2C_READ 0x01
102 #define I2C_READ10 0xF1
103 
-
104 void SoftI2C::startWrite(unsigned int address)
+
104 void SoftI2C::startWrite(unsigned int address)
105 {
106  start();
107  inWrite = true;
108  if (address < 0x80) {
109  // 7-bit address.
-
110  write((uint8_t)((address << 1) | I2C_WRITE));
+
110  write((uint8_t)((address << 1) | I2C_WRITE));
111  } else {
112  // 10-bit address.
-
113  write((uint8_t)(((address >> 7) & 0x06)) | I2C_WRITE10);
-
114  write((uint8_t)address);
+
113  write((uint8_t)(((address >> 7) & 0x06)) | I2C_WRITE10);
+
114  write((uint8_t)address);
115  }
116 }
117 
-
118 void SoftI2C::write(uint8_t value)
+
118 void SoftI2C::write(uint8_t value)
119 {
120  uint8_t mask = 0x80;
121  while (mask != 0) {
@@ -197,23 +198,23 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
126  acked = false;
127 }
128 
-
129 bool SoftI2C::endWrite()
+
129 bool SoftI2C::endWrite()
130 {
131  stop();
132  return acked;
133 }
134 
-
135 bool SoftI2C::startRead(unsigned int address, unsigned int count)
+
135 bool SoftI2C::startRead(unsigned int address, unsigned int count)
136 {
137  start();
138  inWrite = false;
139  if (address < 0x80) {
140  // 7-bit address.
-
141  write((uint8_t)((address << 1) | I2C_READ));
+
141  write((uint8_t)((address << 1) | I2C_READ));
142  } else {
143  // 10-bit address.
-
144  write((uint8_t)(((address >> 7) & 0x06)) | I2C_READ10);
-
145  write((uint8_t)address);
+
144  write((uint8_t)(((address >> 7) & 0x06)) | I2C_READ10);
+
145  write((uint8_t)address);
146  }
147  if (!acked) {
148  readCount = 0;
@@ -223,12 +224,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
152  return true;
153 }
154 
-
155 unsigned int SoftI2C::available()
+
155 unsigned int SoftI2C::available()
156 {
157  return readCount;
158 }
159 
-
160 uint8_t SoftI2C::read()
+
160 uint8_t SoftI2C::read()
161 {
162  uint8_t value = 0;
163  for (uint8_t bit = 0; bit < 8; ++bit)
@@ -271,12 +272,20 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
200  i2cDelay();
201  return bit;
202 }
+
SoftI2C::startRead
bool startRead(unsigned int address, unsigned int count)
Starts a read operation for count bytes by sending the start condition and the I2C control byte...
Definition: SoftI2C.cpp:135
+
SoftI2C::endWrite
bool endWrite()
Ends the current write operation.
Definition: SoftI2C.cpp:129
+
SoftI2C::SoftI2C
SoftI2C(uint8_t dataPin, uint8_t clockPin)
Constructs a new software I2C master on dataPin and clockPin.
Definition: SoftI2C.cpp:50
+
SoftI2C::available
unsigned int available()
Returns the number of bytes that are still available for reading.
Definition: SoftI2C.cpp:155
+
SoftI2C::read
uint8_t read()
Reads a single byte from the I2C bus.
Definition: SoftI2C.cpp:160
+
SoftI2C::write
void write(uint8_t value)
Writes a single byte value on the I2C bus.
Definition: SoftI2C.cpp:118
+
SoftI2C::maxTransferSize
unsigned int maxTransferSize() const
Returns the maximum number of bytes that can be read or written in a single request by this bus maste...
Definition: SoftI2C.cpp:65
+
SoftI2C::startWrite
void startWrite(unsigned int address)
Starts a write operation by sending a start condition and the I2C control byte.
Definition: SoftI2C.cpp:104
diff --git a/SoftI2C_8h_source.html b/SoftI2C_8h_source.html index 36e79324..3f584770 100644 --- a/SoftI2C_8h_source.html +++ b/SoftI2C_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: SoftI2C.h Source File @@ -29,7 +30,7 @@ - + @@ -114,19 +115,19 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
25 
26 #include "I2CMaster.h"
27 
-
28 class SoftI2C : public I2CMaster {
+
28 class SoftI2C : public I2CMaster {
29 public:
-
30  SoftI2C(uint8_t dataPin, uint8_t clockPin);
+
30  SoftI2C(uint8_t dataPin, uint8_t clockPin);
31 
-
32  unsigned int maxTransferSize() const;
+
32  unsigned int maxTransferSize() const;
33 
-
34  void startWrite(unsigned int address);
-
35  void write(uint8_t value);
-
36  bool endWrite();
+
34  void startWrite(unsigned int address);
+
35  void write(uint8_t value);
+
36  bool endWrite();
37 
-
38  bool startRead(unsigned int address, unsigned int count);
-
39  unsigned int available();
-
40  uint8_t read();
+
38  bool startRead(unsigned int address, unsigned int count);
+
39  unsigned int available();
+
40  uint8_t read();
41 
42 private:
43  uint8_t _dataPin;
@@ -143,12 +144,22 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
54 };
55 
56 #endif
+
SoftI2C
Bit-banged implementation of an I2C master.
Definition: SoftI2C.h:28
+
SoftI2C::startRead
bool startRead(unsigned int address, unsigned int count)
Starts a read operation for count bytes by sending the start condition and the I2C control byte...
Definition: SoftI2C.cpp:135
+
SoftI2C::endWrite
bool endWrite()
Ends the current write operation.
Definition: SoftI2C.cpp:129
+
SoftI2C::SoftI2C
SoftI2C(uint8_t dataPin, uint8_t clockPin)
Constructs a new software I2C master on dataPin and clockPin.
Definition: SoftI2C.cpp:50
+
SoftI2C::available
unsigned int available()
Returns the number of bytes that are still available for reading.
Definition: SoftI2C.cpp:155
+
SoftI2C::read
uint8_t read()
Reads a single byte from the I2C bus.
Definition: SoftI2C.cpp:160
+
SoftI2C::write
void write(uint8_t value)
Writes a single byte value on the I2C bus.
Definition: SoftI2C.cpp:118
+
SoftI2C::maxTransferSize
unsigned int maxTransferSize() const
Returns the maximum number of bytes that can be read or written in a single request by this bus maste...
Definition: SoftI2C.cpp:65
+
I2CMaster
Abstract base class for I2C master implementations.
Definition: I2CMaster.h:28
+
SoftI2C::startWrite
void startWrite(unsigned int address)
Starts a write operation by sending a start condition and the I2C control byte.
Definition: SoftI2C.cpp:104
diff --git a/TextField_8cpp_source.html b/TextField_8cpp_source.html index ed6f7c31..d0ff0924 100644 --- a/TextField_8cpp_source.html +++ b/TextField_8cpp_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: TextField.cpp Source File @@ -29,7 +30,7 @@ - + @@ -111,44 +112,53 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
22 
23 #include "TextField.h"
24 
-
66 TextField::TextField(const String &label)
-
67  : Field(label)
+
66 TextField::TextField(const String &label)
+
67  : Field(label)
68 {
69 }
70 
-
77 TextField::TextField(Form &form, const String &label, const String &value)
-
78  : Field(form, label)
+
77 TextField::TextField(Form &form, const String &label, const String &value)
+
78  : Field(form, label)
79  , _value(value)
80 {
81 }
82 
-
83 void TextField::enterField(bool reverse)
+
83 void TextField::enterField(bool reverse)
84 {
-
85  Field::enterField(reverse);
-
86  lcd()->setCursor(0, 1);
-
87  lcd()->print(_value);
+
85  Field::enterField(reverse);
+
86  lcd()->setCursor(0, 1);
+
87  lcd()->print(_value);
88 }
89 
-
102 void TextField::setValue(const String &value)
+
102 void TextField::setValue(const String &value)
103 {
-
104  if (isCurrent()) {
+
104  if (isCurrent()) {
105  unsigned int prevLen = _value.length();
106  unsigned int newLen = value.length();
-
107  _value = value;
-
108  lcd()->setCursor(0, 1);
-
109  lcd()->print(value);
+
107  _value = value;
+
108  lcd()->setCursor(0, 1);
+
109  lcd()->print(value);
110  while (newLen++ < prevLen)
-
111  lcd()->write(' ');
+
111  lcd()->write(' ');
112  } else {
-
113  _value = value;
+
113  _value = value;
114  }
115 }
+
TextField::setValue
void setValue(const String &value)
Sets the text value that is displayed by this field.
Definition: TextField.cpp:102
+
TextField::TextField
TextField(const String &label)
Constructs a new text field with a specific label.
Definition: TextField.cpp:66
+
Field
Manages a single data input/output field within a Form.
Definition: Field.h:28
+
Form
Manager for a form containing data input/output fields.
Definition: Form.h:32
+
Field::enterField
virtual void enterField(bool reverse)
Enters the field due to form navigation.
Definition: Field.cpp:116
+
TextField::enterField
void enterField(bool reverse)
Enters the field due to form navigation.
Definition: TextField.cpp:83
+
Field::lcd
LiquidCrystal * lcd() const
Returns the LCD that this field is being drawn on.
Definition: Field.h:47
+
TextField::value
const String & value() const
Returns the text value that is currently displayed by this field.
Definition: TextField.h:35
+
Field::isCurrent
bool isCurrent() const
Returns true if this field is the currently-displayed field in its owning form; false otherwise...
Definition: Field.cpp:169
diff --git a/TextField_8h_source.html b/TextField_8h_source.html index 5f7fb68c..1a3c5dea 100644 --- a/TextField_8h_source.html +++ b/TextField_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: TextField.h Source File @@ -29,7 +30,7 @@ - + @@ -114,27 +115,36 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
25 
26 #include "Field.h"
27 
-
28 class TextField : public Field {
+
28 class TextField : public Field {
29 public:
-
30  explicit TextField(const String &label);
-
31  TextField(Form &form, const String &label, const String &value);
+
30  explicit TextField(const String &label);
+
31  TextField(Form &form, const String &label, const String &value);
32 
-
33  void enterField(bool reverse);
+
33  void enterField(bool reverse);
34 
-
35  const String &value() const { return _value; }
-
36  void setValue(const String &value);
+
35  const String &value() const { return _value; }
+
36  void setValue(const String &value);
37 
38 private:
39  String _value;
40 };
41 
42 #endif
+
TextField::setValue
void setValue(const String &value)
Sets the text value that is displayed by this field.
Definition: TextField.cpp:102
+
TextField::TextField
TextField(const String &label)
Constructs a new text field with a specific label.
Definition: TextField.cpp:66
+
Field
Manages a single data input/output field within a Form.
Definition: Field.h:28
+
Form
Manager for a form containing data input/output fields.
Definition: Form.h:32
+
Field::form
Form * form() const
Returns the Form that owns this field; null if not associated with a Form.
Definition: Field.h:34
+
Field::label
const String & label() const
Returns the label to display in the first line of this field.
Definition: Field.h:41
+
TextField::enterField
void enterField(bool reverse)
Enters the field due to form navigation.
Definition: TextField.cpp:83
+
TextField::value
const String & value() const
Returns the text value that is currently displayed by this field.
Definition: TextField.h:35
+
TextField
Field that displays a read-only text value.
Definition: TextField.h:28
diff --git a/TimeField_8cpp_source.html b/TimeField_8cpp_source.html index 66ac9819..606e2936 100644 --- a/TimeField_8cpp_source.html +++ b/TimeField_8cpp_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: TimeField.cpp Source File @@ -29,7 +30,7 @@ - + @@ -117,8 +118,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
68 #define EDIT_SECOND_TENS 3
69 #define EDIT_SECOND 4
70 
-
82 TimeField::TimeField(const String &label)
-
83  : Field(label)
+
82 TimeField::TimeField(const String &label)
+
83  : Field(label)
84  , _value(0)
85  , _maxHours(24)
86  , _printLen(0)
@@ -127,8 +128,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
89 {
90 }
91 
-
105 TimeField::TimeField(Form &form, const String &label, int maxHours, bool readOnly)
-
106  : Field(form, label)
+
105 TimeField::TimeField(Form &form, const String &label, int maxHours, bool readOnly)
+
106  : Field(form, label)
107  , _value(0)
108  , _maxHours(maxHours)
109  , _printLen(0)
@@ -137,7 +138,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
112 {
113 }
114 
-
115 int TimeField::dispatch(int event)
+
115 int TimeField::dispatch(int event)
116 {
117  unsigned long newValue;
118  if (_readOnly)
@@ -167,7 +168,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
142  else
143  newValue += 1;
144  }
-
145  setValue(newValue);
+
145  setValue(newValue);
146  return FORM_CHANGED;
147  } else if (event == LCD_BUTTON_DOWN) {
148  newValue = _value;
@@ -197,7 +198,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
172  else
173  newValue -= 1;
174  }
-
175  setValue(newValue);
+
175  setValue(newValue);
176  return FORM_CHANGED;
177  } else if (event == LCD_BUTTON_LEFT) {
178  if (editField != EDIT_HOUR) {
@@ -215,86 +216,86 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
190  return -1;
191 }
192 
-
193 void TimeField::enterField(bool reverse)
+
193 void TimeField::enterField(bool reverse)
194 {
-
195  Field::enterField(reverse);
+
195  Field::enterField(reverse);
196  if (reverse)
197  editField = EDIT_SECOND;
198  else
199  editField = EDIT_HOUR;
200  printTime();
201  if (!_readOnly)
-
202  lcd()->cursor();
+
202  lcd()->cursor();
203 }
204 
-
205 void TimeField::exitField()
+
205 void TimeField::exitField()
206 {
207  if (!_readOnly)
-
208  lcd()->noCursor();
-
209  Field::exitField();
+
208  lcd()->noCursor();
+
209  Field::exitField();
210 }
211 
-
227 void TimeField::setValue(unsigned long value)
+
227 void TimeField::setValue(unsigned long value)
228 {
229  unsigned long maxSecs = ((unsigned long)_maxHours) * 60 * 60;
230  value %= maxSecs;
231  if (value != _value) {
-
232  _value = value;
-
233  if (isCurrent())
+
232  _value = value;
+
233  if (isCurrent())
234  printTime();
235  }
236 }
237 
-
268 void TimeField::setReadOnly(bool value)
+
268 void TimeField::setReadOnly(bool value)
269 {
270  if (_readOnly != value) {
-
271  _readOnly = value;
+
271  _readOnly = value;
272  printTime();
-
273  if (isCurrent()) {
+
273  if (isCurrent()) {
274  if (value)
-
275  lcd()->cursor();
+
275  lcd()->cursor();
276  else
-
277  lcd()->noCursor();
+
277  lcd()->noCursor();
278  }
279  }
280 }
281 
282 void TimeField::printTime()
283 {
-
284  lcd()->setCursor(0, 1);
+
284  lcd()->setCursor(0, 1);
285  int col = printField(_value / (60 * 60));
286  int hourCol = col - 1;
-
287  lcd()->write(':');
+
287  lcd()->write(':');
288  ++col;
289  col += printField((_value / 60) % 60);
290  int minuteCol = col - 1;
-
291  lcd()->write(':');
+
291  lcd()->write(':');
292  ++col;
293  col += printField(_value % 60);
294  int secondCol = col - 1;
295  int tempCol = col;
296  while (tempCol++ < _printLen)
-
297  lcd()->write(' ');
+
297  lcd()->write(' ');
298  _printLen = col;
299  if (!_readOnly) {
300  if (editField == EDIT_HOUR)
-
301  lcd()->setCursor(hourCol, 1);
+
301  lcd()->setCursor(hourCol, 1);
302  else if (editField == EDIT_MINUTE_TENS)
-
303  lcd()->setCursor(minuteCol - 1, 1);
+
303  lcd()->setCursor(minuteCol - 1, 1);
304  else if (editField == EDIT_MINUTE)
-
305  lcd()->setCursor(minuteCol, 1);
+
305  lcd()->setCursor(minuteCol, 1);
306  else if (editField == EDIT_SECOND_TENS)
-
307  lcd()->setCursor(secondCol - 1, 1);
+
307  lcd()->setCursor(secondCol - 1, 1);
308  else
-
309  lcd()->setCursor(secondCol, 1);
+
309  lcd()->setCursor(secondCol, 1);
310  }
311 }
312 
313 int TimeField::printField(unsigned long value)
314 {
315  if (value < 100) {
-
316  lcd()->write('0' + (int)(value / 10));
-
317  lcd()->write('0' + (int)(value % 10));
+
316  lcd()->write('0' + (int)(value / 10));
+
317  lcd()->write('0' + (int)(value % 10));
318  return 2;
319  }
320  unsigned long divisor = 100;
@@ -302,18 +303,31 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
322  divisor *= 10;
323  int digits = 0;
324  while (divisor > 0) {
-
325  lcd()->write('0' + (int)((value / divisor) % 10));
+
325  lcd()->write('0' + (int)((value / divisor) % 10));
326  divisor /= 10;
327  ++digits;
328  }
329  return digits;
330 }
+
TimeField::value
unsigned long value() const
Returns the current value of this time field, in seconds.
Definition: TimeField.h:41
+
TimeField::setReadOnly
void setReadOnly(bool value)
Sets the read-only state of this field to value.
Definition: TimeField.cpp:268
+
Field
Manages a single data input/output field within a Form.
Definition: Field.h:28
+
Form
Manager for a form containing data input/output fields.
Definition: Form.h:32
+
Field::enterField
virtual void enterField(bool reverse)
Enters the field due to form navigation.
Definition: Field.cpp:116
+
Field::lcd
LiquidCrystal * lcd() const
Returns the LCD that this field is being drawn on.
Definition: Field.h:47
+
TimeField::dispatch
int dispatch(int event)
Dispatches event via this field.
Definition: TimeField.cpp:115
+
Field::exitField
virtual void exitField()
Exits the field due to form navigation.
Definition: Field.cpp:129
+
TimeField::enterField
void enterField(bool reverse)
Enters the field due to form navigation.
Definition: TimeField.cpp:193
+
TimeField::TimeField
TimeField(const String &label)
Constructs a new time field with a specific label.
Definition: TimeField.cpp:82
+
Field::isCurrent
bool isCurrent() const
Returns true if this field is the currently-displayed field in its owning form; false otherwise...
Definition: Field.cpp:169
+
TimeField::exitField
void exitField()
Exits the field due to form navigation.
Definition: TimeField.cpp:205
+
TimeField::setValue
void setValue(unsigned long value)
Sets the value of this time field, in seconds.
Definition: TimeField.cpp:227
diff --git a/TimeField_8h_source.html b/TimeField_8h_source.html index 8ec2bd78..6609d575 100644 --- a/TimeField_8h_source.html +++ b/TimeField_8h_source.html @@ -3,6 +3,7 @@ + ArduinoLibs: TimeField.h Source File @@ -29,7 +30,7 @@ - + @@ -117,24 +118,24 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
28 #define TIMEFIELD_READ_ONLY true
29 #define TIMEFIELD_READ_WRITE false
30 
-
31 class TimeField : public Field {
+
31 class TimeField : public Field {
32 public:
-
33  explicit TimeField(const String &label);
-
34  TimeField(Form &form, const String &label, int maxHours, bool readOnly);
+
33  explicit TimeField(const String &label);
+
34  TimeField(Form &form, const String &label, int maxHours, bool readOnly);
35 
-
36  int dispatch(int event);
+
36  int dispatch(int event);
37 
-
38  void enterField(bool reverse);
-
39  void exitField();
+
38  void enterField(bool reverse);
+
39  void exitField();
40 
-
41  unsigned long value() const { return _value; }
-
42  void setValue(unsigned long value);
+
41  unsigned long value() const { return _value; }
+
42  void setValue(unsigned long value);
43 
-
44  int maxHours() const { return _maxHours; }
-
45  void setMaxHours(int maxHours) { _maxHours = maxHours; }
+
44  int maxHours() const { return _maxHours; }
+
45  void setMaxHours(int maxHours) { _maxHours = maxHours; }
46 
-
47  bool readOnly() const { return _readOnly; }
-
48  void setReadOnly(bool value);
+
47  bool readOnly() const { return _readOnly; }
+
48  void setReadOnly(bool value);
49 
50 private:
51  unsigned long _value;
@@ -144,16 +145,31 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
55  uint8_t editField;
56 
57  void printTime();
-
58  int printField(unsigned long value);
+
58  int printField(unsigned long value);
59 };
60 
61 #endif
+
TimeField::setMaxHours
void setMaxHours(int maxHours)
Sets the maximum number of hours before the field wraps around to maxHours.
Definition: TimeField.h:45
+
TimeField::value
unsigned long value() const
Returns the current value of this time field, in seconds.
Definition: TimeField.h:41
+
TimeField::setReadOnly
void setReadOnly(bool value)
Sets the read-only state of this field to value.
Definition: TimeField.cpp:268
+
Field
Manages a single data input/output field within a Form.
Definition: Field.h:28
+
Form
Manager for a form containing data input/output fields.
Definition: Form.h:32
+
Field::form
Form * form() const
Returns the Form that owns this field; null if not associated with a Form.
Definition: Field.h:34
+
TimeField::maxHours
int maxHours() const
Returns the maximum number of hours before the field wraps around.
Definition: TimeField.h:44
+
Field::label
const String & label() const
Returns the label to display in the first line of this field.
Definition: Field.h:41
+
TimeField::dispatch
int dispatch(int event)
Dispatches event via this field.
Definition: TimeField.cpp:115
+
TimeField
Field that manages the display and editing of a time value.
Definition: TimeField.h:31
+
TimeField::readOnly
bool readOnly() const
Returns TIMEFIELD_READ_ONLY (true) or TIMEFIELD_READ_WRITE (false).
Definition: TimeField.h:47
+
TimeField::enterField
void enterField(bool reverse)
Enters the field due to form navigation.
Definition: TimeField.cpp:193
+
TimeField::TimeField
TimeField(const String &label)
Constructs a new time field with a specific label.
Definition: TimeField.cpp:82
+
TimeField::exitField
void exitField()
Exits the field due to form navigation.
Definition: TimeField.cpp:205
+
TimeField::setValue
void setValue(unsigned long value)
Sets the value of this time field, in seconds.
Definition: TimeField.cpp:227
diff --git a/TransistorNoiseSource_8cpp_source.html b/TransistorNoiseSource_8cpp_source.html new file mode 100644 index 00000000..db326f93 --- /dev/null +++ b/TransistorNoiseSource_8cpp_source.html @@ -0,0 +1,303 @@ + + + + + + +ArduinoLibs: TransistorNoiseSource.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
TransistorNoiseSource.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #include "TransistorNoiseSource.h"
+
24 #include "RNG.h"
+
25 #include "Crypto.h"
+
26 #include <Arduino.h>
+
27 
+
78 /*
+
79 
+
80 Theory of operation:
+
81 
+
82 From Rob Seward's original design we need to find the median of the input
+
83 signal. That is, the threshold at which half the signal is below the
+
84 threshold (a zero) and the other half is above the threshold (a one).
+
85 Rob used a histogram table to find the median which is memory-intensive.
+
86 We cannot afford to spend that much memory finding the median.
+
87 
+
88 In this implementation we divide the signal up into "buckets" of 1024
+
89 samples. We pick a starting threshold and count the number of ones
+
90 within the bucket. If the number of ones is between 45% to 55% of the
+
91 total number of samples, then we use that threshold to convert the
+
92 bucket into output bits. Otherwise we adjust the threshold up or down,
+
93 discard the bucket, and try again.
+
94 
+
95 After a few buckets, the threshold naturally settles at the median without
+
96 needing a histogram. The rest of the bucket processing can be done online
+
97 with storage needed only for the debiased output bits.
+
98 
+
99 If the input voltage to the noise source is too low to generate noise,
+
100 then the delta between the minimum and maximum samples in the bucket will
+
101 be quite small. This is used to detect disconnection of the noise source.
+
102 No output is generated when the noise source is disconnected.
+
103 
+
104 With 1024 raw input samples we get roughly 256 output bits after
+
105 Von Neumann debiasing. As a further check, the output will be discarded
+
106 if less than 192 bits are generated. This can happen when the noise source
+
107 is connected or disconnected: only part of the bucket is valid.
+
108 
+
109 One of the properties of Rob's circuit design is that over time the median
+
110 changes due to environmental factors and component wear. Because we adjust
+
111 the threshold from bucket to bucket, it should naturally float up or down
+
112 to the new median level as the circuit's properties change.
+
113 
+
114 */
+
115 
+
116 // Number of ADC values that can be generated by analogRead().
+
117 #define ADC_NUM 1024
+
118 
+
119 // Number of samples to collect for a single noise "bucket".
+
120 #define SAMPLES_NUM 1024
+
121 
+
122 // Calculate a percentage of the sample bucket size.
+
123 #define SAMPLES_PCT(num) ((int)(((long)SAMPLES_NUM) * (num) / 100L))
+
124 
+
125 // Expected spread between the minimum and maximum ADC readings for
+
126 // the noise source to be considered as operating correctly.
+
127 #define NOISE_SPREAD (ADC_NUM / 8)
+
128 
+
129 // Calibration states.
+
130 #define NOISE_NOT_CALIBRATING 0
+
131 #define NOISE_CALIBRATING 1
+
132 
+ +
139  : threshold(ADC_NUM / 2)
+
140  , _pin(pin)
+
141  , calState(NOISE_CALIBRATING)
+
142 {
+
143  // Configure the pin as an analog input with no pull-up.
+
144  pinMode(pin, INPUT);
+
145  digitalWrite(pin, LOW);
+
146 
+
147  // Start the bit collection routines.
+
148  restart();
+
149 }
+
150 
+
151 TransistorNoiseSource::~TransistorNoiseSource()
+
152 {
+
153  restart();
+
154 }
+
155 
+ +
157 {
+
158  return calState != NOISE_NOT_CALIBRATING;
+
159 }
+
160 
+ +
162 {
+
163  // Keep track of the minimum and maximum while generating data
+
164  // so that we can detect when the input voltage falls too low
+
165  // for the circuit to generate noise.
+
166  int value = analogRead(_pin);
+
167  if (value < minValue)
+
168  minValue = value;
+
169  if (value > maxValue)
+
170  maxValue = value;
+
171 
+
172  // Collect two bits of input and remove bias using the Von Neumann method.
+
173  // If both bits are the same, then discard both. Otherwise choose one
+
174  // of the bits and output that one. We have to do this carefully so that
+
175  // instruction timing does not reveal the value of the bit that is chosen.
+
176  uint8_t bit = ((threshold - value) >> 15) & 1; // Subtract and extract sign.
+
177  if (count & 1) {
+
178  if (prevBit ^ bit) {
+
179  // The bits are different: add the new bit to the buffer.
+
180  if (posn < sizeof(buffer)) {
+
181  buffer[posn] = (buffer[posn] << 1) | bit;
+
182  if (++bitNum >= 8) {
+
183  ++posn;
+
184  bitNum = 0;
+
185  }
+
186  }
+
187  }
+
188  } else {
+
189  prevBit = bit;
+
190  }
+
191 
+
192  // Keep a count of the number of raw 1 bits.
+
193  ones += bit;
+
194 
+
195  // Bail out if we haven't collected enough samples for a full bucket yet.
+
196  if (++count < SAMPLES_NUM)
+
197  return;
+
198 
+
199  // If the maximum minus the minimum is too small, then there probably
+
200  // is no signal or the input voltage is insufficient to generate noise.
+
201  // Discard the entire bucket and return to calibration.
+
202  if ((maxValue - minValue) < NOISE_SPREAD) {
+
203  restart();
+
204  calState = NOISE_CALIBRATING;
+
205  threshold = ADC_NUM / 2; // Reacquire threshold when the signal returns.
+
206  return;
+
207  }
+
208 
+
209  // If the number of 1's is between 45% and 55% of the total count,
+
210  // then we have a good bucket. The threshold is at an appropriate level.
+
211  if (ones >= SAMPLES_PCT(45) && ones <= SAMPLES_PCT(55)) {
+
212  if (posn >= (sizeof(buffer) * 3 / 4)) {
+
213  // The buffer is at least three-quarters full of debiased bits
+
214  // so pass them onto output(). There may be less bits if we
+
215  // lost or gained the signal half-way through the bucket.
+
216  // Credit 4 bits of entropy for every 8 bits of output.
+
217  output(buffer, posn, posn * 4);
+
218  }
+
219  restart();
+
220  calState = NOISE_NOT_CALIBRATING;
+
221  return;
+
222  }
+
223 
+
224  // The threshold is not close enough to the mid-point of the signal.
+
225  // Adjust the threshold, discard the bucket, and try again.
+
226  if (ones < SAMPLES_PCT(25) || ones > SAMPLES_PCT(75)) {
+
227  // We are a long way away from the mid-point, so move the threshold
+
228  // by a large amount based on the delta to get closer quicker.
+
229  threshold -= (SAMPLES_PCT(50) - ones) / 8;
+
230  } else if (ones < SAMPLES_PCT(50)) {
+
231  // Not enough ones so move the threshold down a bit.
+
232  --threshold;
+
233  } else {
+
234  // Too many ones so move the threshold up a bit.
+
235  ++threshold;
+
236  }
+
237  if (threshold < 0)
+
238  threshold = 0;
+
239  else if (threshold >= ADC_NUM)
+
240  threshold = ADC_NUM - 1;
+
241  restart();
+
242  calState = NOISE_CALIBRATING;
+
243 }
+
244 
+
248 void TransistorNoiseSource::restart()
+
249 {
+
250  clean(buffer);
+
251  prevBit = 0;
+
252  posn = 0;
+
253  bitNum = 0;
+
254  minValue = ADC_NUM - 1;
+
255  maxValue = 0;
+
256  count = 0;
+
257  ones = 0;
+
258 }
+
bool calibrating() const
Determine if the noise source is still calibrating itself.
+
virtual void output(const uint8_t *data, size_t len, unsigned int credit)
Called from subclasses to output noise to the global random number pool.
+
TransistorNoiseSource(uint8_t pin)
Constructs a new transitor-based noise source handler.
+
void stir()
Stirs entropy from this noise source into the global random number pool.
+
+ + + + diff --git a/TransistorNoiseSource_8h_source.html b/TransistorNoiseSource_8h_source.html new file mode 100644 index 00000000..5f09d09b --- /dev/null +++ b/TransistorNoiseSource_8h_source.html @@ -0,0 +1,159 @@ + + + + + + +ArduinoLibs: TransistorNoiseSource.h Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
TransistorNoiseSource.h
+
+
+
1 /*
+
2  * Copyright (C) 2015 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #ifndef CRYPTO_TRANSISTORNOISESOURCE_H
+
24 #define CRYPTO_TRANSISTORNOISESOURCE_H
+
25 
+
26 #include <inttypes.h>
+
27 #include "NoiseSource.h"
+
28 
+ +
30 {
+
31 public:
+
32  explicit TransistorNoiseSource(uint8_t pin);
+
33  virtual ~TransistorNoiseSource();
+
34 
+
35  bool calibrating() const;
+
36 
+
37  void stir();
+
38 
+
39 private:
+
40  int threshold;
+
41  uint8_t _pin;
+
42  uint8_t prevBit;
+
43  uint8_t posn;
+
44  uint8_t bitNum;
+
45  uint8_t calState;
+
46  uint8_t buffer[32];
+
47  int minValue;
+
48  int maxValue;
+
49  int count;
+
50  int ones;
+
51 
+
52  void restart();
+
53 };
+
54 
+
55 #endif
+
bool calibrating() const
Determine if the noise source is still calibrating itself.
+
Abstract base class for random noise sources.
Definition: NoiseSource.h:29
+
Processes the signal from a transistor-based noise source.
+
TransistorNoiseSource(uint8_t pin)
Constructs a new transitor-based noise source handler.
+
void stir()
Stirs entropy from this noise source into the global random number pool.
+
+ + + + diff --git a/alarm-clock_8dox.html b/alarm-clock_8dox.html index 01ed0ff7..2acbcae6 100644 --- a/alarm-clock_8dox.html +++ b/alarm-clock_8dox.html @@ -3,6 +3,7 @@ + ArduinoLibs: alarm-clock.dox File Reference @@ -29,7 +30,7 @@ - + @@ -83,15 +84,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
alarm-clock.dox File Reference
-

Detailed Description

-
-

Definition in file alarm-clock.dox.

-
+ diff --git a/alarm_clock.html b/alarm_clock.html index ba3126fb..dd47b0fb 100644 --- a/alarm_clock.html +++ b/alarm_clock.html @@ -3,6 +3,7 @@ + ArduinoLibs: Alarm Clock @@ -29,7 +30,7 @@ - + @@ -80,7 +81,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

Features

-

The alarm clock described on this page is a large example application that uses many of the classes in the provided libraries: LCD, Form, Field, SoftI2C, DS1307RTC (or DS3232RTC), Melody and PowerSave. The clock has the following features:

+

The alarm clock described on this page is a large example application that uses many of the classes in the provided libraries: LCD, Form, Field, SoftI2C, DS1307RTC (or DS3232RTC), Melody and PowerSave. The clock has the following features:

Main circuit

-

The main clock circuit consists of an Arduino Uno compatible board, a 16x2 LCD module, a realtime clock chip, a piezo buzzer for the alarm, and a MOSFET for controlling the radio:

+

The main clock circuit consists of an Arduino Uno compatible board, a 16x2 LCD module, a realtime clock chip, a piezo buzzer for the alarm, and a MOSFET for controlling the radio:

alarm_circuit.png
-

Some of the components can be purchased ready-made as the Freetronics 16x2 LCD Shield and the SparkFun Realtime Clock Module. I used the ready-made realtime clock module, but made my own equivalent to the LCD shield from parts to aid in spacing out the LCD and pushbuttons on the exterior of the box. The value of the 33R resistor may need to be adjusted for different types of back light LED's. See below for information on using a DS3232-based clock module instead of a DS1307-based module.

-

The whole circuit is built on a prototyping shield, with ribbon cables connecting to the LCD. The Stop Alarm button, piezo buzzer, and radio controller are not shown in this picture and some of the components are soldered to the bottom of the shield:

+

Some of the components can be purchased ready-made as the Freetronics 16x2 LCD Shield and the SparkFun Realtime Clock Module. I used the ready-made realtime clock module, but made my own equivalent to the LCD shield from parts to aid in spacing out the LCD and pushbuttons on the exterior of the box. The value of the 33R resistor may need to be adjusted for different types of back light LED's. See below for information on using a DS3232-based clock module instead of a DS1307-based module.

+

The whole circuit is built on a prototyping shield, with ribbon cables connecting to the LCD. The Stop Alarm button, piezo buzzer, and radio controller are not shown in this picture and some of the components are soldered to the bottom of the shield:

clock_shield.jpg
-

The clock module is based on the DS1307 chip and has an on-board coin battery to keep the time and date ticking over even if the main circuit loses power. The chip is I2C-based and has an auxillary SQW output that can be configured to provide a 1 Hz squarewave signal. This signal is used by the software running on the Arduino to detect when a new time or date is available for display on the LCD. The DS1307RTC class takes care of the details of talking to the chip via I2C.

+

The clock module is based on the DS1307 chip and has an on-board coin battery to keep the time and date ticking over even if the main circuit loses power. The chip is I2C-based and has an auxillary SQW output that can be configured to provide a 1 Hz squarewave signal. This signal is used by the software running on the Arduino to detect when a new time or date is available for display on the LCD. The DS1307RTC class takes care of the details of talking to the chip via I2C.

Arduino board

To keep power consumption low, say for being powered by batteries, we don't need a full Arduino Uno or similar board. The USB interface is unnecessary, as is the on-board power supply if there is an external source of 5 volt power. We also don't want the power and D13 status LED's to be draining power. Therefore, a cut-down version of the Arduino is recommended. We used the KitTen kit from Freetronics, and didn't solder up anything that wasn't strictly necessary. A 5v FTDI USB-to-Serial cable is necessary for programming. Similar minimalistic built-it-yourself Arduino designs should also work.

@@ -121,7 +122,7 @@ Controlling a radio

Using DS3232 instead of DS1307

For clock modules based on the DS3232 chip, such as the Freetronics Real Time Clock Module, change the Clock typedef in Clock.h to the following:

-
typedef DS3232RTC Clock;
+
typedef DS3232RTC Clock;

The pads on the Freetronics module should be connected to the Arduino as follows:

  • VCC and GND connected to 5V and GND on the Arduino.
  • @@ -139,9 +140,9 @@ Completed Clock
diff --git a/annotated.html b/annotated.html index a144a4b5..9ef9dfc4 100644 --- a/annotated.html +++ b/annotated.html @@ -3,6 +3,7 @@ + ArduinoLibs: Class List @@ -29,7 +30,7 @@
- + @@ -88,38 +89,61 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here are the classes, structs, unions and interfaces with brief descriptions:
- - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
oCBitmapRepresents a monochrome bitmap within main memory
oCBlinkLEDBlink a LED on a digital output pin
oCBoolFieldField that manages the input of a boolean value
oCCharlieplexManage an array of LED's in a charlieplexed arrangement
oCChaseLEDsChase LED's on output pins in a defined sequence
oCDMDHandle large dot matrix displays composed of LED's
oCDS1307RTCCommunicates with a DS1307 realtime clock chip via I2C
oCDS3232RTCCommunicates with a DS3232 realtime clock chip via I2C
oCEEPROM24Reading and writing EEPROM's from the 24LCXX family
oCFieldManages a single data input/output field within a Form
oCFormManager for a form containing data input/output fields
oCI2CMasterAbstract base class for I2C master implementations
oCIntFieldField that manages the input of an integer value
oCIRreceiverManages the reception of RC-5 commands from an infrared remote control
oCLCDEnhanced library for Freetronics 16x2 LCD shields
oCListFieldField that manages selection from a static list of items
oCMelodyPlays a melody on a digital output pin using tone()
oCRTCBase class for realtime clock handlers
oCRTCAlarmStores alarm information from a realtime clock chip
oCRTCDateStores date information from a realtime clock chip
oCRTCTimeStores time information from a realtime clock chip
oCSoftI2CBit-banged implementation of an I2C master
oCTextFieldField that displays a read-only text value
\CTimeFieldField that manages the display and editing of a time value
oCAES128AES block cipher with 128-bit keys
oCAES192AES block cipher with 192-bit keys
oCAES256AES block cipher with 256-bit keys
oCAESCommonAbstract base class for AES block ciphers
oCBitmapRepresents a monochrome bitmap within main memory
oCBLAKE2sBLAKE2s hash algorithm
oCBlinkLEDBlink a LED on a digital output pin
oCBlockCipherAbstract base class for block ciphers
oCBoolFieldField that manages the input of a boolean value
oCCBCImplementation of the Cipher Block Chaining (CBC) mode for 128-bit block ciphers
oCCBCCommonConcrete base class to assist with implementing CBC for 128-bit block ciphers
oCCFBImplementation of the Cipher Feedback (CFB) mode for 128-bit block ciphers
oCCFBCommonConcrete base class to assist with implementing CFB for 128-bit block ciphers
oCChaChaChaCha stream cipher
oCCharlieplexManage an array of LED's in a charlieplexed arrangement
oCChaseLEDsChase LED's on output pins in a defined sequence
oCCipherAbstract base class for stream ciphers
oCCTRImplementation of the Counter (CTR) mode for 128-bit block ciphers
oCCTRCommonConcrete base class to assist with implementing CTR mode for 128-bit block ciphers
oCCurve25519Diffie-Hellman key agreement based on the elliptic curve modulo 2^255 - 19
oCDMDHandle large dot matrix displays composed of LED's
oCDS1307RTCCommunicates with a DS1307 realtime clock chip via I2C
oCDS3232RTCCommunicates with a DS3232 realtime clock chip via I2C
oCEEPROM24Reading and writing EEPROM's from the 24LCXX family
oCFieldManages a single data input/output field within a Form
oCFormManager for a form containing data input/output fields
oCHashAbstract base class for cryptographic hash algorithms
oCI2CMasterAbstract base class for I2C master implementations
oCIntFieldField that manages the input of an integer value
oCIRreceiverManages the reception of RC-5 commands from an infrared remote control
oCLCDEnhanced library for Freetronics 16x2 LCD shields
oCListFieldField that manages selection from a static list of items
oCMelodyPlays a melody on a digital output pin using tone()
oCNoiseSourceAbstract base class for random noise sources
oCOFBImplementation of the Output Feedback (OFB) mode for 128-bit block ciphers
oCOFBCommonConcrete base class to assist with implementing OFB for 128-bit block ciphers
oCRNGClassPseudo random number generator suitable for cryptography
oCRTCBase class for realtime clock handlers
oCRTCAlarmStores alarm information from a realtime clock chip
oCRTCDateStores date information from a realtime clock chip
oCRTCTimeStores time information from a realtime clock chip
oCSHA1SHA-1 hash algorithm
oCSHA256SHA-256 hash algorithm
oCSoftI2CBit-banged implementation of an I2C master
oCTextFieldField that displays a read-only text value
oCTimeFieldField that manages the display and editing of a time value
\CTransistorNoiseSourceProcesses the signal from a transistor-based noise source
diff --git a/bc_s.png b/bc_s.png index 25e3beb4..224b29aa 100644 Binary files a/bc_s.png and b/bc_s.png differ diff --git a/blink-blink_8dox.html b/blink-blink_8dox.html index e5ab9f20..5919b0c5 100644 --- a/blink-blink_8dox.html +++ b/blink-blink_8dox.html @@ -3,6 +3,7 @@ + ArduinoLibs: blink-blink.dox File Reference @@ -29,7 +30,7 @@ - + @@ -83,15 +84,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
blink-blink.dox File Reference
-

Detailed Description

-
-

Definition in file blink-blink.dox.

-
+ diff --git a/blink-charlieplex_8dox.html b/blink-charlieplex_8dox.html index 6eb5ff41..8b4c8d29 100644 --- a/blink-charlieplex_8dox.html +++ b/blink-charlieplex_8dox.html @@ -3,6 +3,7 @@ + ArduinoLibs: blink-charlieplex.dox File Reference @@ -29,7 +30,7 @@ - + @@ -83,15 +84,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
blink-charlieplex.dox File Reference
-

Detailed Description

-
-

Definition in file blink-charlieplex.dox.

-
+ diff --git a/blink-cylon_8dox.html b/blink-cylon_8dox.html index c9c1b3ef..3f2066d4 100644 --- a/blink-cylon_8dox.html +++ b/blink-cylon_8dox.html @@ -3,6 +3,7 @@ + ArduinoLibs: blink-cylon.dox File Reference @@ -29,7 +30,7 @@ - + @@ -83,15 +84,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
blink-cylon.dox File Reference
-

Detailed Description

-
-

Definition in file blink-cylon.dox.

-
+ diff --git a/blink-startrek_8dox.html b/blink-startrek_8dox.html index 27c9f4d3..87a9e51c 100644 --- a/blink-startrek_8dox.html +++ b/blink-startrek_8dox.html @@ -3,6 +3,7 @@ + ArduinoLibs: blink-startrek.dox File Reference @@ -29,7 +30,7 @@ - + @@ -83,15 +84,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
blink-startrek.dox File Reference
-

Detailed Description

-
-

Definition in file blink-startrek.dox.

-
+ diff --git a/blink_blink.html b/blink_blink.html index da7bd184..c2a33b1d 100644 --- a/blink_blink.html +++ b/blink_blink.html @@ -3,6 +3,7 @@ + ArduinoLibs: Blinking LED Example @@ -29,7 +30,7 @@ - + @@ -78,27 +79,27 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Blinking LED Example
-

The BlinkLED class provides support logic for blinking a LED connected to an output pin. The traditional way to blink a LED uses a delay loop:

+

The BlinkLED class provides support logic for blinking a LED connected to an output pin. The traditional way to blink a LED uses a delay loop:

void loop() {
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}
-

The problem with this code is that the entire application is blocked during the delay(). No other activities can be serviced. BlinkLED provides a re-entrant timer-based implementation that is simple to use in any application and which won't block other activities.

-

We start this example by including the BlinkLED class and instantiating an object instance:

+

The problem with this code is that the entire application is blocked during the delay(). No other activities can be serviced. BlinkLED provides a re-entrant timer-based implementation that is simple to use in any application and which won't block other activities.

+

We start this example by including the BlinkLED class and instantiating an object instance:

#include <BlinkLED.h>
-
BlinkLED statusBlink(13, 70, 930);
+
BlinkLED statusBlink(13, 70, 930);

In this example we have specified that the LED is on pin D13, the LED should be on for 70 milliseconds, and off for 930 milliseconds. This will cause the status LED to "strobe" once per second. The LED will be initially off for 930 milliseconds after device reset. To start with the LED on, use the following initialization code instead:

-
BlinkLED statusBlink(13, 70, 930, true);
+
BlinkLED statusBlink(13, 70, 930, true);

The remaining code we need is a call to BlinkLED::loop() every time around the main application loop:

void loop() {
statusBlink.loop();
}

-

As can be seen, BlinkLED simplifies the process of blinking a LED quite considerably. It is also possible to pause() and resume() the blinking. This is useful in applications where a blinking LED indicates a certain state such as an error condition or a long-running operation that is in progress; with the LED off at other times. The on/off blink rate can be modified at runtime using BlinkLED::setBlinkRate(), and the LED can be set to a specific value using BlinkLED::setState().

+

As can be seen, BlinkLED simplifies the process of blinking a LED quite considerably. It is also possible to pause() and resume() the blinking. This is useful in applications where a blinking LED indicates a certain state such as an error condition or a long-running operation that is in progress; with the LED off at other times. The on/off blink rate can be modified at runtime using BlinkLED::setBlinkRate(), and the LED can be set to a specific value using BlinkLED::setState().

The full source code for the example follows:

/*
Blink the status LED using the BlinkLED utility class.
@@ -108,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
#include <BlinkLED.h>
-
BlinkLED statusBlink(13, 70, 930);
+
BlinkLED statusBlink(13, 70, 930);
void setup() {}
@@ -119,9 +120,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/blink_charlieplex.html b/blink_charlieplex.html index b593ba21..e0c47c50 100644 --- a/blink_charlieplex.html +++ b/blink_charlieplex.html @@ -3,6 +3,7 @@ + ArduinoLibs: Charlieplexing Example @@ -29,7 +30,7 @@
- + @@ -78,25 +79,25 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Charlieplexing Example
-

Charlieplexing is a technique for multiplexing large numbers of LED's on a small number of microcontroller output pins. LED's are arranged in complementary pairs and managed by the Charlieplex class. For this example we are going to use 3 output pins to drive 6 LED's:

+

Charlieplexing is a technique for multiplexing large numbers of LED's on a small number of microcontroller output pins. LED's are arranged in complementary pairs and managed by the Charlieplex class. For this example we are going to use 3 output pins to drive 6 LED's:

charlieplexeg.png
-

The technique can be expanded to even larger numbers of LED's. See the documentation for the Charlieplex class for a description of how to connect up larger numbers of pins in a Charlieplexed arrangement.

-

The first step is to initialize a Charlieplex object with the output pins it needs to drive:

+

The technique can be expanded to even larger numbers of LED's. See the documentation for the Charlieplex class for a description of how to connect up larger numbers of pins in a Charlieplexed arrangement.

+

The first step is to initialize a Charlieplex object with the output pins it needs to drive:

#include <Charlieplex.h>
byte pins[3] = {9, 10, 11};
-
Charlieplex charlie(pins, sizeof(pins));
+
Charlieplex charlie(pins, sizeof(pins));

-

Then in setup() we use Charlieplex::setLed() and Charlieplex::setPwmLed() to set three of the six LED's to the desired output values:

+

Then in setup() we use Charlieplex::setLed() and Charlieplex::setPwmLed() to set three of the six LED's to the desired output values:

void setup() {
charlie.setLed(0, true); // Turn on LED1
charlie.setLed(3, true); // Turn on LED4
charlie.setPwmLed(5, 64); // Set LED6 to one-quarter on
}

-

Charlieplexing can only light a single LED at a time. It is therefore necessary to constantly scan the entire LED array, alternatively turning LED's on and off. The user's peristence of vision fills in the gaps. To do this, we call Charlieplex::loop():

+

Charlieplexing can only light a single LED at a time. It is therefore necessary to constantly scan the entire LED array, alternatively turning LED's on and off. The user's peristence of vision fills in the gaps. To do this, we call Charlieplex::loop():

void loop() {
charlie.loop();
}
@@ -108,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
#include <Charlieplex.h>
byte pins[3] = {9, 10, 11};
-
Charlieplex charlie(pins, sizeof(pins));
+
Charlieplex charlie(pins, sizeof(pins));
void setup() {
charlie.setLed(0, true); // Turn on LED1
@@ -125,7 +126,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
#include <Charlieplex.h>
byte pins[3] = {9, 10, 11};
-
Charlieplex charlie(pins, sizeof(pins));
+
Charlieplex charlie(pins, sizeof(pins));
int previous = 1;
int current = 0;
@@ -159,9 +160,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/blink_cylon.html b/blink_cylon.html index 681b7dbc..68d9c11d 100644 --- a/blink_cylon.html +++ b/blink_cylon.html @@ -3,6 +3,7 @@ + ArduinoLibs: Cylon Eyes Example @@ -29,7 +30,7 @@
- + @@ -78,16 +79,16 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Cylon Eyes Example
-

This example shows how to use the ChaseLEDs class to simulate the Cylon eye effect from Battlestar Galactica. Digital outputs are used to drive six LED's in a back and forth motion, using the following schematic:

+

This example shows how to use the ChaseLEDs class to simulate the Cylon eye effect from Battlestar Galactica. Digital outputs are used to drive six LED's in a back and forth motion, using the following schematic:

Cylon.png
-

We start by including the ChaseLEDs class:

+

We start by including the ChaseLEDs class:

#include <ChaseLEDs.h>

The next step is to define the pins that the chase will run over:

byte pins[] = {3, 5, 6, 9, 10, 11, 10, 9, 6, 5};
-
ChaseLEDs cylonEyes(pins, sizeof(pins), 100);
+
ChaseLEDs cylonEyes(pins, sizeof(pins), 100);

The chase runs from the first pin to the sixth pin and back again, with each LED lit for 100 milliseconds before moving onto the next one. To complete the example, we need to call ChaseLEDs::loop() each time around our main loop to cause the chase to run:

void loop() {
@@ -95,22 +96,22 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
}

While this example uses only six pins, it can be easily extended to any number of pins by modifying the pins array and altering the schematic accordingly.

-

So far we are chasing only a single LED. We could change this to chase two adjacent LED's instead by defining a new CylonChase class that inherits from ChaseLEDs:

-
class CylonChase : public ChaseLEDs
+

So far we are chasing only a single LED. We could change this to chase two adjacent LED's instead by defining a new CylonChase class that inherits from ChaseLEDs:

+
class CylonChase : public ChaseLEDs
{
public:
CylonChase(const byte *pins, int num, unsigned long advanceTime)
-
: ChaseLEDs(pins, num, advanceTime) {}
+
: ChaseLEDs(pins, num, advanceTime) {}
protected:
-
void advance(byte prevPin, byte nextPin) {
-
digitalWrite(previousPin(2), LOW);
+
void advance(byte prevPin, byte nextPin) {
+
digitalWrite(previousPin(2), LOW);
digitalWrite(prevPin, HIGH);
digitalWrite(nextPin, HIGH);
}
};

-

The important part is the implementation of the advance() method, which overrides ChaseLEDs::advance() to provide our own scheme for lighting the LED's each time the chase advances. We use ChaseLEDs::previousPin() to get the pin that is 2 steps back in the sequence, set it to LOW, and then set the previous pin (1 step back) and the next pin to HIGH. All that remains is to change our chase initialization to use the new class:

+

The important part is the implementation of the advance() method, which overrides ChaseLEDs::advance() to provide our own scheme for lighting the LED's each time the chase advances. We use ChaseLEDs::previousPin() to get the pin that is 2 steps back in the sequence, set it to LOW, and then set the previous pin (1 step back) and the next pin to HIGH. All that remains is to change our chase initialization to use the new class:

byte pins[] = {3, 5, 6, 9, 10, 11, 10, 9, 6, 5};
CylonChase cylonEyes(pins, sizeof(pins), 100);

@@ -143,18 +144,18 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
#include <ChaseLEDs.h>
-
class CylonChase : public ChaseLEDs
+
class CylonChase : public ChaseLEDs
{
public:
CylonChase(const byte *pins, int num, unsigned long advanceTime)
-
: ChaseLEDs(pins, num, advanceTime) {}
+
: ChaseLEDs(pins, num, advanceTime) {}
protected:
-
void advance(byte prevPin, byte nextPin) {
-
digitalWrite(previousPin(2), LOW);
+
void advance(byte prevPin, byte nextPin) {
+
digitalWrite(previousPin(2), LOW);
analogWrite(prevPin, 32);
digitalWrite(nextPin, HIGH);
-
setAdvanceTime(map(analogRead(A0), 0, 1023, 25, 250));
+
setAdvanceTime(map(analogRead(A0), 0, 1023, 25, 250));
}
};
@@ -170,9 +171,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/blink_startrek.html b/blink_startrek.html index e48d7c51..927a8cae 100644 --- a/blink_startrek.html +++ b/blink_startrek.html @@ -3,6 +3,7 @@ + ArduinoLibs: Star Trek Example @@ -29,7 +30,7 @@
- + @@ -78,7 +79,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Star Trek Example
-

This example shows how to use the BlinkLED and ChaseLEDs classes to simulate the running lights on the starship Enterprise from Star Trek. This can be used as the basis for lighting a model kit. It is recommended that you read the Blink and Cylon tutorials first.

+

This example shows how to use the BlinkLED and ChaseLEDs classes to simulate the running lights on the starship Enterprise from Star Trek. This can be used as the basis for lighting a model kit. It is recommended that you read the Blink and Cylon tutorials first.

There are four categories of lights on the Enterprise:

  • Static lights in windows, engines, and the deflector dish. We don't handle those in this example as we assume that they are connected directly to the power supply with no computer control.
  • @@ -99,18 +100,18 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    StarTrekShield.png
    -

    Now that we have a circuit, let's configure the red navigation LED on AOUT2 using the BlinkLED class, to blink with a period of 1000 milliseconds on, 1000 milliseconds off:

    +

    Now that we have a circuit, let's configure the red navigation LED on AOUT2 using the BlinkLED class, to blink with a period of 1000 milliseconds on, 1000 milliseconds off:

    #include <BlinkLED.h>
    #define NAV_LIGHTS A2 // Output pin for controlling the navigation lights
    #define NAV_LIGHTS_ON 1000 // Time the navigation lights are on (milliseconds)
    #define NAV_LIGHTS_OFF 1000 // Time the navigation lights are off (milliseconds)
    -
    BlinkLED navLights(NAV_LIGHTS, NAV_LIGHTS_ON, NAV_LIGHTS_OFF);
    +
    BlinkLED navLights(NAV_LIGHTS, NAV_LIGHTS_ON, NAV_LIGHTS_OFF);

    We repeat the process for the strobe LED on AOUT3, with a period of 70 milliseconds on, and 830 milliseconds off:

    #define STROBE_LIGHT A3 // Output pin for controlling the strobe
    #define STROBE_LIGHT_ON 70 // Time the strobe light is on (milliseconds)
    #define STROBE_LIGHT_OFF 830 // Time the strobe light is off (milliseconds)
    -
    BlinkLED strobeLight(STROBE_LIGHT, STROBE_LIGHT_ON, STROBE_LIGHT_OFF);
    +
    BlinkLED strobeLight(STROBE_LIGHT, STROBE_LIGHT_ON, STROBE_LIGHT_OFF);

    We also need to arrange for BlinkLED::loop() to be called from the application's main loop() function:

    void loop() {
    @@ -118,7 +119,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    strobeLight.loop();
    }

    If you run the sketch at this point, you should see the navigation and strobe LED's blink with the selected rates.

    -

    Next is the twirl effect in the warp nacelles, using the ChaseLEDs class. We are actually going to inherit from ChaseLEDs to create a custom LED chaser that reads the chase rate from AIN0 and uses PWM outputs to create a trailing flame effect. See the Cylon example for more information on creating custom effects with ChaseLEDs.

    +

    Next is the twirl effect in the warp nacelles, using the ChaseLEDs class. We are actually going to inherit from ChaseLEDs to create a custom LED chaser that reads the chase rate from AIN0 and uses PWM outputs to create a trailing flame effect. See the Cylon example for more information on creating custom effects with ChaseLEDs.

    #define NACELLE_CHASE_LEN 6 // Length of nacelle chase, 1..6
    #define NACELLE_MIN_PERIOD 25 // Minimum time to advance the nacelle chase (milliseconds)
    #define NACELLE_MAX_PERIOD 250 // Maximum time to advance the nacelle chase (milliseconds)
    @@ -127,18 +128,18 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    // Output pins to use for the nacelle chase
    byte nacelleChasePins[6] = {3, 5, 6, 9, 10, 11};
    -
    class NacelleChaseLEDs : public ChaseLEDs
    +
    class NacelleChaseLEDs : public ChaseLEDs
    {
    public:
    NacelleChaseLEDs(const byte *pins, int num)
    -
    : ChaseLEDs(pins, num, 0) {}
    +
    : ChaseLEDs(pins, num, 0) {}
    protected:
    -
    void advance(byte prevPin, byte nextPin) {
    -
    digitalWrite(previousPin(2), LOW);
    +
    void advance(byte prevPin, byte nextPin) {
    +
    digitalWrite(previousPin(2), LOW);
    analogWrite(prevPin, NACELLE_DIM_VALUE);
    digitalWrite(nextPin, HIGH);
    -
    setAdvanceTime(map(analogRead(NACELLE_RATE), 0, 1023, NACELLE_MIN_PERIOD, NACELLE_MAX_PERIOD));
    +
    setAdvanceTime(map(analogRead(NACELLE_RATE), 0, 1023, NACELLE_MIN_PERIOD, NACELLE_MAX_PERIOD));
    }
    };
    @@ -198,28 +199,28 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    // Output pins to use for the nacelle chase
    byte nacelleChasePins[6] = {3, 5, 6, 9, 10, 11};
    -
    class NacelleChaseLEDs : public ChaseLEDs
    +
    class NacelleChaseLEDs : public ChaseLEDs
    {
    public:
    NacelleChaseLEDs(const byte *pins, int num)
    -
    : ChaseLEDs(pins, num, 0) {}
    +
    : ChaseLEDs(pins, num, 0) {}
    protected:
    -
    void advance(byte prevPin, byte nextPin) {
    -
    digitalWrite(previousPin(5), LOW);
    -
    analogWrite(previousPin(4), NACELLE_DIM_VALUE);
    -
    digitalWrite(previousPin(3), HIGH);
    -
    digitalWrite(previousPin(2), LOW);
    +
    void advance(byte prevPin, byte nextPin) {
    +
    digitalWrite(previousPin(5), LOW);
    +
    analogWrite(previousPin(4), NACELLE_DIM_VALUE);
    +
    digitalWrite(previousPin(3), HIGH);
    +
    digitalWrite(previousPin(2), LOW);
    analogWrite(prevPin, NACELLE_DIM_VALUE);
    digitalWrite(nextPin, HIGH);
    -
    setAdvanceTime(map(analogRead(NACELLE_RATE), 0, 1023, NACELLE_MIN_PERIOD, NACELLE_MAX_PERIOD));
    +
    setAdvanceTime(map(analogRead(NACELLE_RATE), 0, 1023, NACELLE_MIN_PERIOD, NACELLE_MAX_PERIOD));
    }
    };
    NacelleChaseLEDs nacelleChase(nacelleChasePins, NACELLE_CHASE_LEN);
    -
    BlinkLED navLights(NAV_LIGHTS, NAV_LIGHTS_ON, NAV_LIGHTS_OFF);
    -
    BlinkLED strobeLight(STROBE_LIGHT, STROBE_LIGHT_ON, STROBE_LIGHT_OFF);
    +
    BlinkLED navLights(NAV_LIGHTS, NAV_LIGHTS_ON, NAV_LIGHTS_OFF);
    +
    BlinkLED strobeLight(STROBE_LIGHT, STROBE_LIGHT_ON, STROBE_LIGHT_OFF);
    void setup() {
    // Turn off the status LED on the Arduino board (we don't need it).
    @@ -236,9 +237,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classAES128-members.html b/classAES128-members.html new file mode 100644 index 00000000..49bfe0a1 --- /dev/null +++ b/classAES128-members.html @@ -0,0 +1,113 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
AES128 Member List
+
+
+ +

This is the complete list of members for AES128, including all inherited members.

+ + + + + + + + + + + + + +
AES128()AES128
AESCommon()AESCommonprotected
BlockCipher()BlockCipher
blockSize() const AESCommonvirtual
clear()AESCommonvirtual
decryptBlock(uint8_t *output, const uint8_t *input)AESCommonvirtual
encryptBlock(uint8_t *output, const uint8_t *input)AESCommonvirtual
keySize() const AES128virtual
setKey(const uint8_t *key, size_t len)AES128virtual
~AES128() (defined in AES128)AES128virtual
~AESCommon()AESCommonvirtual
~BlockCipher()BlockCiphervirtual
+ + + + diff --git a/classAES128.html b/classAES128.html new file mode 100644 index 00000000..209b40f5 --- /dev/null +++ b/classAES128.html @@ -0,0 +1,273 @@ + + + + + + +ArduinoLibs: AES128 Class Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
AES128 Class Reference
+
+
+ +

AES block cipher with 128-bit keys. + More...

+ +

#include <AES.h>

+
+Inheritance diagram for AES128:
+
+
+ + +AESCommon +BlockCipher + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 AES128 ()
 Constructs an AES 128-bit block cipher with no initial key. More...
 
size_t keySize () const
 Size of a 128-bit AES key in bytes. More...
 
bool setKey (const uint8_t *key, size_t len)
 Sets the key to use for future encryption and decryption operations. More...
 
- Public Member Functions inherited from AESCommon
+virtual ~AESCommon ()
 Destroys this AES block cipher object after clearing sensitive information.
 
size_t blockSize () const
 Size of an AES block in bytes. More...
 
void encryptBlock (uint8_t *output, const uint8_t *input)
 Encrypts a single block using this cipher. More...
 
void decryptBlock (uint8_t *output, const uint8_t *input)
 Decrypts a single block using this cipher. More...
 
void clear ()
 Clears all security-sensitive state from this block cipher. More...
 
- Public Member Functions inherited from BlockCipher
BlockCipher ()
 Constructs a block cipher.
 
virtual ~BlockCipher ()
 Destroys this block cipher object. More...
 
+ + + + + +

+Additional Inherited Members

- Protected Member Functions inherited from AESCommon
AESCommon ()
 Constructs an AES block cipher object.
 
+

Detailed Description

+

AES block cipher with 128-bit keys.

+
See Also
AES192, AES256
+ +

Definition at line 56 of file AES.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
AES128::AES128 ()
+
+ +

Constructs an AES 128-bit block cipher with no initial key.

+

This constructor must be followed by a call to setKey() before the block cipher can be used for encryption or decryption.

+ +

Definition at line 40 of file AES128.cpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
size_t AES128::keySize () const
+
+virtual
+
+ +

Size of a 128-bit AES key in bytes.

+
Returns
Always returns 16.
+ +

Implements BlockCipher.

+ +

Definition at line 55 of file AES128.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool AES128::setKey (const uint8_t * key,
size_t len 
)
+
+virtual
+
+ +

Sets the key to use for future encryption and decryption operations.

+
Parameters
+ + + +
keyThe key to use.
lenThe length of the key.
+
+
+
Returns
Returns false if the key length is not supported, or the key is somehow "weak" and unusable by this cipher.
+

Use clear() or the destructor to remove the key and any other sensitive data from the object once encryption or decryption is complete.

+
See Also
keySize(), clear()
+ +

Implements BlockCipher.

+ +

Definition at line 60 of file AES128.cpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/classAES128.png b/classAES128.png new file mode 100644 index 00000000..c158a9d1 Binary files /dev/null and b/classAES128.png differ diff --git a/classAES192-members.html b/classAES192-members.html new file mode 100644 index 00000000..624f5950 --- /dev/null +++ b/classAES192-members.html @@ -0,0 +1,113 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
AES192 Member List
+
+
+ +

This is the complete list of members for AES192, including all inherited members.

+ + + + + + + + + + + + + +
AES192()AES192
AESCommon()AESCommonprotected
BlockCipher()BlockCipher
blockSize() const AESCommonvirtual
clear()AESCommonvirtual
decryptBlock(uint8_t *output, const uint8_t *input)AESCommonvirtual
encryptBlock(uint8_t *output, const uint8_t *input)AESCommonvirtual
keySize() const AES192virtual
setKey(const uint8_t *key, size_t len)AES192virtual
~AES192() (defined in AES192)AES192virtual
~AESCommon()AESCommonvirtual
~BlockCipher()BlockCiphervirtual
+ + + + diff --git a/classAES192.html b/classAES192.html new file mode 100644 index 00000000..884e2ac4 --- /dev/null +++ b/classAES192.html @@ -0,0 +1,273 @@ + + + + + + +ArduinoLibs: AES192 Class Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
AES192 Class Reference
+
+
+ +

AES block cipher with 192-bit keys. + More...

+ +

#include <AES.h>

+
+Inheritance diagram for AES192:
+
+
+ + +AESCommon +BlockCipher + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 AES192 ()
 Constructs an AES 192-bit block cipher with no initial key. More...
 
size_t keySize () const
 Size of a 192-bit AES key in bytes. More...
 
bool setKey (const uint8_t *key, size_t len)
 Sets the key to use for future encryption and decryption operations. More...
 
- Public Member Functions inherited from AESCommon
+virtual ~AESCommon ()
 Destroys this AES block cipher object after clearing sensitive information.
 
size_t blockSize () const
 Size of an AES block in bytes. More...
 
void encryptBlock (uint8_t *output, const uint8_t *input)
 Encrypts a single block using this cipher. More...
 
void decryptBlock (uint8_t *output, const uint8_t *input)
 Decrypts a single block using this cipher. More...
 
void clear ()
 Clears all security-sensitive state from this block cipher. More...
 
- Public Member Functions inherited from BlockCipher
BlockCipher ()
 Constructs a block cipher.
 
virtual ~BlockCipher ()
 Destroys this block cipher object. More...
 
+ + + + + +

+Additional Inherited Members

- Protected Member Functions inherited from AESCommon
AESCommon ()
 Constructs an AES block cipher object.
 
+

Detailed Description

+

AES block cipher with 192-bit keys.

+
See Also
AES128, AES256
+ +

Definition at line 70 of file AES.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
AES192::AES192 ()
+
+ +

Constructs an AES 192-bit block cipher with no initial key.

+

This constructor must be followed by a call to setKey() before the block cipher can be used for encryption or decryption.

+ +

Definition at line 40 of file AES192.cpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
size_t AES192::keySize () const
+
+virtual
+
+ +

Size of a 192-bit AES key in bytes.

+
Returns
Always returns 24.
+ +

Implements BlockCipher.

+ +

Definition at line 55 of file AES192.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool AES192::setKey (const uint8_t * key,
size_t len 
)
+
+virtual
+
+ +

Sets the key to use for future encryption and decryption operations.

+
Parameters
+ + + +
keyThe key to use.
lenThe length of the key.
+
+
+
Returns
Returns false if the key length is not supported, or the key is somehow "weak" and unusable by this cipher.
+

Use clear() or the destructor to remove the key and any other sensitive data from the object once encryption or decryption is complete.

+
See Also
keySize(), clear()
+ +

Implements BlockCipher.

+ +

Definition at line 60 of file AES192.cpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/classAES192.png b/classAES192.png new file mode 100644 index 00000000..23ac333b Binary files /dev/null and b/classAES192.png differ diff --git a/classAES256-members.html b/classAES256-members.html new file mode 100644 index 00000000..bad99fc0 --- /dev/null +++ b/classAES256-members.html @@ -0,0 +1,113 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
AES256 Member List
+
+
+ +

This is the complete list of members for AES256, including all inherited members.

+ + + + + + + + + + + + + +
AES256()AES256
AESCommon()AESCommonprotected
BlockCipher()BlockCipher
blockSize() const AESCommonvirtual
clear()AESCommonvirtual
decryptBlock(uint8_t *output, const uint8_t *input)AESCommonvirtual
encryptBlock(uint8_t *output, const uint8_t *input)AESCommonvirtual
keySize() const AES256virtual
setKey(const uint8_t *key, size_t len)AES256virtual
~AES256() (defined in AES256)AES256virtual
~AESCommon()AESCommonvirtual
~BlockCipher()BlockCiphervirtual
+ + + + diff --git a/classAES256.html b/classAES256.html new file mode 100644 index 00000000..bfc1f0da --- /dev/null +++ b/classAES256.html @@ -0,0 +1,273 @@ + + + + + + +ArduinoLibs: AES256 Class Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
AES256 Class Reference
+
+
+ +

AES block cipher with 256-bit keys. + More...

+ +

#include <AES.h>

+
+Inheritance diagram for AES256:
+
+
+ + +AESCommon +BlockCipher + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 AES256 ()
 Constructs an AES 256-bit block cipher with no initial key. More...
 
size_t keySize () const
 Size of a 256-bit AES key in bytes. More...
 
bool setKey (const uint8_t *key, size_t len)
 Sets the key to use for future encryption and decryption operations. More...
 
- Public Member Functions inherited from AESCommon
+virtual ~AESCommon ()
 Destroys this AES block cipher object after clearing sensitive information.
 
size_t blockSize () const
 Size of an AES block in bytes. More...
 
void encryptBlock (uint8_t *output, const uint8_t *input)
 Encrypts a single block using this cipher. More...
 
void decryptBlock (uint8_t *output, const uint8_t *input)
 Decrypts a single block using this cipher. More...
 
void clear ()
 Clears all security-sensitive state from this block cipher. More...
 
- Public Member Functions inherited from BlockCipher
BlockCipher ()
 Constructs a block cipher.
 
virtual ~BlockCipher ()
 Destroys this block cipher object. More...
 
+ + + + + +

+Additional Inherited Members

- Protected Member Functions inherited from AESCommon
AESCommon ()
 Constructs an AES block cipher object.
 
+

Detailed Description

+

AES block cipher with 256-bit keys.

+
See Also
AES128, AES192
+ +

Definition at line 84 of file AES.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
AES256::AES256 ()
+
+ +

Constructs an AES 256-bit block cipher with no initial key.

+

This constructor must be followed by a call to setKey() before the block cipher can be used for encryption or decryption.

+ +

Definition at line 40 of file AES256.cpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
size_t AES256::keySize () const
+
+virtual
+
+ +

Size of a 256-bit AES key in bytes.

+
Returns
Always returns 32.
+ +

Implements BlockCipher.

+ +

Definition at line 55 of file AES256.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool AES256::setKey (const uint8_t * key,
size_t len 
)
+
+virtual
+
+ +

Sets the key to use for future encryption and decryption operations.

+
Parameters
+ + + +
keyThe key to use.
lenThe length of the key.
+
+
+
Returns
Returns false if the key length is not supported, or the key is somehow "weak" and unusable by this cipher.
+

Use clear() or the destructor to remove the key and any other sensitive data from the object once encryption or decryption is complete.

+
See Also
keySize(), clear()
+ +

Implements BlockCipher.

+ +

Definition at line 60 of file AES256.cpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/classAES256.png b/classAES256.png new file mode 100644 index 00000000..52d33d16 Binary files /dev/null and b/classAES256.png differ diff --git a/classAESCommon-members.html b/classAESCommon-members.html new file mode 100644 index 00000000..6e5582e3 --- /dev/null +++ b/classAESCommon-members.html @@ -0,0 +1,111 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
AESCommon Member List
+
+
+ +

This is the complete list of members for AESCommon, including all inherited members.

+ + + + + + + + + + + +
AESCommon()AESCommonprotected
BlockCipher()BlockCipher
blockSize() const AESCommonvirtual
clear()AESCommonvirtual
decryptBlock(uint8_t *output, const uint8_t *input)AESCommonvirtual
encryptBlock(uint8_t *output, const uint8_t *input)AESCommonvirtual
keySize() const =0BlockCipherpure virtual
setKey(const uint8_t *key, size_t len)=0BlockCipherpure virtual
~AESCommon()AESCommonvirtual
~BlockCipher()BlockCiphervirtual
+ + + + diff --git a/classAESCommon.html b/classAESCommon.html new file mode 100644 index 00000000..87e9a204 --- /dev/null +++ b/classAESCommon.html @@ -0,0 +1,330 @@ + + + + + + +ArduinoLibs: AESCommon Class Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
AESCommon Class Reference
+
+
+ +

Abstract base class for AES block ciphers. + More...

+ +

#include <AES.h>

+
+Inheritance diagram for AESCommon:
+
+
+ + +BlockCipher +AES128 +AES192 +AES256 + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+virtual ~AESCommon ()
 Destroys this AES block cipher object after clearing sensitive information.
 
size_t blockSize () const
 Size of an AES block in bytes. More...
 
void encryptBlock (uint8_t *output, const uint8_t *input)
 Encrypts a single block using this cipher. More...
 
void decryptBlock (uint8_t *output, const uint8_t *input)
 Decrypts a single block using this cipher. More...
 
void clear ()
 Clears all security-sensitive state from this block cipher. More...
 
- Public Member Functions inherited from BlockCipher
BlockCipher ()
 Constructs a block cipher.
 
virtual ~BlockCipher ()
 Destroys this block cipher object. More...
 
virtual size_t keySize () const =0
 Default size of the key for this block cipher, in bytes. More...
 
virtual bool setKey (const uint8_t *key, size_t len)=0
 Sets the key to use for future encryption and decryption operations. More...
 
+ + + + +

+Protected Member Functions

AESCommon ()
 Constructs an AES block cipher object.
 
+

Detailed Description

+

Abstract base class for AES block ciphers.

+

This class is abstract. The caller should instantiate AES128, AES192, or AES256 to create an AES block cipher with a specific key size.

+
Note
This AES implementation does not have constant cache behaviour due to the use of table lookups. It may not be safe to use this implementation in an environment where the attacker can observe the timing of encryption and decryption operations. Unless AES compatibility is required, it is recommended that the ChaCha stream cipher be used instead.
+

Reference: http://en.wikipedia.org/wiki/Advanced_Encryption_Standard

+
See Also
ChaCha, AES128, AES192, AES256
+ +

Definition at line 28 of file AES.h.

+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
size_t AESCommon::blockSize () const
+
+virtual
+
+ +

Size of an AES block in bytes.

+
Returns
Always returns 16.
+ +

Implements BlockCipher.

+ +

Definition at line 144 of file AESCommon.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void AESCommon::clear ()
+
+virtual
+
+ +

Clears all security-sensitive state from this block cipher.

+

Security-sensitive information includes key schedules and any temporary state that is used by encryptBlock() or decryptBlock() which is stored in the object itself.

+
See Also
setKey(), encryptBlock(), decryptBlock()
+ +

Implements BlockCipher.

+ +

Definition at line 324 of file AESCommon.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void AESCommon::decryptBlock (uint8_t * output,
const uint8_t * input 
)
+
+virtual
+
+ +

Decrypts a single block using this cipher.

+
Parameters
+ + + +
outputThe output buffer to put the plaintext into. Must be at least blockSize() bytes in length.
inputThe input buffer to read the ciphertext from which is allowed to overlap with output. Must be at least blockSize() bytes in length.
+
+
+
See Also
encryptBlock(), blockSize()
+ +

Implements BlockCipher.

+ +

Definition at line 295 of file AESCommon.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void AESCommon::encryptBlock (uint8_t * output,
const uint8_t * input 
)
+
+virtual
+
+ +

Encrypts a single block using this cipher.

+
Parameters
+ + + +
outputThe output buffer to put the ciphertext into. Must be at least blockSize() bytes in length.
inputThe input buffer to read the plaintext from which is allowed to overlap with output. Must be at least blockSize() bytes in length.
+
+
+
See Also
decryptBlock(), blockSize()
+ +

Implements BlockCipher.

+ +

Definition at line 266 of file AESCommon.cpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/classAESCommon.png b/classAESCommon.png new file mode 100644 index 00000000..043e2f5d Binary files /dev/null and b/classAESCommon.png differ diff --git a/classBLAKE2s-members.html b/classBLAKE2s-members.html new file mode 100644 index 00000000..666049b3 --- /dev/null +++ b/classBLAKE2s-members.html @@ -0,0 +1,118 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
BLAKE2s Member List
+
+
+ +

This is the complete list of members for BLAKE2s, including all inherited members.

+ + + + + + + + + + + + + + + + + + +
BLAKE2s()BLAKE2s
blockSize() const BLAKE2svirtual
chunkSize (defined in BLAKE2s)BLAKE2s
clear()BLAKE2svirtual
finalize(void *hash, size_t len)BLAKE2svirtual
finalized (defined in BLAKE2s)BLAKE2s
h (defined in BLAKE2s)BLAKE2s
Hash()Hash
hashSize() const BLAKE2svirtual
length (defined in BLAKE2s)BLAKE2s
m (defined in BLAKE2s)BLAKE2s
reset()BLAKE2svirtual
reset(uint8_t outputLength)BLAKE2s
update(const void *data, size_t len)BLAKE2svirtual
v (defined in BLAKE2s)BLAKE2s
~BLAKE2s()BLAKE2svirtual
~Hash()Hashvirtual
+ + + + diff --git a/classBLAKE2s.html b/classBLAKE2s.html new file mode 100644 index 00000000..a7c778be --- /dev/null +++ b/classBLAKE2s.html @@ -0,0 +1,413 @@ + + + + + + +ArduinoLibs: BLAKE2s Class Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
BLAKE2s Class Reference
+
+
+ +

BLAKE2s hash algorithm. + More...

+ +

#include <BLAKE2s.h>

+
+Inheritance diagram for BLAKE2s:
+
+
+ + +Hash + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

BLAKE2s ()
 Constructs a BLAKE2s hash object.
 
+virtual ~BLAKE2s ()
 Destroys this BLAKE2s hash object after clearing sensitive information.
 
size_t hashSize () const
 Size of the hash result from finalize(). More...
 
size_t blockSize () const
 Size of the internal block used by the hash algorithm. More...
 
void reset ()
 Resets the hash ready for a new hashing process. More...
 
void reset (uint8_t outputLength)
 Resets the hash ready for a new hashing process with a specified output length. More...
 
void update (const void *data, size_t len)
 Updates the hash with more data. More...
 
void finalize (void *hash, size_t len)
 Finalizes the hashing process and returns the hash. More...
 
void clear ()
 Clears the hash state, removing all sensitive data, and then resets the hash ready for a new hashing process. More...
 
- Public Member Functions inherited from Hash
Hash ()
 Constructs a new hash object.
 
virtual ~Hash ()
 Destroys this hash object. More...
 
+

Detailed Description

+

BLAKE2s hash algorithm.

+

BLAKE2s is a variation on the ChaCha stream cipher, designed for hashing, with a 256-bit hash output. It is intended as a high performance replacement for SHA256 for when speed is critical but exact SHA256 compatibility is not.

+

Reference: https://blake2.net/

+
See Also
SHA256
+ +

Definition at line 28 of file BLAKE2s.h.

+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
size_t BLAKE2s::blockSize () const
+
+virtual
+
+ +

Size of the internal block used by the hash algorithm.

+
See Also
update(), hashSize()
+ +

Implements Hash.

+ +

Definition at line 66 of file BLAKE2s.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void BLAKE2s::clear ()
+
+virtual
+
+ +

Clears the hash state, removing all sensitive data, and then resets the hash ready for a new hashing process.

+
See Also
reset()
+ +

Implements Hash.

+ +

Definition at line 164 of file BLAKE2s.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void BLAKE2s::finalize (void * hash,
size_t len 
)
+
+virtual
+
+ +

Finalizes the hashing process and returns the hash.

+
Parameters
+ + + +
hashThe buffer to return the hash value in.
lenThe length of the hash buffer, normally hashSize().
+
+
+

If len is less than hashSize(), then the hash value will be truncated to the first len bytes. If len is greater than hashSize(), then the remaining bytes will left unchanged.

+

If finalize() is called again, the same hash value is returned again until the next call to reset() or update().

+
See Also
reset(), update()
+ +

Implements Hash.

+ +

Definition at line 144 of file BLAKE2s.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
size_t BLAKE2s::hashSize () const
+
+virtual
+
+ +

Size of the hash result from finalize().

+
See Also
finalize(), blockSize()
+ +

Implements Hash.

+ +

Definition at line 61 of file BLAKE2s.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void BLAKE2s::reset ()
+
+virtual
+
+ +

Resets the hash ready for a new hashing process.

+
See Also
update(), finalize()
+ +

Implements Hash.

+ +

Definition at line 81 of file BLAKE2s.cpp.

+ +
+
+ +
+
+ + + + + + + + +
void BLAKE2s::reset (uint8_t outputLength)
+
+ +

Resets the hash ready for a new hashing process with a specified output length.

+
Parameters
+ + +
outputLengthThe output length to use for the final hash in bytes, between 1 and 32.
+
+
+ +

Definition at line 103 of file BLAKE2s.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void BLAKE2s::update (const void * data,
size_t len 
)
+
+virtual
+
+ +

Updates the hash with more data.

+
Parameters
+ + + +
dataData to be hashed.
lenNumber of bytes of data to be hashed.
+
+
+

If finalize() has already been called, then calling update() will reset() the hash and start a new hashing process.

+
See Also
reset(), finalize()
+ +

Implements Hash.

+ +

Definition at line 118 of file BLAKE2s.cpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/classBLAKE2s.png b/classBLAKE2s.png new file mode 100644 index 00000000..e9b75459 Binary files /dev/null and b/classBLAKE2s.png differ diff --git a/classBitmap-members.html b/classBitmap-members.html index a8a4f635..2608b48c 100644 --- a/classBitmap-members.html +++ b/classBitmap-members.html @@ -3,6 +3,7 @@ + ArduinoLibs: Member List @@ -29,7 +30,7 @@
- + @@ -137,9 +138,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classBitmap.html b/classBitmap.html index 21702264..db84d303 100644 --- a/classBitmap.html +++ b/classBitmap.html @@ -3,6 +3,7 @@ + ArduinoLibs: Bitmap Class Reference @@ -29,7 +30,7 @@ - + @@ -103,126 +104,171 @@ Inheritance diagram for Bitmap:
-DMD +DMD
- - + + + +

+

Public Types

typedef uint8_t Color
 Type that represents the color of a pixel in a bitmap.
 Type that represents the color of a pixel in a bitmap. More...
 
typedef PGM_VOID_P ProgMem
 Type that represents a bitmap within program memory.
 
typedef PGM_VOID_P Font
 Type that represents a font within program memory.
 
- - + + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + +

+

Public Member Functions

 Bitmap (int width, int height)
 Constructs a new in-memory bitmap that is width x height pixels in size.
 Constructs a new in-memory bitmap that is width x height pixels in size. More...
 
 ~Bitmap ()
 Destroys this bitmap.
 
bool isValid () const
 Returns true if the memory for this bitmap is valid; false otherwise.
 Returns true if the memory for this bitmap is valid; false otherwise. More...
 
int width () const
 Returns the width of the bitmap in pixels.
 Returns the width of the bitmap in pixels. More...
 
int height () const
 Returns the height of the bitmap in pixels.
 Returns the height of the bitmap in pixels. More...
 
int stride () const
 Returns the number of bytes in each line of the bitmap's data() buffer.
 Returns the number of bytes in each line of the bitmap's data() buffer. More...
 
int bitsPerPixel () const
 Returns the number of bits per pixel for the bitmap; always 1.
 Returns the number of bits per pixel for the bitmap; always 1. More...
 
uint8_t * data ()
 Returns a pointer to the start of the bitmap's data buffer.
 Returns a pointer to the start of the bitmap's data buffer. More...
 
const uint8_t * data () const
 Returns a constant pointer to the start of the bitmap's data buffer.This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 Returns a constant pointer to the start of the bitmap's data buffer. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void clear (Color color=Black)
 Clears the entire bitmap to the specified color.
 Clears the entire bitmap to the specified color. More...
 
Color pixel (int x, int y) const
 Returns the color of the pixel at (x, y); either Black or White.
 Returns the color of the pixel at (x, y); either Black or White. More...
 
void setPixel (int x, int y, Color color)
 Sets the pixel at (x, y) to color.
 Sets the pixel at (x, y) to color. More...
 
void drawLine (int x1, int y1, int x2, int y2, Color color=White)
 Draws a line from (x1, y1) to (x2, y2) in color.
 Draws a line from (x1, y1) to (x2, y2) in color. More...
 
void drawRect (int x1, int y1, int x2, int y2, Color borderColor=White, Color fillColor=NoFill)
 Draws a rectangle from (x1, y1) to (x2, y2), with the outline in borderColor and the interior filled with fillColor.
 Draws a rectangle from (x1, y1) to (x2, y2), with the outline in borderColor and the interior filled with fillColor. More...
 
void drawFilledRect (int x1, int y1, int x2, int y2, Color color=White)
 Draws a filled rectangle from (x1, y1) to (x2, y2) in color.
 Draws a filled rectangle from (x1, y1) to (x2, y2) in color. More...
 
void drawCircle (int centerX, int centerY, int radius, Color borderColor=White, Color fillColor=NoFill)
 Draws a circle with a specific center (centerX, centerY) and radius, with the outline in borderColor and the interior filled with fillColor.
 Draws a circle with a specific center (centerX, centerY) and radius, with the outline in borderColor and the interior filled with fillColor. More...
 
void drawFilledCircle (int centerX, int centerY, int radius, Color color=White)
 Draws a filled circle with a specific center (centerX, centerY) and radius in color.
 Draws a filled circle with a specific center (centerX, centerY) and radius in color. More...
 
void drawBitmap (int x, int y, const Bitmap &bitmap, Color color=White)
 Draws bitmap at (x, y) in color.
 Draws bitmap at (x, y) in color. More...
 
void drawBitmap (int x, int y, Bitmap::ProgMem bitmap, Color color=White)
 Draws bitmap at (x, y) in color.
 Draws bitmap at (x, y) in color. More...
 
void drawInvertedBitmap (int x, int y, const Bitmap &bitmap)
 Draws bitmap at (x, y) in inverted colors.
 Draws bitmap at (x, y) in inverted colors. More...
 
void drawInvertedBitmap (int x, int y, Bitmap::ProgMem bitmap)
 Draws bitmap at (x, y) in inverted colors.
 Draws bitmap at (x, y) in inverted colors. More...
 
Font font () const
 Returns the currently selected font, or null if none selected.
 Returns the currently selected font, or null if none selected. More...
 
void setFont (Font font)
 Sets the font for use with drawText() and drawChar().
 Sets the font for use with drawText() and drawChar(). More...
 
Color textColor () const
 Returns the color that will be used for drawing text with drawText() and drawChar(). The default is White.
 Returns the color that will be used for drawing text with drawText() and drawChar(). The default is White. More...
 
void setTextColor (Color color)
 Sets the color that will be used for drawing text with drawText() and drawChar().
 Sets the color that will be used for drawing text with drawText() and drawChar(). More...
 
void drawText (int x, int y, const char *str, int len=-1)
 Draws the len characters of str at (x, y).
 Draws the len characters of str at (x, y). More...
 
void drawText (int x, int y, const String &str, int start=0, int len=-1)
 Draws len characters starting at start from str to the screen at (x, y).
 Draws len characters starting at start from str to the screen at (x, y). More...
 
int drawChar (int x, int y, char ch)
 Draws a single character ch at (x, y).
 Draws a single character ch at (x, y). More...
 
int charWidth (char ch) const
 Returns the width in pixels of ch in the current font().
 Returns the width in pixels of ch in the current font(). More...
 
int textWidth (const char *str, int len=-1) const
 Returns the width in pixels of the len characters of str in the current font(), including inter-character spacing.
 Returns the width in pixels of the len characters of str in the current font(), including inter-character spacing. More...
 
int textWidth (const String &str, int start=0, int len=-1) const
 Returns the width in pixels of the len characters of str in the current font(), starting at start, including inter-character spacing.
 Returns the width in pixels of the len characters of str in the current font(), starting at start, including inter-character spacing. More...
 
int textHeight () const
 Returns the height in pixels of the current text drawing font(); or zero if font() is not set.
 Returns the height in pixels of the current text drawing font(); or zero if font() is not set. More...
 
void copy (int x, int y, int width, int height, Bitmap *dest, int destX, int destY)
 Copies the width x height pixels starting at top-left corner (x, y) to (destX, destY) in the bitmap dest.
 Copies the width x height pixels starting at top-left corner (x, y) to (destX, destY) in the bitmap dest. More...
 
void fill (int x, int y, int width, int height, Color color)
 Fills the width x height pixels starting at top-left corner (x, y) with color.
 Fills the width x height pixels starting at top-left corner (x, y) with color. More...
 
void fill (int x, int y, int width, int height, Bitmap::ProgMem pattern, Color color=White)
 Fills the width x height pixels starting at top-left corner (x, y) with the contents of pattern.
 Fills the width x height pixels starting at top-left corner (x, y) with the contents of pattern. More...
 
void scroll (int dx, int dy, Color fillColor=Black)
 Scrolls the entire contents of the bitmap by dx and dy.
 Scrolls the entire contents of the bitmap by dx and dy. More...
 
void scroll (int x, int y, int width, int height, int dx, int dy, Color fillColor=Black)
 Scrolls the width x height pixels starting at top-left corner (x, y) by dx and dy.
 Scrolls the width x height pixels starting at top-left corner (x, y) by dx and dy. More...
 
void invert (int x, int y, int width, int height)
 Inverts the width x height pixels starting at top-left corner (x, y).
 Inverts the width x height pixels starting at top-left corner (x, y). More...
 
- + - + + +

+

Static Public Attributes

static const Color Black = 0
 Color value corresponding to "black".
 
static const Color White = 1
 Color value corresponding to "white". If the bitmap is displayed on a LED array, then it may have a different physical color.
 Color value corresponding to "white". If the bitmap is displayed on a LED array, then it may have a different physical color. More...
 
static const Color NoFill = 2
 Special color value that is used with drawRect() and drawCircle() to indicate that the interior of the shape should not be filled. For all other uses, NoFill is equivalent to White.
 
- +

+

Friends

class DMD
 
-

Detailed Description

+

Detailed Description

Represents a monochrome bitmap within main memory.

-

Bitmaps are a rectangular arrangement of width() x height() pixels, with each pixel set to either Black or White. The co-ordinate system has origin (0, 0) at the top-left of the bitmap.

-

Functions within this class can be used to draw various shapes into the bitmap's data() buffer; e.g. drawLine(), drawRect(), drawBitmap(), drawText(), clear(), fill(), etc.

-
See Also
DMD
+

Bitmaps are a rectangular arrangement of width() x height() pixels, with each pixel set to either Black or White. The co-ordinate system has origin (0, 0) at the top-left of the bitmap.

+

Functions within this class can be used to draw various shapes into the bitmap's data() buffer; e.g. drawLine(), drawRect(), drawBitmap(), drawText(), clear(), fill(), etc.

+
See Also
DMD

Definition at line 32 of file Bitmap.h.

-

Member Typedef Documentation

+

Member Typedef Documentation

@@ -234,13 +280,13 @@ class DMD

Type that represents the color of a pixel in a bitmap.

-
See Also
Black, White
+
See Also
Black, White

Definition at line 40 of file Bitmap.h.

-

Constructor & Destructor Documentation

+

Constructor & Destructor Documentation

@@ -266,13 +312,13 @@ class DMD

Constructs a new in-memory bitmap that is width x height pixels in size.

-
See Also
width(), height(), isValid()
+
See Also
width(), height(), isValid()

Definition at line 88 of file Bitmap.cpp.

-

Member Function Documentation

+

Member Function Documentation

@@ -295,7 +341,7 @@ class DMD

Returns the number of bits per pixel for the bitmap; always 1.

-
See Also
width(), height()
+
See Also
width(), height()

Definition at line 51 of file Bitmap.h.

@@ -315,9 +361,9 @@ class DMD
-

Returns the width in pixels of ch in the current font().

-

Returns zero if font() is not set, or ch is not present in font().

-
See Also
drawChar(), font(), textWidth(), textHeight()
+

Returns the width in pixels of ch in the current font().

+

Returns zero if font() is not set, or ch is not present in font().

+
See Also
drawChar(), font(), textWidth(), textHeight()

Definition at line 650 of file Bitmap.cpp.

@@ -338,7 +384,7 @@ class DMD

Clears the entire bitmap to the specified color.

-
See Also
fill()
+
See Also
fill()

Definition at line 174 of file Bitmap.cpp.

@@ -400,8 +446,8 @@ class DMD

Copies the width x height pixels starting at top-left corner (x, y) to (destX, destY) in the bitmap dest.

The dest bitmap can be the same as this object, in which case the copy will be performed in a manner that correctly handles overlapping regions.

-

If some part of the source region is outside the bounds of this object, then the value Black will be copied to dest for those pixels. This can be used to produce a behaviour similar to scroll() when bitmap is the same as this object.

-
See Also
drawBitmap(), fill(), scroll()
+

If some part of the source region is outside the bounds of this object, then the value Black will be copied to dest for those pixels. This can be used to produce a behaviour similar to scroll() when bitmap is the same as this object.

+
See Also
drawBitmap(), fill(), scroll()

Definition at line 738 of file Bitmap.cpp.

@@ -429,9 +475,9 @@ class DMD

Returns a pointer to the start of the bitmap's data buffer.

-

The data is organized as height() lines of stride() bytes, laid out horizontally across the extent of width() pixels. The most significant bit in each byte has the lowest x value.

-

Note: bits within the data are 1 for Black and 0 for White, which is the reverse of the constant values. This differs from pixel() which returns the correct constant.

-
See Also
pixel(), stride()
+

The data is organized as height() lines of stride() bytes, laid out horizontally across the extent of width() pixels. The most significant bit in each byte has the lowest x value.

+

Note: bits within the data are 1 for Black and 0 for White, which is the reverse of the constant values. This differs from pixel() which returns the correct constant.

+
See Also
pixel(), stride()

Definition at line 53 of file Bitmap.h.

@@ -476,7 +522,7 @@ class DMD

Draws bitmap at (x, y) in color.

Bits that are set to White in the bitmap are drawn with color. Bits that are set to Black in the bitmap are drawn with the inverse of color. The pixel at (x, y) will be the top-left corner of the drawn image.

Note: bitmap must not be the same as this object or the behaviour will be undefined. To copy a region of a bitmap to elsewhere within the same bitmap, use copy() instead.

-
See Also
drawInvertedBitmap(), copy()
+
See Also
drawInvertedBitmap(), copy()

Definition at line 388 of file Bitmap.cpp.

@@ -521,7 +567,7 @@ class DMD

Draws bitmap at (x, y) in color.

The bitmap must point to program memory. The first two bytes are the width and height of the bitmap in pixels. The rest of the data contains the pixels for the bitmap, with lines byte-aligned.

Bits that are 1 in the bitmap are drawn with color. Bits that are 0 in the bitmap are drawn with the inverse of color. The pixel at (x, y) will be the top-left corner of the drawn image.

-
See Also
drawInvertedBitmap(), fill()
+
See Also
drawInvertedBitmap(), fill()

Definition at line 425 of file Bitmap.cpp.

@@ -558,9 +604,9 @@ class DMD

Draws a single character ch at (x, y).

-

Returns the width of the character in pixels so that higher-order functions like drawText() can advance x to the location of the next character to be drawn. The width does not include inter-character spacing.

+

Returns the width of the character in pixels so that higher-order functions like drawText() can advance x to the location of the next character to be drawn. The width does not include inter-character spacing.

The position (x, y) will be the upper-left pixel of the drawn character.

-
See Also
drawText(), textColor(), font(), charWidth()
+
See Also
drawText(), textColor(), font(), charWidth()

Definition at line 585 of file Bitmap.cpp.

@@ -610,7 +656,7 @@ class DMD

Draws a circle with a specific center (centerX, centerY) and radius, with the outline in borderColor and the interior filled with fillColor.

If fillColor is NoFill, then the interior is not filled.

-
See Also
drawFilledCircle(), drawLine(), drawRect()
+
See Also
drawFilledCircle(), drawLine(), drawRect()

Definition at line 334 of file Bitmap.cpp.

@@ -662,7 +708,7 @@ class DMD

Draws a filled circle with a specific center (centerX, centerY) and radius in color.

This is a convenience function that is equivalent to drawCircle(centerX, centerY, radius, color, color).

-
See Also
drawCircle(), drawFilledRect()
+
See Also
drawCircle(), drawFilledRect()

Definition at line 120 of file Bitmap.h.

@@ -720,7 +766,7 @@ class DMD

Draws a filled rectangle from (x1, y1) to (x2, y2) in color.

This is a convenience function that is equivalent to drawRect(x1, y1, x2, y2, color, color).

-
See Also
drawRect(), drawFilledCircle()
+
See Also
drawRect(), drawFilledCircle()

Definition at line 115 of file Bitmap.h.

@@ -766,7 +812,7 @@ class DMD

Draws bitmap at (x, y) in inverted colors.

This is a convenience function that is equivalent to drawBitmap(x, y, bitmap, Black).

-
See Also
drawBitmap()
+
See Also
drawBitmap()

Definition at line 125 of file Bitmap.h.

@@ -812,7 +858,7 @@ class DMD

Draws bitmap at (x, y) in inverted colors.

This is a convenience function that is equivalent to drawBitmap(x, y, bitmap, Black).

-
See Also
drawBitmap()
+
See Also
drawBitmap()

Definition at line 130 of file Bitmap.h.

@@ -917,7 +963,7 @@ class DMD

Draws a rectangle from (x1, y1) to (x2, y2), with the outline in borderColor and the interior filled with fillColor.

If fillColor is NoFill, then the interior is not filled.

-
See Also
drawFilledRect(), drawLine(), drawCircle(), fill()
+
See Also
drawFilledRect(), drawLine(), drawCircle(), fill()

Definition at line 286 of file Bitmap.cpp.

@@ -962,7 +1008,7 @@ class DMD

Draws the len characters of str at (x, y).

If len is less than zero, then the actual length of str will be used.

The position (x, y) will be the upper-left pixel of the first character that is drawn.

-
See Also
drawChar(), textColor(), font()
+
See Also
drawChar(), textColor(), font()

Definition at line 526 of file Bitmap.cpp.

@@ -1013,7 +1059,7 @@ class DMD

Draws len characters starting at start from str to the screen at (x, y).

If len is less than zero, then the actual length of str will be used.

The position (x, y) will be the upper-left pixel of the first character that is drawn.

-
See Also
drawChar(), textColor(), font()
+
See Also
drawChar(), textColor(), font()

Definition at line 555 of file Bitmap.cpp.

@@ -1062,7 +1108,7 @@ class DMD

Fills the width x height pixels starting at top-left corner (x, y) with color.

-
See Also
copy(), clear(), invert(), drawRect()
+
See Also
copy(), clear(), invert(), drawRect()

Definition at line 762 of file Bitmap.cpp.

@@ -1119,7 +1165,7 @@ class DMD

Fills the width x height pixels starting at top-left corner (x, y) with the contents of pattern.

The pattern must point to program memory. The first two bytes are the width and height of the pattern in pixels. The rest of the data contains the pixels for the pattern, with lines byte-aligned.

Bits that are 1 in the pattern are drawn with color. Bits that are 0 in the pattern are drawn with the inverse of color.

-
See Also
drawBitmap(), clear(), invert()
+
See Also
drawBitmap(), clear(), invert()

Definition at line 785 of file Bitmap.cpp.

@@ -1147,7 +1193,7 @@ class DMD

Returns the currently selected font, or null if none selected.

-
See Also
setFont(), drawText(), drawChar(), charWidth()
+
See Also
setFont(), drawText(), drawChar(), charWidth()

Definition at line 72 of file Bitmap.h.

@@ -1175,7 +1221,7 @@ class DMD

Returns the height of the bitmap in pixels.

-
See Also
width(), bitsPerPixel()
+
See Also
width(), bitsPerPixel()

Definition at line 49 of file Bitmap.h.

@@ -1218,7 +1264,7 @@ class DMD

Inverts the width x height pixels starting at top-left corner (x, y).

-
See Also
fill()
+
See Also
fill()

Definition at line 902 of file Bitmap.cpp.

@@ -1278,7 +1324,7 @@ class DMD

Returns the color of the pixel at (x, y); either Black or White.

Returns Black if x or y is out of range.

-
See Also
setPixel(), data()
+
See Also
setPixel(), data()

Definition at line 191 of file Bitmap.cpp.

@@ -1324,7 +1370,7 @@ class DMD

Scrolls the entire contents of the bitmap by dx and dy.

If dx is 2 and dy is -1, then the region will be scrolled two pixels to the right and one pixel up. Pixels that are uncovered by the scroll are filled with fillColor.

-
See Also
copy(), fill()
+
See Also
copy(), fill()

Definition at line 135 of file Bitmap.h.

@@ -1386,7 +1432,7 @@ class DMD

Scrolls the width x height pixels starting at top-left corner (x, y) by dx and dy.

If dx is 2 and dy is -1, then the region will be scrolled two pixels to the right and one pixel up. Pixels that are uncovered by the scroll are filled with fillColor.

-
See Also
copy(), fill()
+
See Also
copy(), fill()

Definition at line 841 of file Bitmap.cpp.

@@ -1414,13 +1460,13 @@ class DMD
-

Sets the font for use with drawText() and drawChar().

+

Sets the font for use with drawText() and drawChar().

#include <DejaVuSans9.h>
-
display.setFont(DejaVuSans9);
-
display.drawText(0, 0, "Hello");
+
display.setFont(DejaVuSans9);
+
display.drawText(0, 0, "Hello");

New fonts can be generated with GLCDFontCreator2.

-
See Also
font(), drawText(), drawChar()
+
See Also
font(), drawText(), drawChar()

Definition at line 73 of file Bitmap.h.

@@ -1457,7 +1503,7 @@ class DMD

Sets the pixel at (x, y) to color.

-
See Also
pixel()
+
See Also
pixel()

Definition at line 208 of file Bitmap.cpp.

@@ -1485,8 +1531,8 @@ class DMD
-

Sets the color that will be used for drawing text with drawText() and drawChar().

-
See Also
textColor(), drawText(), drawChar()
+

Sets the color that will be used for drawing text with drawText() and drawChar().

+
See Also
textColor(), drawText(), drawChar()

Definition at line 76 of file Bitmap.h.

@@ -1513,8 +1559,8 @@ class DMD
-

Returns the number of bytes in each line of the bitmap's data() buffer.

-
See Also
width(), bitsPerPixel(), data()
+

Returns the number of bytes in each line of the bitmap's data() buffer.

+
See Also
width(), bitsPerPixel(), data()

Definition at line 50 of file Bitmap.h.

@@ -1541,8 +1587,8 @@ class DMD
-

Returns the color that will be used for drawing text with drawText() and drawChar(). The default is White.

-
See Also
setTextColor(), drawText(), drawChar()
+

Returns the color that will be used for drawing text with drawText() and drawChar(). The default is White.

+
See Also
setTextColor(), drawText(), drawChar()

Definition at line 75 of file Bitmap.h.

@@ -1561,8 +1607,8 @@ class DMD
-

Returns the height in pixels of the current text drawing font(); or zero if font() is not set.

-
See Also
font(), charWidth(), textWidth()
+

Returns the height in pixels of the current text drawing font(); or zero if font() is not set.

+
See Also
font(), charWidth(), textWidth()

Definition at line 716 of file Bitmap.cpp.

@@ -1592,9 +1638,9 @@ class DMD
-

Returns the width in pixels of the len characters of str in the current font(), including inter-character spacing.

+

Returns the width in pixels of the len characters of str in the current font(), including inter-character spacing.

If len is less than zero, then the actual length of str will be used.

-
See Also
drawText(), charWidth(), textHeight()
+
See Also
drawText(), charWidth(), textHeight()

Definition at line 675 of file Bitmap.cpp.

@@ -1630,9 +1676,9 @@ class DMD
-

Returns the width in pixels of the len characters of str in the current font(), starting at start, including inter-character spacing.

+

Returns the width in pixels of the len characters of str in the current font(), starting at start, including inter-character spacing.

If len is less than zero, then the actual length of str will be used.

-
See Also
drawText(), charWidth(), textHeight()
+
See Also
drawText(), charWidth(), textHeight()

Definition at line 697 of file Bitmap.cpp.

@@ -1660,13 +1706,13 @@ class DMD

Returns the width of the bitmap in pixels.

-
See Also
height(), stride(), bitsPerPixel()
+
See Also
height(), stride(), bitsPerPixel()

Definition at line 48 of file Bitmap.h.

-

Member Data Documentation

+

Member Data Documentation

@@ -1686,7 +1732,7 @@ class DMD

Color value corresponding to "white". If the bitmap is displayed on a LED array, then it may have a different physical color.

-

Note: while the value of this constant is 1, the bitmap itself stores white pixels as 0 and black as 1 because the DMD display uses 1 to indicate a pixel being off.

+

Note: while the value of this constant is 1, the bitmap itself stores white pixels as 0 and black as 1 because the DMD display uses 1 to indicate a pixel being off.

Definition at line 45 of file Bitmap.h.

@@ -1699,9 +1745,9 @@ class DMD
diff --git a/classBlinkLED-members.html b/classBlinkLED-members.html index 754f3e2d..c32b5daa 100644 --- a/classBlinkLED-members.html +++ b/classBlinkLED-members.html @@ -3,6 +3,7 @@ + ArduinoLibs: Member List @@ -29,7 +30,7 @@
- + @@ -102,9 +103,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classBlinkLED.html b/classBlinkLED.html index 9a7ebf94..59019a21 100644 --- a/classBlinkLED.html +++ b/classBlinkLED.html @@ -3,6 +3,7 @@ + ArduinoLibs: BlinkLED Class Reference @@ -29,7 +30,7 @@ - + @@ -95,44 +96,54 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

#include <BlinkLED.h>

- - + + + - + + - + + - + + - + + - + + - + + - + + - + +

+

Public Member Functions

 BlinkLED (uint8_t pin, unsigned long onTime, unsigned long offTime, bool initialState=false)
 Initialize a blinking LED on the specified pin.
 Initialize a blinking LED on the specified pin. More...
 
void loop ()
 
unsigned long onTime () const
 Returns the number of milliseconds the LED will be on.
 Returns the number of milliseconds the LED will be on. More...
 
unsigned long offTime () const
 Returns the number of milliseconds the LED will be off.
 Returns the number of milliseconds the LED will be off. More...
 
void setBlinkRate (unsigned long onTime, unsigned long offTime)
 Sets the onTime and offTime (in milliseconds).
 Sets the onTime and offTime (in milliseconds). More...
 
bool state () const
 Returns the current state of the LED; true is on, false is off.
 Returns the current state of the LED; true is on, false is off. More...
 
void setState (bool state)
 Sets the current state of the LED, where true is on, false is off.
 Sets the current state of the LED, where true is on, false is off. More...
 
void pause ()
 Pauses the LED blink cycle in its current state().
 Pauses the LED blink cycle in its current state(). More...
 
void resume ()
 Resumes the LED blink cycle after a pause().
 Resumes the LED blink cycle after a pause(). More...
 
bool isPaused () const
 Returns true if the LED blink cycle is paused; false otherwise.
 Returns true if the LED blink cycle is paused; false otherwise. More...
 
-

Detailed Description

+

Detailed Description

Blink a LED on a digital output pin.

-

BlinkLED simplies the process of blinking a LED by encapsulating the control logic into a single class. The following example strobes the status LED on D13 with a period of 70 milliseconds on, 930 milliseconds off (the LED is initially off):

+

BlinkLED simplies the process of blinking a LED by encapsulating the control logic into a single class. The following example strobes the status LED on D13 with a period of 70 milliseconds on, 930 milliseconds off (the LED is initially off):

#include <BlinkLED.h>
-
BlinkLED statusBlink(13, 70, 930);
+
BlinkLED statusBlink(13, 70, 930);
void setup() {}
void loop() {
statusBlink.loop();
}
-

The current state() of the LED can be changed immediately by calling setState(). The blink rate can be modified with setBlinkRate(). And the blink cycle can be suspended and restarted with pause() and resume().

+

The current state() of the LED can be changed immediately by calling setState(). The blink rate can be modified with setBlinkRate(). And the blink cycle can be suspended and restarted with pause() and resume().

Definition at line 28 of file BlinkLED.h.

-

Constructor & Destructor Documentation

+

Constructor & Destructor Documentation

@@ -176,7 +187,7 @@ Public Member Functions
-

Member Function Documentation

+

Member Function Documentation

@@ -199,7 +210,7 @@ Public Member Functions

Returns true if the LED blink cycle is paused; false otherwise.

-
See Also
pause(), resume()
+
See Also
pause(), resume()

Definition at line 44 of file BlinkLED.h.

@@ -245,7 +256,7 @@ Public Member Functions

Returns the number of milliseconds the LED will be off.

-
See Also
onTime(), setBlinkRate()
+
See Also
onTime(), setBlinkRate()

Definition at line 36 of file BlinkLED.h.

@@ -273,7 +284,7 @@ Public Member Functions

Returns the number of milliseconds the LED will be on.

-
See Also
offTime(), setBlinkRate()
+
See Also
offTime(), setBlinkRate()

Definition at line 35 of file BlinkLED.h.

@@ -300,8 +311,8 @@ Public Member Functions
-

Pauses the LED blink cycle in its current state().

-
See Also
resume(), isPaused()
+

Pauses the LED blink cycle in its current state().

+
See Also
resume(), isPaused()

Definition at line 42 of file BlinkLED.h.

@@ -320,9 +331,9 @@ Public Member Functions
-

Resumes the LED blink cycle after a pause().

-

The LED will complete its current onTime() or offTime() and then will switch to the opposite state(). If onTime() or offTime() has already expired, then the LED will immediately switch state.

-
See Also
pause(), isPaused()
+

Resumes the LED blink cycle after a pause().

+

The LED will complete its current onTime() or offTime() and then will switch to the opposite state(). If onTime() or offTime() has already expired, then the LED will immediately switch state.

+
See Also
pause(), isPaused()

Definition at line 170 of file BlinkLED.cpp.

@@ -353,8 +364,8 @@ Public Member Functions

Sets the onTime and offTime (in milliseconds).

-

The change takes effect immediately. If the current onTime() or offTime() has now expired, then the LED will immediately switch to the opposite state().

-
See Also
onTime(), offTime()
+

The change takes effect immediately. If the current onTime() or offTime() has now expired, then the LED will immediately switch to the opposite state().

+
See Also
onTime(), offTime()

Definition at line 122 of file BlinkLED.cpp.

@@ -375,8 +386,8 @@ Public Member Functions

Sets the current state of the LED, where true is on, false is off.

-

If the LED is already set to state, then it will complete its current cycle of onTime() or offTime(). Otherwise the LED is immediately set to state and a new cycle begins.

-
See Also
state()
+

If the LED is already set to state, then it will complete its current cycle of onTime() or offTime(). Otherwise the LED is immediately set to state and a new cycle begins.

+
See Also
state()

Definition at line 145 of file BlinkLED.cpp.

@@ -404,7 +415,7 @@ Public Member Functions

Returns the current state of the LED; true is on, false is off.

-
See Also
setState()
+
See Also
setState()

Definition at line 39 of file BlinkLED.h.

@@ -417,9 +428,9 @@ Public Member Functions
diff --git a/classBlockCipher-members.html b/classBlockCipher-members.html new file mode 100644 index 00000000..fa8c8525 --- /dev/null +++ b/classBlockCipher-members.html @@ -0,0 +1,109 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
BlockCipher Member List
+
+
+ +

This is the complete list of members for BlockCipher, including all inherited members.

+ + + + + + + + + +
BlockCipher()BlockCipher
blockSize() const =0BlockCipherpure virtual
clear()=0BlockCipherpure virtual
decryptBlock(uint8_t *output, const uint8_t *input)=0BlockCipherpure virtual
encryptBlock(uint8_t *output, const uint8_t *input)=0BlockCipherpure virtual
keySize() const =0BlockCipherpure virtual
setKey(const uint8_t *key, size_t len)=0BlockCipherpure virtual
~BlockCipher()BlockCiphervirtual
+ + + + diff --git a/classBlockCipher.html b/classBlockCipher.html new file mode 100644 index 00000000..9b8c4587 --- /dev/null +++ b/classBlockCipher.html @@ -0,0 +1,415 @@ + + + + + + +ArduinoLibs: BlockCipher Class Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
BlockCipher Class Referenceabstract
+
+
+ +

Abstract base class for block ciphers. + More...

+ +

#include <BlockCipher.h>

+
+Inheritance diagram for BlockCipher:
+
+
+ + +AESCommon +AES128 +AES192 +AES256 + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

BlockCipher ()
 Constructs a block cipher.
 
virtual ~BlockCipher ()
 Destroys this block cipher object. More...
 
virtual size_t blockSize () const =0
 Size of a single block processed by this cipher, in bytes. More...
 
virtual size_t keySize () const =0
 Default size of the key for this block cipher, in bytes. More...
 
virtual bool setKey (const uint8_t *key, size_t len)=0
 Sets the key to use for future encryption and decryption operations. More...
 
virtual void encryptBlock (uint8_t *output, const uint8_t *input)=0
 Encrypts a single block using this cipher. More...
 
virtual void decryptBlock (uint8_t *output, const uint8_t *input)=0
 Decrypts a single block using this cipher. More...
 
virtual void clear ()=0
 Clears all security-sensitive state from this block cipher. More...
 
+

Detailed Description

+

Abstract base class for block ciphers.

+

Block ciphers always operate in electronic codebook (ECB) mode. Higher-level classes such as CFB128 and CTR128 wrap the block cipher to create more useful classes for encryption and decryption of bulk data.

+

References: http://en.wikipedia.org/wiki/Block_cipher, http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Electronic_codebook_.28ECB.29

+ +

Definition at line 29 of file BlockCipher.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + +
BlockCipher::~BlockCipher ()
+
+virtual
+
+ +

Destroys this block cipher object.

+

Subclasses are responsible for clearing temporary key schedules and other buffers so as to avoid leaking sensitive information.

+
See Also
clear()
+ +

Definition at line 52 of file BlockCipher.cpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
size_t BlockCipher::blockSize () const
+
+pure virtual
+
+ +

Size of a single block processed by this cipher, in bytes.

+
Returns
Returns the size of a block in bytes.
+
See Also
keySize(), encryptBlock()
+ +

Implemented in AESCommon.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void BlockCipher::clear ()
+
+pure virtual
+
+ +

Clears all security-sensitive state from this block cipher.

+

Security-sensitive information includes key schedules and any temporary state that is used by encryptBlock() or decryptBlock() which is stored in the object itself.

+
See Also
setKey(), encryptBlock(), decryptBlock()
+ +

Implemented in AESCommon.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void BlockCipher::decryptBlock (uint8_t * output,
const uint8_t * input 
)
+
+pure virtual
+
+ +

Decrypts a single block using this cipher.

+
Parameters
+ + + +
outputThe output buffer to put the plaintext into. Must be at least blockSize() bytes in length.
inputThe input buffer to read the ciphertext from which is allowed to overlap with output. Must be at least blockSize() bytes in length.
+
+
+
See Also
encryptBlock(), blockSize()
+ +

Implemented in AESCommon.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void BlockCipher::encryptBlock (uint8_t * output,
const uint8_t * input 
)
+
+pure virtual
+
+ +

Encrypts a single block using this cipher.

+
Parameters
+ + + +
outputThe output buffer to put the ciphertext into. Must be at least blockSize() bytes in length.
inputThe input buffer to read the plaintext from which is allowed to overlap with output. Must be at least blockSize() bytes in length.
+
+
+
See Also
decryptBlock(), blockSize()
+ +

Implemented in AESCommon.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
size_t BlockCipher::keySize () const
+
+pure virtual
+
+ +

Default size of the key for this block cipher, in bytes.

+

This value indicates the default, or recommended, size for the key.

+
See Also
setKey(), blockSize()
+ +

Implemented in AES256, AES192, and AES128.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool BlockCipher::setKey (const uint8_t * key,
size_t len 
)
+
+pure virtual
+
+ +

Sets the key to use for future encryption and decryption operations.

+
Parameters
+ + + +
keyThe key to use.
lenThe length of the key.
+
+
+
Returns
Returns false if the key length is not supported, or the key is somehow "weak" and unusable by this cipher.
+

Use clear() or the destructor to remove the key and any other sensitive data from the object once encryption or decryption is complete.

+
See Also
keySize(), clear()
+ +

Implemented in AES256, AES192, and AES128.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/classBlockCipher.png b/classBlockCipher.png new file mode 100644 index 00000000..ca1eceba Binary files /dev/null and b/classBlockCipher.png differ diff --git a/classBoolField-members.html b/classBoolField-members.html index 4b6b4ddf..4f751d3c 100644 --- a/classBoolField-members.html +++ b/classBoolField-members.html @@ -3,6 +3,7 @@ + ArduinoLibs: Member List @@ -29,7 +30,7 @@
- + @@ -112,9 +113,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classBoolField.html b/classBoolField.html index b216c79a..fdea93ce 100644 --- a/classBoolField.html +++ b/classBoolField.html @@ -3,6 +3,7 @@ + ArduinoLibs: BoolField Class Reference @@ -29,7 +30,7 @@ - + @@ -90,7 +91,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
-

Field that manages the input of a boolean value. +

Field that manages the input of a boolean value. More...

#include <BoolField.h>

@@ -100,72 +101,92 @@ Inheritance diagram for BoolField:
-Field +Field
- - + + - + + - + + - + + - + + - + + - + + - + + - + + - - + + + - + + + - + + - + + - + + - + + - + + - + +

+

Public Member Functions

 BoolField (const String &label)
 Constructs a new boolean field with a specific label.
 Constructs a new boolean field with a specific label. More...
 
 BoolField (Form &form, const String &label, const String &trueLabel, const String &falseLabel, bool value)
 Constructs a new boolean field with a specific label and attaches it to a form.
 Constructs a new boolean field with a specific label and attaches it to a form. More...
 
int dispatch (int event)
 Dispatches event via this field.
 Dispatches event via this field. More...
 
void enterField (bool reverse)
 Enters the field due to form navigation.
 Enters the field due to form navigation. More...
 
bool value () const
 Returns the current value of this field, true or false.
 Returns the current value of this field, true or false. More...
 
void setValue (bool value)
 Sets the current value of this field to value.
 Sets the current value of this field to value. More...
 
const String & trueLabel () const
 Returns the string that is displayed when value() is true.
 Returns the string that is displayed when value() is true. More...
 
void setTrueLabel (const String &trueLabel)
 Sets the string that is displayed when value() is true to trueLabel.
 Sets the string that is displayed when value() is true to trueLabel. More...
 
const String & falseLabel () const
 Returns the string that is displayed when value() is false.
 Returns the string that is displayed when value() is false. More...
 
void setFalseLabel (const String &falseLabel)
 Sets the string that is displayed when value() is false to falseLabel.
- Public Member Functions inherited from Field
 Sets the string that is displayed when value() is false to falseLabel. More...
 
- Public Member Functions inherited from Field
 Field (const String &label)
 Constructs a new field with a specific label.
 Constructs a new field with a specific label. More...
 
 Field (Form &form, const String &label)
 Constructs a new field with a specific label and attaches it to a form.
 
 ~Field ()
 Destroys this field and removes it from its owning Form.
 Destroys this field and removes it from its owning Form. More...
 
Formform () const
 Returns the Form that owns this field; null if not associated with a Form.
 Returns the Form that owns this field; null if not associated with a Form.
 
virtual void exitField ()
 Exits the field due to form navigation.
 Exits the field due to form navigation. More...
 
const String & label () const
 Returns the label to display in the first line of this field.
 Returns the label to display in the first line of this field. More...
 
void setLabel (const String &label)
 Sets the label to display in the first line of this field.
 Sets the label to display in the first line of this field. More...
 
bool isCurrent () const
 Returns true if this field is the currently-displayed field in its owning form; false otherwise.
 Returns true if this field is the currently-displayed field in its owning form; false otherwise. More...
 
- - + - + + - + +

+

Additional Inherited Members

- Protected Member Functions inherited from Field
- Protected Member Functions inherited from Field
LiquidCrystal * lcd () const
 Returns the LCD that this field is being drawn on.
 Returns the LCD that this field is being drawn on.
 
virtual void updateCursor ()
 Updates the cursor position after the label has been drawn by setLabel().
 Updates the cursor position after the label has been drawn by setLabel(). More...
 
-

Detailed Description

-

Field that manages the input of a boolean value.

-

BoolField is intended for field values that are modifiable by the user. Pressing one of Up or Down will toggle the field's current value.

-

The following example creates a boolean field that shows the state of the status LED on D13. When the LED is on (the default), the string "On" will be displayed on the LCD screen. When the LED is off, the string "Off" will be displayed instead.

-
Form mainForm(lcd);
-
BoolField ledField(mainForm, "Status LED", "On", "Off", true);
+

Detailed Description

+

Field that manages the input of a boolean value.

+

BoolField is intended for field values that are modifiable by the user. Pressing one of Up or Down will toggle the field's current value.

+

The following example creates a boolean field that shows the state of the status LED on D13. When the LED is on (the default), the string "On" will be displayed on the LCD screen. When the LED is off, the string "Off" will be displayed instead.

+
Form mainForm(lcd);
+
BoolField ledField(mainForm, "Status LED", "On", "Off", true);
FormBool.png

To actually toggle the LED, the application's main loop() function should contain the following code:

-
int event = lcd.getButton();
+
int event = lcd.getButton();
if (mainForm.dispatch(event) == FORM_CHANGED) {
if (mainForm.isCurrent(ledField)) {
if (ledField.value())
@@ -174,12 +195,12 @@ LiquidCrystal *  digitalWrite(STATUS_LED, LOW);
}
}
-

Use TextField for read-only fields that report boolean values but which are not modifiable by the user.

-

ListField can be used to select between more than two items.

-
See Also
Field, ListField, TextField
+

Use TextField for read-only fields that report boolean values but which are not modifiable by the user.

+

ListField can be used to select between more than two items.

+
See Also
Field, ListField, TextField

Definition at line 28 of file BoolField.h.

-

Constructor & Destructor Documentation

+

Constructor & Destructor Documentation

@@ -203,9 +224,9 @@ LiquidCrystal * 

Constructs a new boolean field with a specific label.

-

The field is initially not associated with a Form. The field can be added to a form later using Form::addField().

-

The initial value() will be false.

-
See Also
Form::addField()
+

The field is initially not associated with a Form. The field can be added to a form later using Form::addField().

+

The initial value() will be false.

+
See Also
Form::addField()

Definition at line 77 of file BoolField.cpp.

@@ -254,14 +275,14 @@ LiquidCrystal * 

Constructs a new boolean field with a specific label and attaches it to a form.

-

The initial value() of the field is set to the parameter value. When value() is true, trueLabel will be displayed on the screen. When value() is false, falseLabel will be displayed on the screen.

-
See Also
value()
+

The initial value() of the field is set to the parameter value. When value() is true, trueLabel will be displayed on the screen. When value() is false, falseLabel will be displayed on the screen.

+
See Also
value()

Definition at line 94 of file BoolField.cpp.

-

Member Function Documentation

+

Member Function Documentation

@@ -285,11 +306,11 @@ LiquidCrystal * 

Dispatches event via this field.

-

The event is usually obtained from LCD::getButton().

+

The event is usually obtained from LCD::getButton().

Returns zero if the event has been handled and no further action is required.

Returns FORM_CHANGED if the event has changed the value of this field in a manner that may require the application to take further action based on the new field value.

-

Returns -1 if the event is not handled by this field, and should be handled by the Form itself (particularly for Left and Right buttons). The default implementation returns -1 for all events.

-
See Also
Form::dispatch(), LCD::getButton()
+

Returns -1 if the event is not handled by this field, and should be handled by the Form itself (particularly for Left and Right buttons). The default implementation returns -1 for all events.

+
See Also
Form::dispatch(), LCD::getButton()

Reimplemented from Field.

@@ -322,8 +343,8 @@ LiquidCrystal * Enters the field due to form navigation.

This function is typically called when the user presses Left and Right buttons to navigate to the field. If reverse is true, then navigation was due to the Left button being pressed.

This function can assume that the display has been cleared and the cursor is positioned at (0, 0).

-

The default implementation prints the label().

-
See Also
exitField()
+

The default implementation prints the label().

+
See Also
exitField()

Reimplemented from Field.

@@ -352,8 +373,8 @@ LiquidCrystal * 
-

Returns the string that is displayed when value() is false.

-
See Also
setFalseLabel(), trueLabel()
+

Returns the string that is displayed when value() is false.

+
See Also
setFalseLabel(), trueLabel()

Definition at line 43 of file BoolField.h.

@@ -373,8 +394,8 @@ LiquidCrystal * 
-

Sets the string that is displayed when value() is false to falseLabel.

-
See Also
falseLabel(), setTrueLabel()
+

Sets the string that is displayed when value() is false to falseLabel.

+
See Also
falseLabel(), setTrueLabel()

Definition at line 173 of file BoolField.cpp.

@@ -394,8 +415,8 @@ LiquidCrystal * 
-

Sets the string that is displayed when value() is true to trueLabel.

-
See Also
trueLabel(), setFalseLabel()
+

Sets the string that is displayed when value() is true to trueLabel.

+
See Also
trueLabel(), setFalseLabel()

Definition at line 153 of file BoolField.cpp.

@@ -416,7 +437,7 @@ LiquidCrystal * 

Sets the current value of this field to value.

-
See Also
value()
+
See Also
value()

Definition at line 131 of file BoolField.cpp.

@@ -443,8 +464,8 @@ LiquidCrystal * 
-

Returns the string that is displayed when value() is true.

-
See Also
setTrueLabel(), falseLabel()
+

Returns the string that is displayed when value() is true.

+
See Also
setTrueLabel(), falseLabel()

Definition at line 40 of file BoolField.h.

@@ -472,7 +493,7 @@ LiquidCrystal * 

Returns the current value of this field, true or false.

-
See Also
setValue()
+
See Also
setValue()

Definition at line 37 of file BoolField.h.

@@ -485,9 +506,9 @@ LiquidCrystal *  diff --git a/classCBC-members.html b/classCBC-members.html new file mode 100644 index 00000000..715cacf8 --- /dev/null +++ b/classCBC-members.html @@ -0,0 +1,114 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
CBC< T > Member List
+
+
+ +

This is the complete list of members for CBC< T >, including all inherited members.

+ + + + + + + + + + + + + + +
CBC()CBC< T >inline
CBCCommon()CBCCommonprotected
Cipher()Cipher
clear()CBCCommonvirtual
decrypt(uint8_t *output, const uint8_t *input, size_t len)CBCCommonvirtual
encrypt(uint8_t *output, const uint8_t *input, size_t len)CBCCommonvirtual
ivSize() const CBCCommonvirtual
keySize() const CBCCommonvirtual
setBlockCipher(BlockCipher *cipher)CBCCommoninlineprotected
setIV(const uint8_t *iv, size_t len)CBCCommonvirtual
setKey(const uint8_t *key, size_t len)CBCCommonvirtual
~CBCCommon()CBCCommonvirtual
~Cipher()Ciphervirtual
+ + + + diff --git a/classCBC.html b/classCBC.html new file mode 100644 index 00000000..90cb6e23 --- /dev/null +++ b/classCBC.html @@ -0,0 +1,193 @@ + + + + + + +ArduinoLibs: CBC< T > Class Template Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
CBC< T > Class Template Reference
+
+
+ +

Implementation of the Cipher Block Chaining (CBC) mode for 128-bit block ciphers. + More...

+ +

#include <CBC.h>

+
+Inheritance diagram for CBC< T >:
+
+
+ + +CBCCommon +Cipher + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

CBC ()
 Constructs a new CBC object for the block cipher T.
 
- Public Member Functions inherited from CBCCommon
+virtual ~CBCCommon ()
 Destroys this cipher object after clearing sensitive information.
 
size_t keySize () const
 Default size of the key for this cipher, in bytes. More...
 
size_t ivSize () const
 Size of the initialization vector for this cipher, in bytes. More...
 
bool setKey (const uint8_t *key, size_t len)
 Sets the key to use for future encryption and decryption operations. More...
 
bool setIV (const uint8_t *iv, size_t len)
 Sets the initialization vector to use for future encryption and decryption operations. More...
 
void encrypt (uint8_t *output, const uint8_t *input, size_t len)
 Encrypts an input buffer and writes the ciphertext to an output buffer. More...
 
void decrypt (uint8_t *output, const uint8_t *input, size_t len)
 Decrypts an input buffer and writes the plaintext to an output buffer. More...
 
void clear ()
 Clears all security-sensitive state from this cipher. More...
 
- Public Member Functions inherited from Cipher
Cipher ()
 Constructs a new cipher object.
 
virtual ~Cipher ()
 Destroys this cipher object. More...
 
+ + + + + + + + +

+Additional Inherited Members

- Protected Member Functions inherited from CBCCommon
 CBCCommon ()
 Constructs a new cipher in CBC mode. More...
 
void setBlockCipher (BlockCipher *cipher)
 Sets the block cipher to use for this CBC object. More...
 
+

Detailed Description

+

template<typename T>
+class CBC< T >

+ +

Implementation of the Cipher Block Chaining (CBC) mode for 128-bit block ciphers.

+

The template parameter T must be a concrete subclass of BlockCipher indicating the specific block cipher to use. T must have a block size of 16 bytes (128 bits).

+

For example, the following creates a CBC object using AES192 as the underlying cipher:

+
+
cbc.setKey(key, 24);
+
cbc.setIV(iv, 16);
+
cbc.encrypt(output, input, len);
+

Decryption is similar:

+
+
cbc.setKey(key, 24);
+
cbc.setIV(iv, 16);
+
cbc.decrypt(output, input, len);
+

The size of the ciphertext will always be the same as the size of the plaintext. Also, the length of the plaintext/ciphertext must be a multiple of 16. Extra bytes are ignored and not encrypted. The caller is responsible for padding the underlying data to a multiple of 16 using an appropriate padding scheme for the application.

+

Reference: http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation

+
See Also
CTR, CFB, OFB
+ +

Definition at line 57 of file CBC.h.

+

The documentation for this class was generated from the following files: +
+ + + + diff --git a/classCBC.png b/classCBC.png new file mode 100644 index 00000000..3d582b6d Binary files /dev/null and b/classCBC.png differ diff --git a/classCBCCommon-members.html b/classCBCCommon-members.html new file mode 100644 index 00000000..257b75dc --- /dev/null +++ b/classCBCCommon-members.html @@ -0,0 +1,113 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
CBCCommon Member List
+
+
+ +

This is the complete list of members for CBCCommon, including all inherited members.

+ + + + + + + + + + + + + +
CBCCommon()CBCCommonprotected
Cipher()Cipher
clear()CBCCommonvirtual
decrypt(uint8_t *output, const uint8_t *input, size_t len)CBCCommonvirtual
encrypt(uint8_t *output, const uint8_t *input, size_t len)CBCCommonvirtual
ivSize() const CBCCommonvirtual
keySize() const CBCCommonvirtual
setBlockCipher(BlockCipher *cipher)CBCCommoninlineprotected
setIV(const uint8_t *iv, size_t len)CBCCommonvirtual
setKey(const uint8_t *key, size_t len)CBCCommonvirtual
~CBCCommon()CBCCommonvirtual
~Cipher()Ciphervirtual
+ + + + diff --git a/classCBCCommon.html b/classCBCCommon.html new file mode 100644 index 00000000..42b16f6d --- /dev/null +++ b/classCBCCommon.html @@ -0,0 +1,542 @@ + + + + + + +ArduinoLibs: CBCCommon Class Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+ +
+ +

Concrete base class to assist with implementing CBC for 128-bit block ciphers. + More...

+ +

#include <CBC.h>

+
+Inheritance diagram for CBCCommon:
+
+
+ + +Cipher +CBC< T > + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+virtual ~CBCCommon ()
 Destroys this cipher object after clearing sensitive information.
 
size_t keySize () const
 Default size of the key for this cipher, in bytes. More...
 
size_t ivSize () const
 Size of the initialization vector for this cipher, in bytes. More...
 
bool setKey (const uint8_t *key, size_t len)
 Sets the key to use for future encryption and decryption operations. More...
 
bool setIV (const uint8_t *iv, size_t len)
 Sets the initialization vector to use for future encryption and decryption operations. More...
 
void encrypt (uint8_t *output, const uint8_t *input, size_t len)
 Encrypts an input buffer and writes the ciphertext to an output buffer. More...
 
void decrypt (uint8_t *output, const uint8_t *input, size_t len)
 Decrypts an input buffer and writes the plaintext to an output buffer. More...
 
void clear ()
 Clears all security-sensitive state from this cipher. More...
 
- Public Member Functions inherited from Cipher
Cipher ()
 Constructs a new cipher object.
 
virtual ~Cipher ()
 Destroys this cipher object. More...
 
+ + + + + + + +

+Protected Member Functions

 CBCCommon ()
 Constructs a new cipher in CBC mode. More...
 
void setBlockCipher (BlockCipher *cipher)
 Sets the block cipher to use for this CBC object. More...
 
+

Detailed Description

+

Concrete base class to assist with implementing CBC for 128-bit block ciphers.

+

Reference: http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation

+
See Also
CBC
+ +

Definition at line 29 of file CBC.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + +
CBCCommon::CBCCommon ()
+
+protected
+
+ +

Constructs a new cipher in CBC mode.

+

This constructor should be followed by a call to setBlockCipher().

+ +

Definition at line 42 of file CBC.cpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
void CBCCommon::clear ()
+
+virtual
+
+ +

Clears all security-sensitive state from this cipher.

+

Security-sensitive information includes key schedules, initialization vectors, and any temporary state that is used by encrypt() or decrypt() which is stored in the cipher itself.

+ +

Implements Cipher.

+ +

Definition at line 113 of file CBC.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void CBCCommon::decrypt (uint8_t * output,
const uint8_t * input,
size_t len 
)
+
+virtual
+
+ +

Decrypts an input buffer and writes the plaintext to an output buffer.

+
Parameters
+ + + + +
outputThe output buffer to write to, which may be the same buffer as input. The output buffer must have at least as many bytes as the input buffer.
inputThe input buffer to read from.
lenThe number of bytes to decrypt.
+
+
+

The decrypt() function can be called multiple times with different regions of the ciphertext data.

+
See Also
encrypt()
+ +

Implements Cipher.

+ +

Definition at line 99 of file CBC.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void CBCCommon::encrypt (uint8_t * output,
const uint8_t * input,
size_t len 
)
+
+virtual
+
+ +

Encrypts an input buffer and writes the ciphertext to an output buffer.

+
Parameters
+ + + + +
outputThe output buffer to write to, which may be the same buffer as input. The output buffer must have at least as many bytes as the input buffer.
inputThe input buffer to read from.
lenThe number of bytes to encrypt.
+
+
+

The encrypt() function can be called multiple times with different regions of the plaintext data.

+
See Also
decrypt()
+ +

Implements Cipher.

+ +

Definition at line 86 of file CBC.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
size_t CBCCommon::ivSize () const
+
+virtual
+
+ +

Size of the initialization vector for this cipher, in bytes.

+

If the cipher does not need an initialization vector, this function will return zero.

+ +

Implements Cipher.

+ +

Definition at line 62 of file CBC.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
size_t CBCCommon::keySize () const
+
+virtual
+
+ +

Default size of the key for this cipher, in bytes.

+

If the cipher supports variable-sized keys, keySize() indicates the default or recommended key size. The cipher may support other key sizes.

+
See Also
setKey(), ivSize()
+ +

Implements Cipher.

+ +

Definition at line 57 of file CBC.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void CBCCommon::setBlockCipher (BlockCiphercipher)
+
+inlineprotected
+
+ +

Sets the block cipher to use for this CBC object.

+
Parameters
+ + +
cipherThe block cipher to use to implement CBC mode, which must have a block size of 16 bytes (128 bits).
+
+
+ +

Definition at line 47 of file CBC.h.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool CBCCommon::setIV (const uint8_t * iv,
size_t len 
)
+
+virtual
+
+ +

Sets the initialization vector to use for future encryption and decryption operations.

+
Parameters
+ + + +
ivThe initialization vector to use.
lenThe length of the initialization vector in bytes.
+
+
+
Returns
Returns false if the length is not supported.
+

Initialization vectors should be set before the first call to encrypt() or decrypt() after a setKey() call. If the initialization vector is changed after encryption or decryption begins, then the behaviour is undefined.

+
Note
The IV is not encoded into the output stream by encrypt(). The caller is responsible for communicating the IV to the other party.
+
See Also
ivSize()
+ +

Implements Cipher.

+ +

Definition at line 77 of file CBC.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool CBCCommon::setKey (const uint8_t * key,
size_t len 
)
+
+virtual
+
+ +

Sets the key to use for future encryption and decryption operations.

+
Parameters
+ + + +
keyThe key to use.
lenThe length of the key in bytes.
+
+
+
Returns
Returns false if the key length is not supported, or the key is somehow "weak" and unusable by this cipher.
+

Use clear() or the destructor to remove the key and any other sensitive data from the object once encryption or decryption is complete.

+

Calling setKey() resets the cipher. Any temporary data that was being retained for encrypting partial blocks will be abandoned.

+
See Also
keySize(), clear()
+ +

Implements Cipher.

+ +

Definition at line 67 of file CBC.cpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/classCBCCommon.png b/classCBCCommon.png new file mode 100644 index 00000000..fe4e7c65 Binary files /dev/null and b/classCBCCommon.png differ diff --git a/classCFB-members.html b/classCFB-members.html new file mode 100644 index 00000000..1e198a42 --- /dev/null +++ b/classCFB-members.html @@ -0,0 +1,114 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
CFB< T > Member List
+
+
+ +

This is the complete list of members for CFB< T >, including all inherited members.

+ + + + + + + + + + + + + + +
CFB()CFB< T >inline
CFBCommon()CFBCommonprotected
Cipher()Cipher
clear()CFBCommonvirtual
decrypt(uint8_t *output, const uint8_t *input, size_t len)CFBCommonvirtual
encrypt(uint8_t *output, const uint8_t *input, size_t len)CFBCommonvirtual
ivSize() const CFBCommonvirtual
keySize() const CFBCommonvirtual
setBlockCipher(BlockCipher *cipher)CFBCommoninlineprotected
setIV(const uint8_t *iv, size_t len)CFBCommonvirtual
setKey(const uint8_t *key, size_t len)CFBCommonvirtual
~CFBCommon()CFBCommonvirtual
~Cipher()Ciphervirtual
+ + + + diff --git a/classCFB.html b/classCFB.html new file mode 100644 index 00000000..bc6b74a1 --- /dev/null +++ b/classCFB.html @@ -0,0 +1,193 @@ + + + + + + +ArduinoLibs: CFB< T > Class Template Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
CFB< T > Class Template Reference
+
+
+ +

Implementation of the Cipher Feedback (CFB) mode for 128-bit block ciphers. + More...

+ +

#include <CFB.h>

+
+Inheritance diagram for CFB< T >:
+
+
+ + +CFBCommon +Cipher + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

CFB ()
 Constructs a new CFB object for the block cipher T.
 
- Public Member Functions inherited from CFBCommon
+virtual ~CFBCommon ()
 Destroys this cipher object after clearing sensitive information.
 
size_t keySize () const
 Default size of the key for this cipher, in bytes. More...
 
size_t ivSize () const
 Size of the initialization vector for this cipher, in bytes. More...
 
bool setKey (const uint8_t *key, size_t len)
 Sets the key to use for future encryption and decryption operations. More...
 
bool setIV (const uint8_t *iv, size_t len)
 Sets the initialization vector to use for future encryption and decryption operations. More...
 
void encrypt (uint8_t *output, const uint8_t *input, size_t len)
 Encrypts an input buffer and writes the ciphertext to an output buffer. More...
 
void decrypt (uint8_t *output, const uint8_t *input, size_t len)
 Decrypts an input buffer and writes the plaintext to an output buffer. More...
 
void clear ()
 Clears all security-sensitive state from this cipher. More...
 
- Public Member Functions inherited from Cipher
Cipher ()
 Constructs a new cipher object.
 
virtual ~Cipher ()
 Destroys this cipher object. More...
 
+ + + + + + + + +

+Additional Inherited Members

- Protected Member Functions inherited from CFBCommon
 CFBCommon ()
 Constructs a new cipher in CFB mode. More...
 
void setBlockCipher (BlockCipher *cipher)
 Sets the block cipher to use for this CFB object. More...
 
+

Detailed Description

+

template<typename T>
+class CFB< T >

+ +

Implementation of the Cipher Feedback (CFB) mode for 128-bit block ciphers.

+

The template parameter T must be a concrete subclass of BlockCipher indicating the specific block cipher to use. T must have a block size of 16 bytes (128 bits). The size of the CFB shift register is the same as the block size.

+

For example, the following creates a CFB object using AES192 as the underlying cipher:

+
+
cfb.setKey(key, 24);
+
cfb.setIV(iv, 16);
+
cfb.encrypt(output, input, len);
+

Decryption is similar:

+
+
cfb.setKey(key, 24);
+
cfb.setIV(iv, 16);
+
cfb.decrypt(output, input, len);
+

The size of the ciphertext will always be the same as the size of the plaintext.

+

Reference: http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation

+
See Also
CTR, OFB, CBC
+ +

Definition at line 56 of file CFB.h.

+

The documentation for this class was generated from the following files: +
+ + + + diff --git a/classCFB.png b/classCFB.png new file mode 100644 index 00000000..fa4a4b50 Binary files /dev/null and b/classCFB.png differ diff --git a/classCFBCommon-members.html b/classCFBCommon-members.html new file mode 100644 index 00000000..f8354b39 --- /dev/null +++ b/classCFBCommon-members.html @@ -0,0 +1,113 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
CFBCommon Member List
+
+
+ +

This is the complete list of members for CFBCommon, including all inherited members.

+ + + + + + + + + + + + + +
CFBCommon()CFBCommonprotected
Cipher()Cipher
clear()CFBCommonvirtual
decrypt(uint8_t *output, const uint8_t *input, size_t len)CFBCommonvirtual
encrypt(uint8_t *output, const uint8_t *input, size_t len)CFBCommonvirtual
ivSize() const CFBCommonvirtual
keySize() const CFBCommonvirtual
setBlockCipher(BlockCipher *cipher)CFBCommoninlineprotected
setIV(const uint8_t *iv, size_t len)CFBCommonvirtual
setKey(const uint8_t *key, size_t len)CFBCommonvirtual
~CFBCommon()CFBCommonvirtual
~Cipher()Ciphervirtual
+ + + + diff --git a/classCFBCommon.html b/classCFBCommon.html new file mode 100644 index 00000000..6ff60a88 --- /dev/null +++ b/classCFBCommon.html @@ -0,0 +1,542 @@ + + + + + + +ArduinoLibs: CFBCommon Class Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+ +
+ +

Concrete base class to assist with implementing CFB for 128-bit block ciphers. + More...

+ +

#include <CFB.h>

+
+Inheritance diagram for CFBCommon:
+
+
+ + +Cipher +CFB< T > + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+virtual ~CFBCommon ()
 Destroys this cipher object after clearing sensitive information.
 
size_t keySize () const
 Default size of the key for this cipher, in bytes. More...
 
size_t ivSize () const
 Size of the initialization vector for this cipher, in bytes. More...
 
bool setKey (const uint8_t *key, size_t len)
 Sets the key to use for future encryption and decryption operations. More...
 
bool setIV (const uint8_t *iv, size_t len)
 Sets the initialization vector to use for future encryption and decryption operations. More...
 
void encrypt (uint8_t *output, const uint8_t *input, size_t len)
 Encrypts an input buffer and writes the ciphertext to an output buffer. More...
 
void decrypt (uint8_t *output, const uint8_t *input, size_t len)
 Decrypts an input buffer and writes the plaintext to an output buffer. More...
 
void clear ()
 Clears all security-sensitive state from this cipher. More...
 
- Public Member Functions inherited from Cipher
Cipher ()
 Constructs a new cipher object.
 
virtual ~Cipher ()
 Destroys this cipher object. More...
 
+ + + + + + + +

+Protected Member Functions

 CFBCommon ()
 Constructs a new cipher in CFB mode. More...
 
void setBlockCipher (BlockCipher *cipher)
 Sets the block cipher to use for this CFB object. More...
 
+

Detailed Description

+

Concrete base class to assist with implementing CFB for 128-bit block ciphers.

+

Reference: http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation

+
See Also
CFB
+ +

Definition at line 29 of file CFB.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + +
CFBCommon::CFBCommon ()
+
+protected
+
+ +

Constructs a new cipher in CFB mode.

+

This constructor should be followed by a call to setBlockCipher().

+ +

Definition at line 42 of file CFB.cpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
void CFBCommon::clear ()
+
+virtual
+
+ +

Clears all security-sensitive state from this cipher.

+

Security-sensitive information includes key schedules, initialization vectors, and any temporary state that is used by encrypt() or decrypt() which is stored in the cipher itself.

+ +

Implements Cipher.

+ +

Definition at line 140 of file CFB.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void CFBCommon::decrypt (uint8_t * output,
const uint8_t * input,
size_t len 
)
+
+virtual
+
+ +

Decrypts an input buffer and writes the plaintext to an output buffer.

+
Parameters
+ + + + +
outputThe output buffer to write to, which may be the same buffer as input. The output buffer must have at least as many bytes as the input buffer.
inputThe input buffer to read from.
lenThe number of bytes to decrypt.
+
+
+

The decrypt() function can be called multiple times with different regions of the ciphertext data.

+
See Also
encrypt()
+ +

Implements Cipher.

+ +

Definition at line 112 of file CFB.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void CFBCommon::encrypt (uint8_t * output,
const uint8_t * input,
size_t len 
)
+
+virtual
+
+ +

Encrypts an input buffer and writes the ciphertext to an output buffer.

+
Parameters
+ + + + +
outputThe output buffer to write to, which may be the same buffer as input. The output buffer must have at least as many bytes as the input buffer.
inputThe input buffer to read from.
lenThe number of bytes to encrypt.
+
+
+

The encrypt() function can be called multiple times with different regions of the plaintext data.

+
See Also
decrypt()
+ +

Implements Cipher.

+ +

Definition at line 85 of file CFB.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
size_t CFBCommon::ivSize () const
+
+virtual
+
+ +

Size of the initialization vector for this cipher, in bytes.

+

If the cipher does not need an initialization vector, this function will return zero.

+ +

Implements Cipher.

+ +

Definition at line 61 of file CFB.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
size_t CFBCommon::keySize () const
+
+virtual
+
+ +

Default size of the key for this cipher, in bytes.

+

If the cipher supports variable-sized keys, keySize() indicates the default or recommended key size. The cipher may support other key sizes.

+
See Also
setKey(), ivSize()
+ +

Implements Cipher.

+ +

Definition at line 56 of file CFB.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void CFBCommon::setBlockCipher (BlockCiphercipher)
+
+inlineprotected
+
+ +

Sets the block cipher to use for this CFB object.

+
Parameters
+ + +
cipherThe block cipher to use to implement CFB mode, which must have a block size of 16 bytes (128 bits).
+
+
+ +

Definition at line 47 of file CFB.h.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool CFBCommon::setIV (const uint8_t * iv,
size_t len 
)
+
+virtual
+
+ +

Sets the initialization vector to use for future encryption and decryption operations.

+
Parameters
+ + + +
ivThe initialization vector to use.
lenThe length of the initialization vector in bytes.
+
+
+
Returns
Returns false if the length is not supported.
+

Initialization vectors should be set before the first call to encrypt() or decrypt() after a setKey() call. If the initialization vector is changed after encryption or decryption begins, then the behaviour is undefined.

+
Note
The IV is not encoded into the output stream by encrypt(). The caller is responsible for communicating the IV to the other party.
+
See Also
ivSize()
+ +

Implements Cipher.

+ +

Definition at line 76 of file CFB.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool CFBCommon::setKey (const uint8_t * key,
size_t len 
)
+
+virtual
+
+ +

Sets the key to use for future encryption and decryption operations.

+
Parameters
+ + + +
keyThe key to use.
lenThe length of the key in bytes.
+
+
+
Returns
Returns false if the key length is not supported, or the key is somehow "weak" and unusable by this cipher.
+

Use clear() or the destructor to remove the key and any other sensitive data from the object once encryption or decryption is complete.

+

Calling setKey() resets the cipher. Any temporary data that was being retained for encrypting partial blocks will be abandoned.

+
See Also
keySize(), clear()
+ +

Implements Cipher.

+ +

Definition at line 66 of file CFB.cpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/classCFBCommon.png b/classCFBCommon.png new file mode 100644 index 00000000..25f7ce1e Binary files /dev/null and b/classCFBCommon.png differ diff --git a/classCTR-members.html b/classCTR-members.html new file mode 100644 index 00000000..87399216 --- /dev/null +++ b/classCTR-members.html @@ -0,0 +1,115 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
CTR< T > Member List
+
+
+ +

This is the complete list of members for CTR< T >, including all inherited members.

+ + + + + + + + + + + + + + + +
Cipher()Cipher
clear()CTRCommonvirtual
CTR()CTR< T >inline
CTRCommon()CTRCommonprotected
decrypt(uint8_t *output, const uint8_t *input, size_t len)CTRCommonvirtual
encrypt(uint8_t *output, const uint8_t *input, size_t len)CTRCommonvirtual
ivSize() const CTRCommonvirtual
keySize() const CTRCommonvirtual
setBlockCipher(BlockCipher *cipher)CTRCommoninlineprotected
setCounterSize(size_t size)CTRCommon
setIV(const uint8_t *iv, size_t len)CTRCommonvirtual
setKey(const uint8_t *key, size_t len)CTRCommonvirtual
~Cipher()Ciphervirtual
~CTRCommon() (defined in CTRCommon)CTRCommonvirtual
+ + + + diff --git a/classCTR.html b/classCTR.html new file mode 100644 index 00000000..a8c91c4d --- /dev/null +++ b/classCTR.html @@ -0,0 +1,189 @@ + + + + + + +ArduinoLibs: CTR< T > Class Template Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
CTR< T > Class Template Reference
+
+
+ +

Implementation of the Counter (CTR) mode for 128-bit block ciphers. + More...

+ +

#include <CTR.h>

+
+Inheritance diagram for CTR< T >:
+
+
+ + +CTRCommon +Cipher + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

CTR ()
 Constructs a new CTR object for the 128-bit block cipher T.
 
- Public Member Functions inherited from CTRCommon
size_t keySize () const
 Default size of the key for this cipher, in bytes. More...
 
size_t ivSize () const
 Size of the initialization vector for this cipher, in bytes. More...
 
bool setCounterSize (size_t size)
 Sets the counter size for the IV. More...
 
bool setKey (const uint8_t *key, size_t len)
 Sets the key to use for future encryption and decryption operations. More...
 
bool setIV (const uint8_t *iv, size_t len)
 Sets the initial counter value to use for future encryption and decryption operations. More...
 
void encrypt (uint8_t *output, const uint8_t *input, size_t len)
 Encrypts an input buffer and writes the ciphertext to an output buffer. More...
 
void decrypt (uint8_t *output, const uint8_t *input, size_t len)
 Decrypts an input buffer and writes the plaintext to an output buffer. More...
 
void clear ()
 Clears all security-sensitive state from this cipher. More...
 
- Public Member Functions inherited from Cipher
Cipher ()
 Constructs a new cipher object.
 
virtual ~Cipher ()
 Destroys this cipher object. More...
 
+ + + + + + + + +

+Additional Inherited Members

- Protected Member Functions inherited from CTRCommon
 CTRCommon ()
 Constructs a new cipher in CTR mode. More...
 
void setBlockCipher (BlockCipher *cipher)
 Sets the block cipher to use for this CTR object. More...
 
+

Detailed Description

+

template<typename T>
+class CTR< T >

+ +

Implementation of the Counter (CTR) mode for 128-bit block ciphers.

+

Counter mode converts a block cipher into a stream cipher. The specific block cipher is passed as the template parameter T and the key is specified via the setKey() function.

+

Keystream blocks are generated by encrypting an increasing counter value and XOR'ing it with each byte of input. The encrypt() and decrypt() operations are identical.

+

The template parameter T must be a concrete subclass of BlockCipher indicating the specific block cipher to use. For example, the following creates a CTR object using AES256 as the underlying cipher:

+
+
ctr.setKey(key, 32);
+
ctr.setIV(iv, 16);
+ +
ctr.encrypt(output, input, len);
+

In this example, the last 4 bytes of the IV are incremented to count blocks. The remaining bytes are left unchanged from block to block.

+

Reference: http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation

+
See Also
CFB, OFB, CBC
+ +

Definition at line 60 of file CTR.h.

+

The documentation for this class was generated from the following files: +
+ + + + diff --git a/classCTR.png b/classCTR.png new file mode 100644 index 00000000..13dfca43 Binary files /dev/null and b/classCTR.png differ diff --git a/classCTRCommon-members.html b/classCTRCommon-members.html new file mode 100644 index 00000000..50e214d5 --- /dev/null +++ b/classCTRCommon-members.html @@ -0,0 +1,114 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
CTRCommon Member List
+
+
+ +

This is the complete list of members for CTRCommon, including all inherited members.

+ + + + + + + + + + + + + + +
Cipher()Cipher
clear()CTRCommonvirtual
CTRCommon()CTRCommonprotected
decrypt(uint8_t *output, const uint8_t *input, size_t len)CTRCommonvirtual
encrypt(uint8_t *output, const uint8_t *input, size_t len)CTRCommonvirtual
ivSize() const CTRCommonvirtual
keySize() const CTRCommonvirtual
setBlockCipher(BlockCipher *cipher)CTRCommoninlineprotected
setCounterSize(size_t size)CTRCommon
setIV(const uint8_t *iv, size_t len)CTRCommonvirtual
setKey(const uint8_t *key, size_t len)CTRCommonvirtual
~Cipher()Ciphervirtual
~CTRCommon() (defined in CTRCommon)CTRCommonvirtual
+ + + + diff --git a/classCTRCommon.html b/classCTRCommon.html new file mode 100644 index 00000000..32152434 --- /dev/null +++ b/classCTRCommon.html @@ -0,0 +1,571 @@ + + + + + + +ArduinoLibs: CTRCommon Class Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+ +
+ +

Concrete base class to assist with implementing CTR mode for 128-bit block ciphers. + More...

+ +

#include <CTR.h>

+
+Inheritance diagram for CTRCommon:
+
+
+ + +Cipher +CTR< T > + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

size_t keySize () const
 Default size of the key for this cipher, in bytes. More...
 
size_t ivSize () const
 Size of the initialization vector for this cipher, in bytes. More...
 
bool setCounterSize (size_t size)
 Sets the counter size for the IV. More...
 
bool setKey (const uint8_t *key, size_t len)
 Sets the key to use for future encryption and decryption operations. More...
 
bool setIV (const uint8_t *iv, size_t len)
 Sets the initial counter value to use for future encryption and decryption operations. More...
 
void encrypt (uint8_t *output, const uint8_t *input, size_t len)
 Encrypts an input buffer and writes the ciphertext to an output buffer. More...
 
void decrypt (uint8_t *output, const uint8_t *input, size_t len)
 Decrypts an input buffer and writes the plaintext to an output buffer. More...
 
void clear ()
 Clears all security-sensitive state from this cipher. More...
 
- Public Member Functions inherited from Cipher
Cipher ()
 Constructs a new cipher object.
 
virtual ~Cipher ()
 Destroys this cipher object. More...
 
+ + + + + + + +

+Protected Member Functions

 CTRCommon ()
 Constructs a new cipher in CTR mode. More...
 
void setBlockCipher (BlockCipher *cipher)
 Sets the block cipher to use for this CTR object. More...
 
+

Detailed Description

+

Concrete base class to assist with implementing CTR mode for 128-bit block ciphers.

+

Reference: http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation

+
See Also
CTR
+ +

Definition at line 29 of file CTR.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + +
CTRCommon::CTRCommon ()
+
+protected
+
+ +

Constructs a new cipher in CTR mode.

+

This constructor should be followed by a call to setBlockCipher().

+ +

Definition at line 42 of file CTR.cpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
void CTRCommon::clear ()
+
+virtual
+
+ +

Clears all security-sensitive state from this cipher.

+

Security-sensitive information includes key schedules, initialization vectors, and any temporary state that is used by encrypt() or decrypt() which is stored in the cipher itself.

+ +

Implements Cipher.

+ +

Definition at line 165 of file CTR.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void CTRCommon::decrypt (uint8_t * output,
const uint8_t * input,
size_t len 
)
+
+virtual
+
+ +

Decrypts an input buffer and writes the plaintext to an output buffer.

+
Parameters
+ + + + +
outputThe output buffer to write to, which may be the same buffer as input. The output buffer must have at least as many bytes as the input buffer.
inputThe input buffer to read from.
lenThe number of bytes to decrypt.
+
+
+

The decrypt() function can be called multiple times with different regions of the ciphertext data.

+
See Also
encrypt()
+ +

Implements Cipher.

+ +

Definition at line 160 of file CTR.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void CTRCommon::encrypt (uint8_t * output,
const uint8_t * input,
size_t len 
)
+
+virtual
+
+ +

Encrypts an input buffer and writes the ciphertext to an output buffer.

+
Parameters
+ + + + +
outputThe output buffer to write to, which may be the same buffer as input. The output buffer must have at least as many bytes as the input buffer.
inputThe input buffer to read from.
lenThe number of bytes to encrypt.
+
+
+

The encrypt() function can be called multiple times with different regions of the plaintext data.

+
See Also
decrypt()
+ +

Implements Cipher.

+ +

Definition at line 128 of file CTR.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
size_t CTRCommon::ivSize () const
+
+virtual
+
+ +

Size of the initialization vector for this cipher, in bytes.

+

If the cipher does not need an initialization vector, this function will return zero.

+ +

Implements Cipher.

+ +

Definition at line 62 of file CTR.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
size_t CTRCommon::keySize () const
+
+virtual
+
+ +

Default size of the key for this cipher, in bytes.

+

If the cipher supports variable-sized keys, keySize() indicates the default or recommended key size. The cipher may support other key sizes.

+
See Also
setKey(), ivSize()
+ +

Implements Cipher.

+ +

Definition at line 57 of file CTR.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void CTRCommon::setBlockCipher (BlockCiphercipher)
+
+inlineprotected
+
+ +

Sets the block cipher to use for this CTR object.

+
Parameters
+ + +
cipherThe block cipher to use to implement CTR mode, which must have a block size of 16 bytes (128 bits).
+
+
+
Note
This class only works with block ciphers whose block size is 16 bytes (128 bits). If the cipher has a different block size, then setKey() will fail and return false.
+ +

Definition at line 49 of file CTR.h.

+ +
+
+ +
+
+ + + + + + + + +
bool CTRCommon::setCounterSize (size_t size)
+
+ +

Sets the counter size for the IV.

+
Parameters
+ + +
sizeThe number of bytes on the end of the counter block that are relevant when incrementing, between 1 and 16.
+
+
+
Returns
Returns false if the size value is not between 1 and 16.
+

When the counter is incremented during encrypt(), only the last size bytes are considered relevant. This can be useful to improve performance when the higher level protocol specifies that only the least significant N bytes "count". The high level protocol should explicitly generate a new initial counter value and key long before the size bytes overflow and wrap around.

+

By default, the counter size is 16 which is the same as the block size of the underlying block cipher.

+
See Also
setIV()
+ +

Definition at line 86 of file CTR.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool CTRCommon::setIV (const uint8_t * iv,
size_t len 
)
+
+virtual
+
+ +

Sets the initial counter value to use for future encryption and decryption operations.

+
Parameters
+ + + +
ivThe initial counter value which must contain exactly 16 bytes.
lenThe length of the counter value, which mut be 16.
+
+
+
Returns
Returns false if len is not exactly 16.
+

The precise method to generate the initial counter is not defined by this class. Usually higher level protocols like SSL/TLS and SSH specify how to construct the initial counter value. This class merely increments the counter every time a new block of keystream data is needed.

+
See Also
encrypt(), setCounterSize()
+ +

Implements Cipher.

+ +

Definition at line 119 of file CTR.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool CTRCommon::setKey (const uint8_t * key,
size_t len 
)
+
+virtual
+
+ +

Sets the key to use for future encryption and decryption operations.

+
Parameters
+ + + +
keyThe key to use.
lenThe length of the key in bytes.
+
+
+
Returns
Returns false if the key length is not supported, or the key is somehow "weak" and unusable by this cipher.
+

Use clear() or the destructor to remove the key and any other sensitive data from the object once encryption or decryption is complete.

+

Calling setKey() resets the cipher. Any temporary data that was being retained for encrypting partial blocks will be abandoned.

+
See Also
keySize(), clear()
+ +

Implements Cipher.

+ +

Definition at line 94 of file CTR.cpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/classCTRCommon.png b/classCTRCommon.png new file mode 100644 index 00000000..82065c8d Binary files /dev/null and b/classCTRCommon.png differ diff --git a/classChaCha-members.html b/classChaCha-members.html new file mode 100644 index 00000000..26803101 --- /dev/null +++ b/classChaCha-members.html @@ -0,0 +1,116 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
ChaCha Member List
+
+
+ +

This is the complete list of members for ChaCha, including all inherited members.

+ + + + + + + + + + + + + + + + +
ChaCha(uint8_t numRounds=20)ChaChaexplicit
Cipher()Cipher
clear()ChaChavirtual
decrypt(uint8_t *output, const uint8_t *input, size_t len)ChaChavirtual
encrypt(uint8_t *output, const uint8_t *input, size_t len)ChaChavirtual
hashCore(uint32_t *output, const uint32_t *input, uint8_t rounds)ChaChastatic
ivSize() const ChaChavirtual
keySize() const ChaChavirtual
numRounds() const ChaChainline
setCounter(const uint8_t *counter, size_t len)ChaCha
setIV(const uint8_t *iv, size_t len)ChaChavirtual
setKey(const uint8_t *key, size_t len)ChaChavirtual
setNumRounds(uint8_t numRounds)ChaChainline
~ChaCha() (defined in ChaCha)ChaChavirtual
~Cipher()Ciphervirtual
+ + + + diff --git a/classChaCha.html b/classChaCha.html new file mode 100644 index 00000000..6d430b22 --- /dev/null +++ b/classChaCha.html @@ -0,0 +1,674 @@ + + + + + + +ArduinoLibs: ChaCha Class Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+ +
+ +

ChaCha stream cipher. + More...

+ +

#include <ChaCha.h>

+
+Inheritance diagram for ChaCha:
+
+
+ + +Cipher + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 ChaCha (uint8_t numRounds=20)
 Constructs a new ChaCha stream cipher. More...
 
size_t keySize () const
 Default size of the key for this cipher, in bytes. More...
 
size_t ivSize () const
 Size of the initialization vector for this cipher, in bytes. More...
 
uint8_t numRounds () const
 Returns the number of encryption rounds; usually 8, 12, or 20. More...
 
void setNumRounds (uint8_t numRounds)
 Sets the number of encryption rounds. More...
 
bool setKey (const uint8_t *key, size_t len)
 Sets the key to use for future encryption and decryption operations. More...
 
bool setIV (const uint8_t *iv, size_t len)
 Sets the initialization vector to use for future encryption and decryption operations. More...
 
bool setCounter (const uint8_t *counter, size_t len)
 Sets the starting counter for encryption. More...
 
void encrypt (uint8_t *output, const uint8_t *input, size_t len)
 Encrypts an input buffer and writes the ciphertext to an output buffer. More...
 
void decrypt (uint8_t *output, const uint8_t *input, size_t len)
 Decrypts an input buffer and writes the plaintext to an output buffer. More...
 
void clear ()
 Clears all security-sensitive state from this cipher. More...
 
- Public Member Functions inherited from Cipher
Cipher ()
 Constructs a new cipher object.
 
virtual ~Cipher ()
 Destroys this cipher object. More...
 
+ + + + +

+Static Public Member Functions

static void hashCore (uint32_t *output, const uint32_t *input, uint8_t rounds)
 Executes the ChaCha hash core on an input memory block. More...
 
+

Detailed Description

+

ChaCha stream cipher.

+

ChaCha is a stream cipher that takes a key, an 8-byte nonce/IV, and a counter and hashes them to generate a keystream to XOR with the plaintext. Variations on the ChaCha cipher use 8, 12, or 20 rounds of hashing operations with either 128-bit or 256-bit keys.

+

Reference: http://cr.yp.to/chacha.html

+ +

Definition at line 28 of file ChaCha.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
ChaCha::ChaCha (uint8_t numRounds = 20)
+
+explicit
+
+ +

Constructs a new ChaCha stream cipher.

+
Parameters
+ + +
numRoundsNumber of encryption rounds to use; usually 8, 12, or 20.
+
+
+ +

Definition at line 47 of file ChaCha.cpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
void ChaCha::clear ()
+
+virtual
+
+ +

Clears all security-sensitive state from this cipher.

+

Security-sensitive information includes key schedules, initialization vectors, and any temporary state that is used by encrypt() or decrypt() which is stored in the cipher itself.

+ +

Implements Cipher.

+ +

Definition at line 195 of file ChaCha.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void ChaCha::decrypt (uint8_t * output,
const uint8_t * input,
size_t len 
)
+
+virtual
+
+ +

Decrypts an input buffer and writes the plaintext to an output buffer.

+
Parameters
+ + + + +
outputThe output buffer to write to, which may be the same buffer as input. The output buffer must have at least as many bytes as the input buffer.
inputThe input buffer to read from.
lenThe number of bytes to decrypt.
+
+
+

The decrypt() function can be called multiple times with different regions of the ciphertext data.

+
See Also
encrypt()
+ +

Implements Cipher.

+ +

Definition at line 190 of file ChaCha.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void ChaCha::encrypt (uint8_t * output,
const uint8_t * input,
size_t len 
)
+
+virtual
+
+ +

Encrypts an input buffer and writes the ciphertext to an output buffer.

+
Parameters
+ + + + +
outputThe output buffer to write to, which may be the same buffer as input. The output buffer must have at least as many bytes as the input buffer.
inputThe input buffer to read from.
lenThe number of bytes to encrypt.
+
+
+

The encrypt() function can be called multiple times with different regions of the plaintext data.

+
See Also
decrypt()
+ +

Implements Cipher.

+ +

Definition at line 158 of file ChaCha.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void ChaCha::hashCore (uint32_t * output,
const uint32_t * input,
uint8_t rounds 
)
+
+static
+
+ +

Executes the ChaCha hash core on an input memory block.

+
Parameters
+ + + + +
outputOutput memory block, must be at least 16 words in length and must not overlap with input.
inputInput memory block, must be at least 16 words in length.
roundsNumber of ChaCha rounds to perform; usually 8, 12, or 20.
+
+
+

This function is provided for the convenience of applications that need access to the ChaCha hash core without the higher-level processing that turns the core into a stream cipher.

+ +

Definition at line 230 of file ChaCha.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
size_t ChaCha::ivSize () const
+
+virtual
+
+ +

Size of the initialization vector for this cipher, in bytes.

+

If the cipher does not need an initialization vector, this function will return zero.

+ +

Implements Cipher.

+ +

Definition at line 65 of file ChaCha.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
size_t ChaCha::keySize () const
+
+virtual
+
+ +

Default size of the key for this cipher, in bytes.

+

If the cipher supports variable-sized keys, keySize() indicates the default or recommended key size. The cipher may support other key sizes.

+
See Also
setKey(), ivSize()
+ +

Implements Cipher.

+ +

Definition at line 59 of file ChaCha.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint8_t ChaCha::numRounds () const
+
+inline
+
+ +

Returns the number of encryption rounds; usually 8, 12, or 20.

+
See Also
setNumRounds()
+ +

Definition at line 37 of file ChaCha.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool ChaCha::setCounter (const uint8_t * counter,
size_t len 
)
+
+ +

Sets the starting counter for encryption.

+
Parameters
+ + + +
counterA 4-byte or 8-byte value to use for the starting counter instead of the default value of zero.
lenThe length of the counter, which must be 4 or 8.
+
+
+
Returns
Returns false if len is not 4 or 8.
+

This function must be called after setIV() and before the first call to encrypt(). It is used to specify a different starting value than zero for the counter portion of the hash input.

+
See Also
setIV()
+ +

Definition at line 145 of file ChaCha.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool ChaCha::setIV (const uint8_t * iv,
size_t len 
)
+
+virtual
+
+ +

Sets the initialization vector to use for future encryption and decryption operations.

+
Parameters
+ + + +
ivThe initialization vector to use.
lenThe length of the initialization vector in bytes.
+
+
+
Returns
Returns false if the length is not supported.
+

Initialization vectors should be set before the first call to encrypt() or decrypt() after a setKey() call. If the initialization vector is changed after encryption or decryption begins, then the behaviour is undefined.

+
Note
The IV is not encoded into the output stream by encrypt(). The caller is responsible for communicating the IV to the other party.
+
See Also
ivSize()
+ +

Implements Cipher.

+ +

Definition at line 111 of file ChaCha.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool ChaCha::setKey (const uint8_t * key,
size_t len 
)
+
+virtual
+
+ +

Sets the key to use for future encryption and decryption operations.

+
Parameters
+ + + +
keyThe key to use.
lenThe length of the key in bytes.
+
+
+
Returns
Returns false if the key length is not supported, or the key is somehow "weak" and unusable by this cipher.
+

Use clear() or the destructor to remove the key and any other sensitive data from the object once encryption or decryption is complete.

+

Calling setKey() resets the cipher. Any temporary data that was being retained for encrypting partial blocks will be abandoned.

+
See Also
keySize(), clear()
+ +

Implements Cipher.

+ +

Definition at line 87 of file ChaCha.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ChaCha::setNumRounds (uint8_t numRounds)
+
+inline
+
+ +

Sets the number of encryption rounds.

+
Parameters
+ + +
numRoundsThe number of encryption rounds; usually 8, 12, or 20.
+
+
+
See Also
numRounds()
+ +

Definition at line 38 of file ChaCha.h.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/classChaCha.png b/classChaCha.png new file mode 100644 index 00000000..6b26fef9 Binary files /dev/null and b/classChaCha.png differ diff --git a/classCharlieplex-members.html b/classCharlieplex-members.html index 3082b7e8..e990e4c3 100644 --- a/classCharlieplex-members.html +++ b/classCharlieplex-members.html @@ -3,6 +3,7 @@ + ArduinoLibs: Member List @@ -29,7 +30,7 @@
- + @@ -103,9 +104,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classCharlieplex.html b/classCharlieplex.html index 66a2377e..a4965ee8 100644 --- a/classCharlieplex.html +++ b/classCharlieplex.html @@ -3,6 +3,7 @@ + ArduinoLibs: Charlieplex Class Reference @@ -29,7 +30,7 @@
- + @@ -95,33 +96,44 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

#include <Charlieplex.h>

- - + + + - + + - + + - + + - + + - + + - + + - + + - + + - + +

+

Public Member Functions

 Charlieplex (const uint8_t *pins, uint8_t numPins)
 Constructs a new charliexplexing array where the output pins are specified by the numPins entries in pins.
 Constructs a new charliexplexing array where the output pins are specified by the numPins entries in pins. More...
 
 ~Charlieplex ()
 Destroys this charlieplexed array.
 
int count () const
 Returns the number of LED's in this charlieplexed array based on the number of pins.
 Returns the number of LED's in this charlieplexed array based on the number of pins. More...
 
bool led (int index) const
 Returns the value of the LED at index in the charplexed array; true if lit; false if not lit.
 Returns the value of the LED at index in the charplexed array; true if lit; false if not lit. More...
 
void setLed (int index, bool value)
 Sets the value of the LED at index in the charliplexed array.
 Sets the value of the LED at index in the charliplexed array. More...
 
uint8_t pwmLed (int index) const
 Returns the PWM value of the LED at index in the charplexed array; between 0 and 255.
 Returns the PWM value of the LED at index in the charplexed array; between 0 and 255. More...
 
void setPwmLed (int index, uint8_t value)
 Sets the PWM value of the LED at index in the charliplexed array; between 0 and 255.
 Sets the PWM value of the LED at index in the charliplexed array; between 0 and 255. More...
 
unsigned long holdTime () const
 Returns the number of microseconds that each LED should be held on for before moving onto the next in loop().
 Returns the number of microseconds that each LED should be held on for before moving onto the next in loop(). More...
 
void setHoldTime (unsigned long us)
 Sets the number of microseconds that each LED should be held on for before moving onto the next in loop() to us.
 Sets the number of microseconds that each LED should be held on for before moving onto the next in loop() to us. More...
 
void loop ()
 Runs the multiplexing loop, to display the LED states on the charlieplexed array.
 Runs the multiplexing loop, to display the LED states on the charlieplexed array. More...
 
void refresh ()
 Refreshes the charlieplexed array by advancing to the next LED that needs to be lit.
 Refreshes the charlieplexed array by advancing to the next LED that needs to be lit. More...
 
-

Detailed Description

+

Detailed Description

Manage an array of LED's in a charlieplexed arrangement.

Charlieplexing is a technique for multiplexing large numbers of LED's on a small number of microcontroller output pins. LED's are arranged in complementary pairs; the simplest being for two output pins:

@@ -132,11 +144,11 @@ Public Member Functions charlieplex3pin.png

In this case, LED5 is lit when Pin1 is 1, Pin3 is 0, and Pin2 is set to a high-impedance input to "disconnect" it.

-

Charlieplex presents a simple array of led() values that indicate whether each LED is on, off, or in an intermediate PWM state (if setPwmLed() is used). The application must call loop() or refresh() on a regular basis to ensure that the multiplexed display is kept up to date. The following example drives 6 LED's connected to the output pins D9, D10, and D11:

+

Charlieplex presents a simple array of led() values that indicate whether each LED is on, off, or in an intermediate PWM state (if setPwmLed() is used). The application must call loop() or refresh() on a regular basis to ensure that the multiplexed display is kept up to date. The following example drives 6 LED's connected to the output pins D9, D10, and D11:

#include <Charlieplex.h>
byte pins[3] = {9, 10, 11};
-
Charlieplex charlie(pins, sizeof(pins));
+
Charlieplex charlie(pins, sizeof(pins));
void setup() {
charlie.setLed(0, true); // Turn on LED1
@@ -144,7 +156,7 @@ Public Member Functions
charlie.setPwmLed(5, 64); // Set LED6 to one-quarter on
}
-
void loop() {
+
void loop() {
charlie.loop();
}

@@ -156,15 +168,15 @@ Public Member Functions
charlieplex5pin.png
-

Circuits for higher numbers of LED's get increasingly complex. For those cases it can be easier to use traditional multiplexing matrix arrangements and shift registers. The DMD class does this for a specific kind of large dot matrix display. Otherwise, use the following pseudocode to determine how to connect the LED's for higher numbers of pins:

+

Circuits for higher numbers of LED's get increasingly complex. For those cases it can be easier to use traditional multiplexing matrix arrangements and shift registers. The DMD class does this for a specific kind of large dot matrix display. Otherwise, use the following pseudocode to determine how to connect the LED's for higher numbers of pins:

n = 1
for Pass = 1 to NumPins-1:
for Pin = 1 to NumPins-Pass:
LED[n] is connected between Pin (anode) and Pin+Pass (cathode)
LED[n+1] is connected between Pin+Pass (anode) and Pin (cathode)
n = n + 2
-

Note: while the above circuit diagrams and psuedocode use 1-based numbering for LED's, Charlieplex uses 0-based numbering in the led(), setLed(), pwmLed(), and setPwmLed() functions.

-

It isn't necessary to wire up all LED's. If you only need 10 LED's, then use the 4-output circuit and omit LED11 and LED12. Charlieplex only drives LED's that are lit; LED's that are unlit or unused will be skipped during the refresh scan. The maximum number of LED's that that can be driven by a specific number of pins is given by the following table:

+

Note: while the above circuit diagrams and psuedocode use 1-based numbering for LED's, Charlieplex uses 0-based numbering in the led(), setLed(), pwmLed(), and setPwmLed() functions.

+

It isn't necessary to wire up all LED's. If you only need 10 LED's, then use the 4-output circuit and omit LED11 and LED12. Charlieplex only drives LED's that are lit; LED's that are unlit or unused will be skipped during the refresh scan. The maximum number of LED's that that can be driven by a specific number of pins is given by the following table:

@@ -191,7 +203,7 @@ Public Member Functions
Number of PinsNumber of LED's

Definition at line 28 of file Charlieplex.h.

-

Constructor & Destructor Documentation

+

Constructor & Destructor Documentation

@@ -218,13 +230,13 @@ Public Member Functions

Constructs a new charliexplexing array where the output pins are specified by the numPins entries in pins.

Note: numPins must be 2 or greater for correct operation.

-
See Also
count(), setLed()
+
See Also
count(), setLed()

Definition at line 121 of file Charlieplex.cpp.

-

Member Function Documentation

+

Member Function Documentation

@@ -298,9 +310,9 @@ Public Member Functions
-

Returns the number of microseconds that each LED should be held on for before moving onto the next in loop().

+

Returns the number of microseconds that each LED should be held on for before moving onto the next in loop().

The default value is calculated so that all LED's can be refreshed with a rate of at least 200 Hz, which is necessary for handling PWM output on multiple LED's. The less LED's that are lit at once, the faster the display will refresh.

-
See Also
setHoldTime(), loop()
+
See Also
setHoldTime(), loop()

Definition at line 42 of file Charlieplex.h.

@@ -330,7 +342,7 @@ Public Member Functions

Returns the value of the LED at index in the charplexed array; true if lit; false if not lit.

If the LED is displaying a PWM value, then this function will return true for any non-zero PWM value.

-
See Also
setLed(), pwmLed()
+
See Also
setLed(), pwmLed()

Definition at line 36 of file Charlieplex.h.

@@ -350,10 +362,10 @@ Public Member Functions

Runs the multiplexing loop, to display the LED states on the charlieplexed array.

-

If holdTime() microseconds have elapsed since the last call to loop(), then the current LED is turned off and the next LED that needs to be lit is turned on.

-

LED's that do not need to be lit are skipped. The total time for a single pass through all lit LED's may be very short if only a few LED's are lit at once. If all LED's are lit, then the total time for a single pass will be count() * holdTime() microseconds.

-

If the application is using timer interrupts to drive the multiplexing process, then use refresh() instead of loop().

-
See Also
led(), pwmLed(), holdTime(), refresh()
+

If holdTime() microseconds have elapsed since the last call to loop(), then the current LED is turned off and the next LED that needs to be lit is turned on.

+

LED's that do not need to be lit are skipped. The total time for a single pass through all lit LED's may be very short if only a few LED's are lit at once. If all LED's are lit, then the total time for a single pass will be count() * holdTime() microseconds.

+

If the application is using timer interrupts to drive the multiplexing process, then use refresh() instead of loop().

+
See Also
led(), pwmLed(), holdTime(), refresh()

Definition at line 277 of file Charlieplex.cpp.

@@ -382,7 +394,7 @@ Public Member Functions

Returns the PWM value of the LED at index in the charplexed array; between 0 and 255.

-
See Also
setPwmLed(), led()
+
See Also
setPwmLed(), led()

Definition at line 39 of file Charlieplex.h.

@@ -402,8 +414,8 @@ Public Member Functions

Refreshes the charlieplexed array by advancing to the next LED that needs to be lit.

-

This function is intended to be called from a timer interrupt service routine to advance the multiplexing state without the main application having to explicitly call loop().

-
See Also
loop()
+

This function is intended to be called from a timer interrupt service routine to advance the multiplexing state without the main application having to explicitly call loop().

+
See Also
loop()

Definition at line 296 of file Charlieplex.cpp.

@@ -431,8 +443,8 @@ Public Member Functions
-

Sets the number of microseconds that each LED should be held on for before moving onto the next in loop() to us.

-
See Also
holdTime(), loop()
+

Sets the number of microseconds that each LED should be held on for before moving onto the next in loop() to us.

+
See Also
holdTime(), loop()

Definition at line 43 of file Charlieplex.h.

@@ -472,7 +484,7 @@ Public Member Functions

Sets the value of the LED at index in the charliplexed array.

The brightness of the LED will be proportional to the number of LED's that are currently lit, as the holdTime() refresh rate will cause the LED to appear to dim; the more LED's that are lit the less overall time each individual LED is held on. For best results, only a single LED should be lit at once or higher-brightness LED's should be used.

-
See Also
led(), setPwmLed()
+
See Also
led(), setPwmLed()

Definition at line 37 of file Charlieplex.h.

@@ -513,7 +525,7 @@ Public Member Functions

Sets the PWM value of the LED at index in the charliplexed array; between 0 and 255.

If this function is used, then it is assumed that the output pins are capable of PWM output.

The PWM-specified brightness of the LED will also be affected to the number of LED's that are currently lit, as the holdTime() refresh rate will cause the LED to appear to dim; the more LED's that are lit the less overall time each individual LED is held on. For best results, only a single LED should be lit at once or higher-brightness LED's should be used.

-
See Also
pwmLed(), setLed()
+
See Also
pwmLed(), setLed()

Definition at line 40 of file Charlieplex.h.

@@ -526,9 +538,9 @@ Public Member Functions
diff --git a/classChaseLEDs-members.html b/classChaseLEDs-members.html index aff58bc5..6e771455 100644 --- a/classChaseLEDs-members.html +++ b/classChaseLEDs-members.html @@ -3,6 +3,7 @@ + ArduinoLibs: Member List @@ -29,7 +30,7 @@
- + @@ -98,9 +99,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classChaseLEDs.html b/classChaseLEDs.html index c2a3bc36..515fbc4e 100644 --- a/classChaseLEDs.html +++ b/classChaseLEDs.html @@ -3,6 +3,7 @@ + ArduinoLibs: ChaseLEDs Class Reference @@ -29,7 +30,7 @@
- + @@ -96,39 +97,45 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

#include <ChaseLEDs.h>

- - + + + - + + - + +

+

Public Member Functions

 ChaseLEDs (const uint8_t *pins, int num, unsigned long advanceTime)
 Initializes the LED chaser.
 Initializes the LED chaser. More...
 
void loop ()
 
unsigned long advanceTime () const
 Returns the number of milliseconds that each LED will be lit in the chase sequence.
 Returns the number of milliseconds that each LED will be lit in the chase sequence. More...
 
void setAdvanceTime (unsigned long advanceTime)
 Sets the number of milliseconds to advance between LED's to advanceTime.
 Sets the number of milliseconds to advance between LED's to advanceTime. More...
 
- - + + - + +

+

Protected Member Functions

virtual void advance (uint8_t prevPin, uint8_t nextPin)
 Advances to the next LED in sequence, turning off prevPin, and turning on nextPin.
 Advances to the next LED in sequence, turning off prevPin, and turning on nextPin. More...
 
uint8_t previousPin (int n) const
 Returns the pin that is n steps back in the sequence.
 Returns the pin that is n steps back in the sequence. More...
 
-

Detailed Description

+

Detailed Description

Chase LED's on output pins in a defined sequence.

The following example performs a LED chase over the 6 PWM outputs on the Arduino Uno, with a 150 millisecond delay between each LED:

uint8_t pins[] = {3, 5, 6, 9, 10, 11};
-
ChaseLEDs chaser(pins, sizeof(pins), 150);
+
ChaseLEDs chaser(pins, sizeof(pins), 150);
void loop() {
chaser.loop();
}

After pin 11 is lit, the pattern will repeat at pin 3. To cause the chase to oscillate back and forth instead, extend the sequence as follows:

uint8_t pins[] = {3, 5, 6, 9, 10, 11, 10, 9, 6, 5};
-
ChaseLEDs chaser(pins, sizeof(pins), 150);
-

See the Cylon example for more information on how to use the ChaseLEDs class in a practical application.

+
ChaseLEDs chaser(pins, sizeof(pins), 150);
+

See the Cylon example for more information on how to use the ChaseLEDs class in a practical application.

Definition at line 28 of file ChaseLEDs.h.

-

Constructor & Destructor Documentation

+

Constructor & Destructor Documentation

@@ -168,7 +175,7 @@ Protected Member Functions
-

Member Function Documentation

+

Member Function Documentation

@@ -205,8 +212,8 @@ Protected Member Functions

The default implementation is equivalent to the following code:

digitalWrite(prevPin, LOW);
digitalWrite(nextPin, HIGH);
-

This method may be overridden in subclasses to provide special effects. See the documentation for previousPin() for some example effects.

-
See Also
previousPin()
+

This method may be overridden in subclasses to provide special effects. See the documentation for previousPin() for some example effects.

+
See Also
previousPin()

Definition at line 136 of file ChaseLEDs.cpp.

@@ -234,7 +241,7 @@ Protected Member Functions

Returns the number of milliseconds that each LED will be lit in the chase sequence.

-
See Also
setAdvanceTime(), advance()
+
See Also
setAdvanceTime(), advance()

Definition at line 35 of file ChaseLEDs.h.

@@ -282,23 +289,23 @@ Protected Member Functions

Returns the pin that is n steps back in the sequence.

If n is zero, then the current pin is returned; if n is 1, then the previous pin is returned; and so on.

-

This function may be called by subclasses in their advance() method to manipulate pins that are further back in the chase sequence than the immediately previous pin.

+

This function may be called by subclasses in their advance() method to manipulate pins that are further back in the chase sequence than the immediately previous pin.

For example, the following code implements a LED chaser that lights two pins at a time:

-
void DoubleChaser::advance(uint8_t prevPin, uint8_t nextPin)
+
void DoubleChaser::advance(uint8_t prevPin, uint8_t nextPin)
{
-
digitalWrite(previousPin(2), LOW);
+
digitalWrite(previousPin(2), LOW);
digitalWrite(prevPin, HIGH);
digitalWrite(nextPin, HIGH);
}

As another exmaple, the following code uses PWM outputs to fade out the previous pin rather than turn it off immediately:

-
void FadingChaser::advance(uint8_t prevPin, uint8_t nextPin)
+
void FadingChaser::advance(uint8_t prevPin, uint8_t nextPin)
{
-
digitalWrite(previousPin(2), LOW);
+
digitalWrite(previousPin(2), LOW);
analogWrite(prevPin, 32);
digitalWrite(nextPin, HIGH);
}

Note: it is possible to retrieve the following pin in sequence using previousPin(-1). This could be used to fade in the LED that follows nextPin.

-
See Also
advance()
+
See Also
advance()

Definition at line 40 of file ChaseLEDs.h.

@@ -327,7 +334,7 @@ Protected Member Functions

Sets the number of milliseconds to advance between LED's to advanceTime.

-
See Also
advanceTime(), advance()
+
See Also
advanceTime(), advance()

Definition at line 36 of file ChaseLEDs.h.

@@ -340,9 +347,9 @@ Protected Member Functions
diff --git a/classCipher-members.html b/classCipher-members.html new file mode 100644 index 00000000..714f302c --- /dev/null +++ b/classCipher-members.html @@ -0,0 +1,110 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
Cipher Member List
+
+
+ +

This is the complete list of members for Cipher, including all inherited members.

+ + + + + + + + + + +
Cipher()Cipher
clear()=0Cipherpure virtual
decrypt(uint8_t *output, const uint8_t *input, size_t len)=0Cipherpure virtual
encrypt(uint8_t *output, const uint8_t *input, size_t len)=0Cipherpure virtual
ivSize() const =0Cipherpure virtual
keySize() const =0Cipherpure virtual
setIV(const uint8_t *iv, size_t len)=0Cipherpure virtual
setKey(const uint8_t *key, size_t len)=0Cipherpure virtual
~Cipher()Ciphervirtual
+ + + + diff --git a/classCipher.html b/classCipher.html new file mode 100644 index 00000000..43ccb7be --- /dev/null +++ b/classCipher.html @@ -0,0 +1,487 @@ + + + + + + +ArduinoLibs: Cipher Class Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
Cipher Class Referenceabstract
+
+
+ +

Abstract base class for stream ciphers. + More...

+ +

#include <Cipher.h>

+
+Inheritance diagram for Cipher:
+
+
+ + +CBCCommon +CFBCommon +ChaCha +CTRCommon +OFBCommon +CBC< T > +CFB< T > +CTR< T > +OFB< T > + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Cipher ()
 Constructs a new cipher object.
 
virtual ~Cipher ()
 Destroys this cipher object. More...
 
virtual size_t keySize () const =0
 Default size of the key for this cipher, in bytes. More...
 
virtual size_t ivSize () const =0
 Size of the initialization vector for this cipher, in bytes. More...
 
virtual bool setKey (const uint8_t *key, size_t len)=0
 Sets the key to use for future encryption and decryption operations. More...
 
virtual bool setIV (const uint8_t *iv, size_t len)=0
 Sets the initialization vector to use for future encryption and decryption operations. More...
 
virtual void encrypt (uint8_t *output, const uint8_t *input, size_t len)=0
 Encrypts an input buffer and writes the ciphertext to an output buffer. More...
 
virtual void decrypt (uint8_t *output, const uint8_t *input, size_t len)=0
 Decrypts an input buffer and writes the plaintext to an output buffer. More...
 
virtual void clear ()=0
 Clears all security-sensitive state from this cipher. More...
 
+

Detailed Description

+

Abstract base class for stream ciphers.

+

This class is intended for implementing ciphers that operate on arbitrary amounts of data. In particular, stream ciphers where the number of bytes that are input to encrypt() or decrypt() is exactly the same as the number of bytes that are output.

+

All of the stream ciphers such as ChaCha inherit directly from this class, together with block cipher modes such as CTR and CFB.

+ +

Definition at line 29 of file Cipher.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + +
Cipher::~Cipher ()
+
+virtual
+
+ +

Destroys this cipher object.

+

Subclasses are responsible for clearing temporary key schedules and other buffers so as to avoid leaking sensitive information.

+
See Also
clear()
+ +

Definition at line 53 of file Cipher.cpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
void Cipher::clear ()
+
+pure virtual
+
+ +

Clears all security-sensitive state from this cipher.

+

Security-sensitive information includes key schedules, initialization vectors, and any temporary state that is used by encrypt() or decrypt() which is stored in the cipher itself.

+ +

Implemented in ChaCha, CTRCommon, CBCCommon, CFBCommon, and OFBCommon.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Cipher::decrypt (uint8_t * output,
const uint8_t * input,
size_t len 
)
+
+pure virtual
+
+ +

Decrypts an input buffer and writes the plaintext to an output buffer.

+
Parameters
+ + + + +
outputThe output buffer to write to, which may be the same buffer as input. The output buffer must have at least as many bytes as the input buffer.
inputThe input buffer to read from.
lenThe number of bytes to decrypt.
+
+
+

The decrypt() function can be called multiple times with different regions of the ciphertext data.

+
See Also
encrypt()
+ +

Implemented in ChaCha, CTRCommon, CBCCommon, CFBCommon, and OFBCommon.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Cipher::encrypt (uint8_t * output,
const uint8_t * input,
size_t len 
)
+
+pure virtual
+
+ +

Encrypts an input buffer and writes the ciphertext to an output buffer.

+
Parameters
+ + + + +
outputThe output buffer to write to, which may be the same buffer as input. The output buffer must have at least as many bytes as the input buffer.
inputThe input buffer to read from.
lenThe number of bytes to encrypt.
+
+
+

The encrypt() function can be called multiple times with different regions of the plaintext data.

+
See Also
decrypt()
+ +

Implemented in ChaCha, CTRCommon, CBCCommon, CFBCommon, and OFBCommon.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
size_t Cipher::ivSize () const
+
+pure virtual
+
+ +

Size of the initialization vector for this cipher, in bytes.

+

If the cipher does not need an initialization vector, this function will return zero.

+ +

Implemented in CBCCommon, CFBCommon, ChaCha, CTRCommon, and OFBCommon.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
size_t Cipher::keySize () const
+
+pure virtual
+
+ +

Default size of the key for this cipher, in bytes.

+

If the cipher supports variable-sized keys, keySize() indicates the default or recommended key size. The cipher may support other key sizes.

+
See Also
setKey(), ivSize()
+ +

Implemented in CBCCommon, CFBCommon, ChaCha, CTRCommon, and OFBCommon.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool Cipher::setIV (const uint8_t * iv,
size_t len 
)
+
+pure virtual
+
+ +

Sets the initialization vector to use for future encryption and decryption operations.

+
Parameters
+ + + +
ivThe initialization vector to use.
lenThe length of the initialization vector in bytes.
+
+
+
Returns
Returns false if the length is not supported.
+

Initialization vectors should be set before the first call to encrypt() or decrypt() after a setKey() call. If the initialization vector is changed after encryption or decryption begins, then the behaviour is undefined.

+
Note
The IV is not encoded into the output stream by encrypt(). The caller is responsible for communicating the IV to the other party.
+
See Also
ivSize()
+ +

Implemented in ChaCha, CTRCommon, CBCCommon, CFBCommon, and OFBCommon.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool Cipher::setKey (const uint8_t * key,
size_t len 
)
+
+pure virtual
+
+ +

Sets the key to use for future encryption and decryption operations.

+
Parameters
+ + + +
keyThe key to use.
lenThe length of the key in bytes.
+
+
+
Returns
Returns false if the key length is not supported, or the key is somehow "weak" and unusable by this cipher.
+

Use clear() or the destructor to remove the key and any other sensitive data from the object once encryption or decryption is complete.

+

Calling setKey() resets the cipher. Any temporary data that was being retained for encrypting partial blocks will be abandoned.

+
See Also
keySize(), clear()
+ +

Implemented in ChaCha, CTRCommon, CBCCommon, CFBCommon, and OFBCommon.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/classCipher.png b/classCipher.png new file mode 100644 index 00000000..3a1ad03b Binary files /dev/null and b/classCipher.png differ diff --git a/classCurve25519-members.html b/classCurve25519-members.html new file mode 100644 index 00000000..13692641 --- /dev/null +++ b/classCurve25519-members.html @@ -0,0 +1,104 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
Curve25519 Member List
+
+
+ +

This is the complete list of members for Curve25519, including all inherited members.

+ + + + +
dh1(uint8_t k[32], uint8_t f[32])Curve25519static
dh2(uint8_t k[32], uint8_t f[32])Curve25519static
eval(uint8_t result[32], const uint8_t s[32], const uint8_t x[32])Curve25519static
+ + + + diff --git a/classCurve25519.html b/classCurve25519.html new file mode 100644 index 00000000..dc412e1d --- /dev/null +++ b/classCurve25519.html @@ -0,0 +1,303 @@ + + + + + + +ArduinoLibs: Curve25519 Class Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
Curve25519 Class Reference
+
+
+ +

Diffie-Hellman key agreement based on the elliptic curve modulo 2^255 - 19. + More...

+ +

#include <Curve25519.h>

+ + + + + + + + + + + +

+Static Public Member Functions

static bool eval (uint8_t result[32], const uint8_t s[32], const uint8_t x[32])
 Evaluates the raw Curve25519 function. More...
 
static void dh1 (uint8_t k[32], uint8_t f[32])
 Performs phase 1 of a Diffie-Hellman key exchange using Curve25519. More...
 
static bool dh2 (uint8_t k[32], uint8_t f[32])
 Performs phase 2 of a Diffie-Hellman key exchange using Curve25519. More...
 
+

Detailed Description

+

Diffie-Hellman key agreement based on the elliptic curve modulo 2^255 - 19.

+
Note
This public functions in this class need a substantial amount of stack space to store intermediate results while the curve function is being evaluated. About 1k of free stack space is recommended for safety.
+

References: http://cr.yp.to/ecdh.html https://tools.ietf.org/html/draft-irtf-cfrg-curves-02

+ +

Definition at line 35 of file Curve25519.h.

+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void Curve25519::dh1 (uint8_t k[32],
uint8_t f[32] 
)
+
+static
+
+ +

Performs phase 1 of a Diffie-Hellman key exchange using Curve25519.

+
Parameters
+ + + +
kThe key value to send to the other party as part of the exchange.
fThe generated secret value for this party. This must not be transmitted to any party or stored in permanent storage. It only needs to be kept in memory until dh2() is called.
+
+
+

The f value is generated with RNG.rand(). It is the caller's responsibility to ensure that the global random number pool has sufficient entropy to generate the 32 bytes of f safely before calling this function.

+

The following example demonstrates how to perform a full Diffie-Hellman key exchange using dh1() and dh2():

+
uint8_t f[32];
+
uint8_t k[32];
+
+
// Generate the secret value "f" and the public value "k".
+ +
+
// Send "k" to the other party.
+
...
+
+
// Read the "k" value that the other party sent to us.
+
...
+
+
// Generate the shared secret in "k" using the previous secret value "f".
+
if (!Curve25519::dh2(k, f)) {
+
// The received "k" value was invalid - abort the session.
+
...
+
}
+
+
// The "k" value can now be used to generate session keys for encryption.
+
...
+

Reference: https://tools.ietf.org/html/draft-irtf-cfrg-curves-02

+
See Also
dh2()
+ +

Definition at line 231 of file Curve25519.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool Curve25519::dh2 (uint8_t k[32],
uint8_t f[32] 
)
+
+static
+
+ +

Performs phase 2 of a Diffie-Hellman key exchange using Curve25519.

+
Parameters
+ + + +
kOn entry, this is the key value that was received from the other party as part of the exchange. On exit, this will be the shared secret.
fThe secret value for this party that was generated by dh1(). The f value will be destroyed by this function.
+
+
+
Returns
Returns true if the key exchange was successful, or false if the k value is invalid.
+

Reference: https://tools.ietf.org/html/draft-irtf-cfrg-curves-02

+
See Also
dh1()
+ +

Definition at line 269 of file Curve25519.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Curve25519::eval (uint8_t result[32],
const uint8_t s[32],
const uint8_t x[32] 
)
+
+static
+
+ +

Evaluates the raw Curve25519 function.

+
Parameters
+ + + + +
resultThe result of evaluating the curve function.
sThe S parameter to the curve function.
xThe X(Q) parameter to the curve function. If this pointer is NULL then the value 9 is used for x.
+
+
+

This function is provided to assist with implementating other algorithms with the curve. Normally applications should use dh1() and dh2() directly instead.

+
Returns
Returns true if the function was evaluated; false if x is not a proper member of the field modulo (2^255 - 19).
+

Reference: https://tools.ietf.org/html/draft-irtf-cfrg-curves-02

+
See Also
dh1(), dh2()
+ +

Definition at line 68 of file Curve25519.cpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/classDMD-members.html b/classDMD-members.html index d8a59bb0..386472e0 100644 --- a/classDMD-members.html +++ b/classDMD-members.html @@ -3,6 +3,7 @@ + ArduinoLibs: Member List @@ -29,7 +30,7 @@
- + @@ -149,9 +150,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classDMD.html b/classDMD.html index 8ebb8eda..a10c2f8a 100644 --- a/classDMD.html +++ b/classDMD.html @@ -3,6 +3,7 @@ + ArduinoLibs: DMD Class Reference @@ -29,7 +30,7 @@ - + @@ -101,199 +102,256 @@ Inheritance diagram for DMD:
-Bitmap +Bitmap
- - + + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - - + + + - + + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + +

+

Public Member Functions

 DMD (int widthPanels=1, int heightPanels=1)
 Constructs a new dot matrix display handler for a display that is widthPanels x heightPanels in size.
 Constructs a new dot matrix display handler for a display that is widthPanels x heightPanels in size. More...
 
 ~DMD ()
 Destroys this dot matrix display handler.
 
bool doubleBuffer () const
 Returns true if the display is double-buffered; false if single-buffered. The default is false.
 Returns true if the display is double-buffered; false if single-buffered. The default is false. More...
 
void setDoubleBuffer (bool doubleBuffer)
 Enables or disables double-buffering according to doubleBuffer.
 Enables or disables double-buffering according to doubleBuffer. More...
 
void swapBuffers ()
 Swaps the buffers that are used for rendering to the display.
 Swaps the buffers that are used for rendering to the display. More...
 
void swapBuffersAndCopy ()
 Swaps the buffers that are used for rendering to the display and copies the former back buffer contents to the new back buffer.
 Swaps the buffers that are used for rendering to the display and copies the former back buffer contents to the new back buffer. More...
 
void loop ()
 Performs regular display refresh activities from the application's main loop.
 Performs regular display refresh activities from the application's main loop. More...
 
void refresh ()
 Refresh the display.
 Refresh the display. More...
 
void enableTimer1 ()
 Enables Timer1 overflow interrupts for updating this display.
 Enables Timer1 overflow interrupts for updating this display. More...
 
void disableTimer1 ()
 Disables Timer1 overflow interrupts.
 Disables Timer1 overflow interrupts. More...
 
void enableTimer2 ()
 Enables Timer2 overflow interrupts for updating this display.
 Enables Timer2 overflow interrupts for updating this display. More...
 
void disableTimer2 ()
 Disables Timer2 overflow interrupts.
- Public Member Functions inherited from Bitmap
 Disables Timer2 overflow interrupts. More...
 
- Public Member Functions inherited from Bitmap
 Bitmap (int width, int height)
 Constructs a new in-memory bitmap that is width x height pixels in size.
 Constructs a new in-memory bitmap that is width x height pixels in size. More...
 
 ~Bitmap ()
 Destroys this bitmap.
 
bool isValid () const
 Returns true if the memory for this bitmap is valid; false otherwise.
 Returns true if the memory for this bitmap is valid; false otherwise. More...
 
int width () const
 Returns the width of the bitmap in pixels.
 Returns the width of the bitmap in pixels. More...
 
int height () const
 Returns the height of the bitmap in pixels.
 Returns the height of the bitmap in pixels. More...
 
int stride () const
 Returns the number of bytes in each line of the bitmap's data() buffer.
 Returns the number of bytes in each line of the bitmap's data() buffer. More...
 
int bitsPerPixel () const
 Returns the number of bits per pixel for the bitmap; always 1.
 Returns the number of bits per pixel for the bitmap; always 1. More...
 
uint8_t * data ()
 Returns a pointer to the start of the bitmap's data buffer.
 Returns a pointer to the start of the bitmap's data buffer. More...
 
const uint8_t * data () const
 Returns a constant pointer to the start of the bitmap's data buffer.This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 Returns a constant pointer to the start of the bitmap's data buffer. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void clear (Color color=Black)
 Clears the entire bitmap to the specified color.
 Clears the entire bitmap to the specified color. More...
 
Color pixel (int x, int y) const
 Returns the color of the pixel at (x, y); either Black or White.
 Returns the color of the pixel at (x, y); either Black or White. More...
 
void setPixel (int x, int y, Color color)
 Sets the pixel at (x, y) to color.
 Sets the pixel at (x, y) to color. More...
 
void drawLine (int x1, int y1, int x2, int y2, Color color=White)
 Draws a line from (x1, y1) to (x2, y2) in color.
 Draws a line from (x1, y1) to (x2, y2) in color. More...
 
void drawRect (int x1, int y1, int x2, int y2, Color borderColor=White, Color fillColor=NoFill)
 Draws a rectangle from (x1, y1) to (x2, y2), with the outline in borderColor and the interior filled with fillColor.
 Draws a rectangle from (x1, y1) to (x2, y2), with the outline in borderColor and the interior filled with fillColor. More...
 
void drawFilledRect (int x1, int y1, int x2, int y2, Color color=White)
 Draws a filled rectangle from (x1, y1) to (x2, y2) in color.
 Draws a filled rectangle from (x1, y1) to (x2, y2) in color. More...
 
void drawCircle (int centerX, int centerY, int radius, Color borderColor=White, Color fillColor=NoFill)
 Draws a circle with a specific center (centerX, centerY) and radius, with the outline in borderColor and the interior filled with fillColor.
 Draws a circle with a specific center (centerX, centerY) and radius, with the outline in borderColor and the interior filled with fillColor. More...
 
void drawFilledCircle (int centerX, int centerY, int radius, Color color=White)
 Draws a filled circle with a specific center (centerX, centerY) and radius in color.
 Draws a filled circle with a specific center (centerX, centerY) and radius in color. More...
 
void drawBitmap (int x, int y, const Bitmap &bitmap, Color color=White)
 Draws bitmap at (x, y) in color.
 Draws bitmap at (x, y) in color. More...
 
void drawBitmap (int x, int y, Bitmap::ProgMem bitmap, Color color=White)
 Draws bitmap at (x, y) in color.
 Draws bitmap at (x, y) in color. More...
 
void drawInvertedBitmap (int x, int y, const Bitmap &bitmap)
 Draws bitmap at (x, y) in inverted colors.
 Draws bitmap at (x, y) in inverted colors. More...
 
void drawInvertedBitmap (int x, int y, Bitmap::ProgMem bitmap)
 Draws bitmap at (x, y) in inverted colors.
 Draws bitmap at (x, y) in inverted colors. More...
 
Font font () const
 Returns the currently selected font, or null if none selected.
 Returns the currently selected font, or null if none selected. More...
 
void setFont (Font font)
 Sets the font for use with drawText() and drawChar().
 Sets the font for use with drawText() and drawChar(). More...
 
Color textColor () const
 Returns the color that will be used for drawing text with drawText() and drawChar(). The default is White.
 Returns the color that will be used for drawing text with drawText() and drawChar(). The default is White. More...
 
void setTextColor (Color color)
 Sets the color that will be used for drawing text with drawText() and drawChar().
 Sets the color that will be used for drawing text with drawText() and drawChar(). More...
 
void drawText (int x, int y, const char *str, int len=-1)
 Draws the len characters of str at (x, y).
 Draws the len characters of str at (x, y). More...
 
void drawText (int x, int y, const String &str, int start=0, int len=-1)
 Draws len characters starting at start from str to the screen at (x, y).
 Draws len characters starting at start from str to the screen at (x, y). More...
 
int drawChar (int x, int y, char ch)
 Draws a single character ch at (x, y).
 Draws a single character ch at (x, y). More...
 
int charWidth (char ch) const
 Returns the width in pixels of ch in the current font().
 Returns the width in pixels of ch in the current font(). More...
 
int textWidth (const char *str, int len=-1) const
 Returns the width in pixels of the len characters of str in the current font(), including inter-character spacing.
 Returns the width in pixels of the len characters of str in the current font(), including inter-character spacing. More...
 
int textWidth (const String &str, int start=0, int len=-1) const
 Returns the width in pixels of the len characters of str in the current font(), starting at start, including inter-character spacing.
 Returns the width in pixels of the len characters of str in the current font(), starting at start, including inter-character spacing. More...
 
int textHeight () const
 Returns the height in pixels of the current text drawing font(); or zero if font() is not set.
 Returns the height in pixels of the current text drawing font(); or zero if font() is not set. More...
 
void copy (int x, int y, int width, int height, Bitmap *dest, int destX, int destY)
 Copies the width x height pixels starting at top-left corner (x, y) to (destX, destY) in the bitmap dest.
 Copies the width x height pixels starting at top-left corner (x, y) to (destX, destY) in the bitmap dest. More...
 
void fill (int x, int y, int width, int height, Color color)
 Fills the width x height pixels starting at top-left corner (x, y) with color.
 Fills the width x height pixels starting at top-left corner (x, y) with color. More...
 
void fill (int x, int y, int width, int height, Bitmap::ProgMem pattern, Color color=White)
 Fills the width x height pixels starting at top-left corner (x, y) with the contents of pattern.
 Fills the width x height pixels starting at top-left corner (x, y) with the contents of pattern. More...
 
void scroll (int dx, int dy, Color fillColor=Black)
 Scrolls the entire contents of the bitmap by dx and dy.
 Scrolls the entire contents of the bitmap by dx and dy. More...
 
void scroll (int x, int y, int width, int height, int dx, int dy, Color fillColor=Black)
 Scrolls the width x height pixels starting at top-left corner (x, y) by dx and dy.
 Scrolls the width x height pixels starting at top-left corner (x, y) by dx and dy. More...
 
void invert (int x, int y, int width, int height)
 Inverts the width x height pixels starting at top-left corner (x, y).
 Inverts the width x height pixels starting at top-left corner (x, y). More...
 
- - + +

+

Static Public Member Functions

static Color fromRGB (uint8_t r, uint8_t g, uint8_t b)
 Converts an RGB value into a pixel color value.
 Converts an RGB value into a pixel color value. More...
 
- - + - + + + - + + + - + + +

+

Additional Inherited Members

- Public Types inherited from Bitmap
- Public Types inherited from Bitmap
typedef uint8_t Color
 Type that represents the color of a pixel in a bitmap.
 Type that represents the color of a pixel in a bitmap. More...
 
typedef PGM_VOID_P ProgMem
 Type that represents a bitmap within program memory.
 
typedef PGM_VOID_P Font
 Type that represents a font within program memory.
- Static Public Attributes inherited from Bitmap
 
- Static Public Attributes inherited from Bitmap
static const Color Black = 0
 Color value corresponding to "black".
 
static const Color White = 1
 Color value corresponding to "white". If the bitmap is displayed on a LED array, then it may have a different physical color.
 Color value corresponding to "white". If the bitmap is displayed on a LED array, then it may have a different physical color. More...
 
static const Color NoFill = 2
 Special color value that is used with drawRect() and drawCircle() to indicate that the interior of the shape should not be filled. For all other uses, NoFill is equivalent to White.
 
-

Detailed Description

+

Detailed Description

Handle large dot matrix displays composed of LED's.

This class is designed for use with Freetronics Large Dot Matrix Displays. These displays have 512 LED's arranged in a 32x16 matrix and controlled by an SPI interface. The displays are available in red, blue, green, yellow, and white variations (for which this class always uses the constant White regardless of the physical color).

Drawing

-

DMD inherits from Bitmap so that any of the drawing functions in that class can be used to draw directly to dot matrix displays. The following example initializes a single display panel and draws a rectangle and a circle into it at setup time:

+

DMD inherits from Bitmap so that any of the drawing functions in that class can be used to draw directly to dot matrix displays. The following example initializes a single display panel and draws a rectangle and a circle into it at setup time:

#include <DMD.h>
-
DMD display;
+
DMD display;
void setup() {
-
display.drawRect(5, 2, 27, 13);
-
display.drawCircle(16, 8, 4);
+
display.drawRect(5, 2, 27, 13);
+
display.drawCircle(16, 8, 4);
}

The display must be updated frequently from the application's main loop:

-
void loop() {
-
display.loop();
+
void loop() {
+
display.loop();
}

Interrupt-driven display refresh

-

The loop() method simplifies updating the display from the application's main loop but it can sometimes be inconvenient to arrange for it to be called regularly, especially if the application wishes to use delay() or delayMicroseconds().

-

DMD provides an asynchronous display update mechanism using Timer1 interrupts. The application turns on interrupts using enableTimer1() and then calls refresh() from the interrupt service routine:

+

The loop() method simplifies updating the display from the application's main loop but it can sometimes be inconvenient to arrange for it to be called regularly, especially if the application wishes to use delay() or delayMicroseconds().

+

DMD provides an asynchronous display update mechanism using Timer1 interrupts. The application turns on interrupts using enableTimer1() and then calls refresh() from the interrupt service routine:

#include <DMD.h>
-
DMD display;
+
DMD display;
ISR(TIMER1_OVF_vect)
{
-
display.refresh();
+
display.refresh();
}
void setup() {
-
display.enableTimer1();
+
display.enableTimer1();
}

If Timer1 is already in use by some other part of your application, then Timer2 can be used as an alternative interrupt source:

#include <DMD.h>
-
DMD display;
+
DMD display;
ISR(TIMER2_OVF_vect)
{
-
display.refresh();
+
display.refresh();
}
void setup() {
-
display.enableTimer2();
+
display.enableTimer2();
}
-

DMD can also be used with third-party timer libraries such as TimerOne:

+

DMD can also be used with third-party timer libraries such as TimerOne:

#include <DMD.h>
#include <TimerOne.h>
-
DMD display;
+
DMD display;
void refreshDisplay()
{
-
display.refresh();
+
display.refresh();
}
void setup() {
@@ -306,27 +364,27 @@ Double buffering

This problem can be alleviated using double buffering: all rendering is done to an off-screen buffer that is swapped onto the screen once it is ready for display. Rendering then switches to the other buffer that is now off-screen. The following example demonstrates this:

#include <DMD.h>
-
DMD display;
+
DMD display;
ISR(TIMER1_OVF_vect)
{
-
display.refresh();
+
display.refresh();
}
void setup() {
-
display.setDoubleBuffer(true);
-
display.enableTimer1();
+
display.setDoubleBuffer(true);
+
display.enableTimer1();
}
-
void loop() {
+
void loop() {
updateDisplay();
-
display.swapBuffers();
+
display.swapBuffers();
delay(50); // Delay between frames.
}
void updateDisplay() {
// Draw the new display contents into the off-screen buffer.
-
display.clear();
+
display.clear();
...
}

The downside of double buffering is that it uses twice as much main memory to manage the contents of the screen.

@@ -344,13 +402,13 @@ Multiple panels
dmd-4x3.png
-

DMD automatically takes care of flipping the data for panels in the alternating rows. No special action is required by the user except to physically connect the panels as shown and to initialize the DMD class appropriately:

+

DMD automatically takes care of flipping the data for panels in the alternating rows. No special action is required by the user except to physically connect the panels as shown and to initialize the DMD class appropriately:

#include <DMD.h>
-
DMD display(4, 2); // 4 panels wide, 2 panels high
+
DMD display(4, 2); // 4 panels wide, 2 panels high

Definition at line 28 of file DMD.h.

-

Constructor & Destructor Documentation

+

Constructor & Destructor Documentation

@@ -384,14 +442,14 @@ Multiple panels

Constructs a new dot matrix display handler for a display that is widthPanels x heightPanels in size.

-

Note: the parameters to this constructor are specified in panels, whereas width() and height() are specified in pixels.

-
See Also
width(), height()
+

Note: the parameters to this constructor are specified in panels, whereas width() and height() are specified in pixels.

+
See Also
width(), height()

Definition at line 237 of file DMD.cpp.

-

Member Function Documentation

+

Member Function Documentation

@@ -406,7 +464,7 @@ Multiple panels

Disables Timer1 overflow interrupts.

-
See Also
enableTimer1()
+
See Also
enableTimer1()

Definition at line 614 of file DMD.cpp.

@@ -426,7 +484,7 @@ Multiple panels

Disables Timer2 overflow interrupts.

-
See Also
enableTimer2()
+
See Also
enableTimer2()

Definition at line 674 of file DMD.cpp.

@@ -454,7 +512,7 @@ Multiple panels

Returns true if the display is double-buffered; false if single-buffered. The default is false.

-
See Also
setDoubleBuffer(), swapBuffers(), refresh()
+
See Also
setDoubleBuffer(), swapBuffers(), refresh()

Definition at line 34 of file DMD.h.

@@ -474,21 +532,21 @@ Multiple panels

Enables Timer1 overflow interrupts for updating this display.

-

The application must also provide an interrupt service routine for Timer1 that calls refresh():

+

The application must also provide an interrupt service routine for Timer1 that calls refresh():

#include <DMD.h>
-
DMD display;
+
DMD display;
ISR(TIMER1_OVF_vect)
{
-
display.refresh();
+
display.refresh();
}
void setup() {
-
display.enableTimer1();
+
display.enableTimer1();
}
-

If timer interrupts are being used to update the display, then it is unnecessary to call loop().

-
See Also
refresh(), disableTimer1(), enableTimer2(), setDoubleBuffer()
+

If timer interrupts are being used to update the display, then it is unnecessary to call loop().

+
See Also
refresh(), disableTimer1(), enableTimer2(), setDoubleBuffer()

Definition at line 563 of file DMD.cpp.

@@ -508,21 +566,21 @@ Multiple panels

Enables Timer2 overflow interrupts for updating this display.

-

The application must also provide an interrupt service routine for Timer2 that calls refresh():

+

The application must also provide an interrupt service routine for Timer2 that calls refresh():

#include <DMD.h>
-
DMD display;
+
DMD display;
ISR(TIMER2_OVF_vect)
{
-
display.refresh();
+
display.refresh();
}
void setup() {
-
display.enableTimer2();
+
display.enableTimer2();
}
-

If timer interrupts are being used to update the display, then it is unnecessary to call loop().

-
See Also
refresh(), disableTimer2(), enableTimer1(), setDoubleBuffer()
+

If timer interrupts are being used to update the display, then it is unnecessary to call loop().

+
See Also
refresh(), disableTimer2(), enableTimer1(), setDoubleBuffer()

Definition at line 646 of file DMD.cpp.

@@ -588,13 +646,13 @@ Multiple panels

Performs regular display refresh activities from the application's main loop.

-
DMD display;
+
DMD display;
-
void loop() {
-
display.loop();
+
void loop() {
+
display.loop();
}
-

If you are using a timer interrupt service routine, then call refresh() in response to the interrupt instead of calling loop().

-
See Also
refresh()
+

If you are using a timer interrupt service routine, then call refresh() in response to the interrupt instead of calling loop().

+
See Also
refresh()

Definition at line 420 of file DMD.cpp.

@@ -614,9 +672,9 @@ Multiple panels

Refresh the display.

-

This function must be called at least once every 5 milliseconds for smooth non-flickering update of the display. It is usually called by loop(), but can also be called in response to a timer interrupt.

-

If this function is called from an interrupt service routine, then it is recommended that double-buffering be enabled with setDoubleBuffer() to prevent "tearing" artifacts that result from simultaneous update of a single shared buffer.

-
See Also
loop(), setDoubleBuffer(), enableTimer1()
+

This function must be called at least once every 5 milliseconds for smooth non-flickering update of the display. It is usually called by loop(), but can also be called in response to a timer interrupt.

+

If this function is called from an interrupt service routine, then it is recommended that double-buffering be enabled with setDoubleBuffer() to prevent "tearing" artifacts that result from simultaneous update of a single shared buffer.

+
See Also
loop(), setDoubleBuffer(), enableTimer1()

Definition at line 478 of file DMD.cpp.

@@ -637,10 +695,10 @@ Multiple panels

Enables or disables double-buffering according to doubleBuffer.

-

When double-buffering is enabled, rendering operations are sent to a memory buffer that isn't currently displayed on-screen. Once the application has completed the screen update, it calls swapBuffers() to display the current buffer and switch rendering to the other now invisible buffer.

-

Double-buffering is recommended if refresh() is being called from an interrupt service routine, to prevent "tearing" artifacts that result from simultaneous update of a single shared buffer.

+

When double-buffering is enabled, rendering operations are sent to a memory buffer that isn't currently displayed on-screen. Once the application has completed the screen update, it calls swapBuffers() to display the current buffer and switch rendering to the other now invisible buffer.

+

Double-buffering is recommended if refresh() is being called from an interrupt service routine, to prevent "tearing" artifacts that result from simultaneous update of a single shared buffer.

This function will allocate memory for the extra buffer when doubleBuffer is true. If there is insufficient memory for the second screen buffer, then this class will revert to single-buffered mode.

-
See Also
doubleBuffer(), swapBuffers(), refresh()
+
See Also
doubleBuffer(), swapBuffers(), refresh()

Definition at line 314 of file DMD.cpp.

@@ -660,9 +718,9 @@ Multiple panels

Swaps the buffers that are used for rendering to the display.

-

When doubleBuffer() is false, this function does nothing. Otherwise the front and back rendering buffers are swapped. See the description of setDoubleBuffer() for more information.

-

The new rendering back buffer will have undefined contents and will probably need to be re-inialized with clear() or fill() before drawing to it. The swapBuffersAndCopy() function can be used instead to preserve the screen contents from one frame to the next.

-
See Also
swapBuffersAndCopy(), setDoubleBuffer()
+

When doubleBuffer() is false, this function does nothing. Otherwise the front and back rendering buffers are swapped. See the description of setDoubleBuffer() for more information.

+

The new rendering back buffer will have undefined contents and will probably need to be re-inialized with clear() or fill() before drawing to it. The swapBuffersAndCopy() function can be used instead to preserve the screen contents from one frame to the next.

+
See Also
swapBuffersAndCopy(), setDoubleBuffer()

Definition at line 363 of file DMD.cpp.

@@ -682,9 +740,9 @@ Multiple panels

Swaps the buffers that are used for rendering to the display and copies the former back buffer contents to the new back buffer.

-

Normally when swapBuffers() is called, the new rendering back buffer will have undefined contents from two frames prior and must be cleared with clear() or fill() before writing new contents to it. This function instead copies the previous frame into the new rendering buffer so that it can be updated in-place.

-

This function is useful if the screen does not change much from one frame to the next. If the screen changes a lot between frames, then it is usually better to explicitly clear() or fill() the new back buffer.

-
See Also
swapBuffers(), setDoubleBuffer()
+

Normally when swapBuffers() is called, the new rendering back buffer will have undefined contents from two frames prior and must be cleared with clear() or fill() before writing new contents to it. This function instead copies the previous frame into the new rendering buffer so that it can be updated in-place.

+

This function is useful if the screen does not change much from one frame to the next. If the screen changes a lot between frames, then it is usually better to explicitly clear() or fill() the new back buffer.

+
See Also
swapBuffers(), setDoubleBuffer()

Definition at line 396 of file DMD.cpp.

@@ -697,9 +755,9 @@ Multiple panels
diff --git a/classDS1307RTC-members.html b/classDS1307RTC-members.html index 047f055e..d06149a3 100644 --- a/classDS1307RTC-members.html +++ b/classDS1307RTC-members.html @@ -3,6 +3,7 @@ + ArduinoLibs: Member List @@ -29,7 +30,7 @@ - + @@ -111,9 +112,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); readTime(RTCTime *value)DS1307RTCvirtual RTC()RTC Saturday enum value (defined in RTC)RTC - Sunday enum value (defined in RTC)RTC + Sunday enum value (defined in RTC)RTC Thursday enum value (defined in RTC)RTC - Tuesday enum value (defined in RTC)RTC + Tuesday enum value (defined in RTC)RTC Wednesday enum value (defined in RTC)RTC WRAPRTCstatic writeAlarm(uint8_t alarmNum, const RTCAlarm *value)DS1307RTCvirtual @@ -124,9 +125,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classDS1307RTC.html b/classDS1307RTC.html index 38627ee4..8bcc043a 100644 --- a/classDS1307RTC.html +++ b/classDS1307RTC.html @@ -3,6 +3,7 @@ + ArduinoLibs: DS1307RTC Class Reference @@ -29,7 +30,7 @@ - + @@ -100,48 +101,62 @@ Inheritance diagram for DS1307RTC:
-RTC +RTC
- - + + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - - + + + - + + - + +

+

Public Member Functions

 DS1307RTC (I2CMaster &bus, uint8_t oneHzPin=255)
 Attaches to a realtime clock slave device on bus.
 Attaches to a realtime clock slave device on bus. More...
 
bool isRealTime () const
 Returns true if the realtime clock is on the I2C bus; false if the time and date are simulated.
 
bool hasUpdates ()
 Returns true if the realtime clock has updated since the last call to this function.
 Returns true if the realtime clock has updated since the last call to this function. More...
 
void readTime (RTCTime *value)
 Reads the current time from the realtime clock into value.
 Reads the current time from the realtime clock into value. More...
 
void readDate (RTCDate *value)
 Reads the current date from the realtime clock into value.
 Reads the current date from the realtime clock into value. More...
 
void writeTime (const RTCTime *value)
 Updates the time in the realtime clock to match value.
 Updates the time in the realtime clock to match value. More...
 
void writeDate (const RTCDate *value)
 Updates the date in the realtime clock to match value.
 Updates the date in the realtime clock to match value. More...
 
void readAlarm (uint8_t alarmNum, RTCAlarm *value)
 Reads the details of the alarm with index alarmNum into value.
 Reads the details of the alarm with index alarmNum into value. More...
 
void writeAlarm (uint8_t alarmNum, const RTCAlarm *value)
 Updates the details of the alarm with index alarmNum from value.
 Updates the details of the alarm with index alarmNum from value. More...
 
int byteCount () const
 Returns the number of bytes of non-volatile memory that can be used for storage of arbitrary settings, excluding storage used by alarms.
 Returns the number of bytes of non-volatile memory that can be used for storage of arbitrary settings, excluding storage used by alarms. More...
 
uint8_t readByte (uint8_t offset)
 Reads the byte at offset within the realtime clock's non-volatile memory.
 Reads the byte at offset within the realtime clock's non-volatile memory. More...
 
void writeByte (uint8_t offset, uint8_t value)
 Writes value to offset within the realtime clock's non-volatile memory.
- Public Member Functions inherited from RTC
 Writes value to offset within the realtime clock's non-volatile memory. More...
 
- Public Member Functions inherited from RTC
 RTC ()
 Constructs a new realtime clock handler.
 Constructs a new realtime clock handler. More...
 
virtual int readTemperature ()
 Reads the value of the temperature sensor and returns the temperature in quarters of a degree celcius.
 Reads the value of the temperature sensor and returns the temperature in quarters of a degree celcius. More...
 
- - +
} - + + - + + - + + - + + - - + + + - + + + - + + - + + +

+

Additional Inherited Members

- Public Types inherited from RTC
- Public Types inherited from RTC
enum  DayOfWeek {
-  Monday = 1, +  Monday = 1, Tuesday, Wednesday, Thursday, @@ -152,42 +167,52 @@ Additional Inherited Members
 Day of the week corresponding to a date. More...
- Static Public Member Functions inherited from RTC
 
- Static Public Member Functions inherited from RTC
static void adjustDays (RTCDate *date, uint8_t flags)
 Adjusts date up or down one day according to flags.
 Adjusts date up or down one day according to flags. More...
 
static void adjustMonths (RTCDate *date, uint8_t flags)
 Adjusts date up or down one month according to flags.
 Adjusts date up or down one month according to flags. More...
 
static void adjustYears (RTCDate *date, uint8_t flags)
 Adjusts date up or down one year according to flags.
 Adjusts date up or down one year according to flags. More...
 
static DayOfWeek dayOfWeek (const RTCDate *date)
 Returns the day of the week corresponding to date.
- Static Public Attributes inherited from RTC
 Returns the day of the week corresponding to date. More...
 
- Static Public Attributes inherited from RTC
static const uint8_t ALARM_COUNT = 4
 Number of alarms that are supported by RTC::readAlarm() and RTC::writeAlarm().
 Number of alarms that are supported by RTC::readAlarm() and RTC::writeAlarm().
 
static const int NO_TEMPERATURE = 32767
 Value that is returned from readTemperature() if the realtime clock chip cannot determine the temperature.
 
static const uint8_t INCREMENT = 0x0000
 Increment the day, month, or year in a call to adjustDays(), adjustMonths(), or adjustYears().
 Increment the day, month, or year in a call to adjustDays(), adjustMonths(), or adjustYears().
 
static const uint8_t DECREMENT = 0x0001
 Decrement the day, month, or year in a call to adjustDays(), adjustMonths(), or adjustYears().
 Decrement the day, month, or year in a call to adjustDays(), adjustMonths(), or adjustYears().
 
static const uint8_t WRAP = 0x0002
 Wrap around to the beginning of the current month/year rather than advance to the next one.
 
-

Detailed Description

+

Detailed Description

Communicates with a DS1307 realtime clock chip via I2C.

This class simplifies the process of reading and writing the time and date information in a DS1307 realtime clock chip. The class also provides support for reading and writing information about alarms and other clock settings.

-

If there is no DS1307 chip on the I2C bus, this class will fall back to the RTC class to simulate the current time and date based on the value of millis().

+

If there is no DS1307 chip on the I2C bus, this class will fall back to the RTC class to simulate the current time and date based on the value of millis().

The DS1307 uses a 2-digit year so this class is limited to dates between 2000 and 2099 inclusive.

Note: if this class has not been used with the DS1307 chip before, then the contents of NVRAM will be cleared. Any previous contents will be lost.

-
See Also
RTC, DS3232RTC
+
See Also
RTC, DS3232RTC

Definition at line 30 of file DS1307RTC.h.

-

Constructor & Destructor Documentation

+

Constructor & Destructor Documentation

@@ -213,14 +238,14 @@ static const uint8_t 

Attaches to a realtime clock slave device on bus.

-

If oneHzPin is not 255, then it indicates a digital input pin that is connected to the 1 Hz square wave output on the realtime clock. This input is used by hasUpdates() to determine if the time information has changed in a non-trivial manner.

-
See Also
hasUpdates()
+

If oneHzPin is not 255, then it indicates a digital input pin that is connected to the 1 Hz square wave output on the realtime clock. This input is used by hasUpdates() to determine if the time information has changed in a non-trivial manner.

+
See Also
hasUpdates()

Definition at line 83 of file DS1307RTC.cpp.

-

Member Function Documentation

+

Member Function Documentation

@@ -243,7 +268,7 @@ static const uint8_t 

Returns the number of bytes of non-volatile memory that can be used for storage of arbitrary settings, excluding storage used by alarms.

-
See Also
readByte(), writeByte()
+
See Also
readByte(), writeByte()

Reimplemented from RTC.

@@ -316,7 +341,7 @@ static const uint8_t Reads the details of the alarm with index alarmNum into value.

The alarmNum parameter must be between 0 and ALARM_COUNT - 1.

Alarm details are stored at the end of the realtime clock's non-volatile memory.

-
See Also
writeAlarm(), alarmCount()
+
See Also
writeAlarm(), alarmCount()

Reimplemented from RTC.

@@ -348,7 +373,7 @@ static const uint8_t Reads the byte at offset within the realtime clock's non-volatile memory.

The offset parameter must be between 0 and byteCount() - 1.

-
See Also
writeByte(), byteCount()
+
See Also
writeByte(), byteCount()

Reimplemented from RTC.

@@ -379,8 +404,8 @@ static const uint8_t 

Reads the current date from the realtime clock into value.

-

The time should be read first with readTime() as the default implementation only advances the date when the time is read and it crosses midnight.

-
See Also
writeDate(), readTime()
+

The time should be read first with readTime() as the default implementation only advances the date when the time is read and it crosses midnight.

+
See Also
writeDate(), readTime()

Reimplemented from RTC.

@@ -411,7 +436,7 @@ static const uint8_t 

Reads the current time from the realtime clock into value.

-
See Also
writeTime(), readDate()
+
See Also
writeTime(), readDate()

Reimplemented from RTC.

@@ -454,7 +479,7 @@ static const uint8_t Updates the details of the alarm with index alarmNum from value.

The alarmNum parameter must be between 0 and ALARM_COUNT - 1.

Alarm details are stored at the end of the realtime clock's non-volatile memory.

-
See Also
readAlarm(), alarmCount()
+
See Also
readAlarm(), alarmCount()

Reimplemented from RTC.

@@ -496,7 +521,7 @@ static const uint8_t Writes value to offset within the realtime clock's non-volatile memory.

The offset parameter must be between 0 and byteCount() - 1.

-
See Also
readByte(), byteCount()
+
See Also
readByte(), byteCount()

Reimplemented from RTC.

@@ -527,7 +552,7 @@ static const uint8_t 

Updates the date in the realtime clock to match value.

-
See Also
readDate(), writeTime()
+
See Also
readDate(), writeTime()

Reimplemented from RTC.

@@ -558,7 +583,7 @@ static const uint8_t 

Updates the time in the realtime clock to match value.

-
See Also
readTime(), writeDate()
+
See Also
readTime(), writeDate()

Reimplemented from RTC.

@@ -573,9 +598,9 @@ static const uint8_t  diff --git a/classDS3232RTC-members.html b/classDS3232RTC-members.html index 95ea6b36..373862f4 100644 --- a/classDS3232RTC-members.html +++ b/classDS3232RTC-members.html @@ -3,6 +3,7 @@ + ArduinoLibs: Member List @@ -29,7 +30,7 @@
- + @@ -103,11 +104,11 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); enable32kHzOutput()DS3232RTC enableAlarmInterrupts()DS3232RTC firedAlarm()DS3232RTC - Friday enum value (defined in RTC)RTC + Friday enum value (defined in RTC)RTC hasUpdates()DS3232RTCvirtual INCREMENTRTCstatic isRealTime() const DS3232RTCinline - Monday enum value (defined in RTC)RTC + Monday enum value (defined in RTC)RTC NO_TEMPERATURERTCstatic readAlarm(uint8_t alarmNum, RTCAlarm *value)DS3232RTCvirtual readByte(uint8_t offset)DS3232RTCvirtual @@ -115,23 +116,23 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); readTemperature()DS3232RTCvirtual readTime(RTCTime *value)DS3232RTCvirtual RTC()RTC - Saturday enum value (defined in RTC)RTC + Saturday enum value (defined in RTC)RTC Sunday enum value (defined in RTC)RTC - Thursday enum value (defined in RTC)RTC + Thursday enum value (defined in RTC)RTC Tuesday enum value (defined in RTC)RTC - Wednesday enum value (defined in RTC)RTC + Wednesday enum value (defined in RTC)RTC WRAPRTCstatic writeAlarm(uint8_t alarmNum, const RTCAlarm *value)DS3232RTCvirtual writeByte(uint8_t offset, uint8_t value)DS3232RTCvirtual writeDate(const RTCDate *value)DS3232RTCvirtual writeTime(const RTCTime *value)DS3232RTCvirtual - ~RTC() (defined in RTC)RTC + ~RTC() (defined in RTC)RTC
diff --git a/classDS3232RTC.html b/classDS3232RTC.html index 7068c425..ce2ca2c0 100644 --- a/classDS3232RTC.html +++ b/classDS3232RTC.html @@ -3,6 +3,7 @@ + ArduinoLibs: DS3232RTC Class Reference @@ -29,7 +30,7 @@
- + @@ -100,58 +101,77 @@ Inheritance diagram for DS3232RTC:
-RTC +RTC
- - + + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - - + + + - + +

+

Public Member Functions

 DS3232RTC (I2CMaster &bus, uint8_t oneHzPin=255)
 Attaches to a realtime clock slave device on bus.
 Attaches to a realtime clock slave device on bus. More...
 
bool isRealTime () const
 Returns true if the realtime clock is on the I2C bus; false if the time and date are simulated.
 
bool hasUpdates ()
 Returns true if the realtime clock has updated since the last call to this function.
 Returns true if the realtime clock has updated since the last call to this function. More...
 
void readTime (RTCTime *value)
 Reads the current time from the realtime clock into value.
 Reads the current time from the realtime clock into value. More...
 
void readDate (RTCDate *value)
 Reads the current date from the realtime clock into value.
 Reads the current date from the realtime clock into value. More...
 
void writeTime (const RTCTime *value)
 Updates the time in the realtime clock to match value.
 Updates the time in the realtime clock to match value. More...
 
void writeDate (const RTCDate *value)
 Updates the date in the realtime clock to match value.
 Updates the date in the realtime clock to match value. More...
 
void readAlarm (uint8_t alarmNum, RTCAlarm *value)
 Reads the details of the alarm with index alarmNum into value.
 Reads the details of the alarm with index alarmNum into value. More...
 
void writeAlarm (uint8_t alarmNum, const RTCAlarm *value)
 Updates the details of the alarm with index alarmNum from value.
 Updates the details of the alarm with index alarmNum from value. More...
 
int byteCount () const
 Returns the number of bytes of non-volatile memory that can be used for storage of arbitrary settings, excluding storage used by alarms.
 Returns the number of bytes of non-volatile memory that can be used for storage of arbitrary settings, excluding storage used by alarms. More...
 
uint8_t readByte (uint8_t offset)
 Reads the byte at offset within the realtime clock's non-volatile memory.
 Reads the byte at offset within the realtime clock's non-volatile memory. More...
 
void writeByte (uint8_t offset, uint8_t value)
 Writes value to offset within the realtime clock's non-volatile memory.
 Writes value to offset within the realtime clock's non-volatile memory. More...
 
int readTemperature ()
 Reads the value of the temperature sensor and returns the temperature in quarters of a degree celcius.
 Reads the value of the temperature sensor and returns the temperature in quarters of a degree celcius. More...
 
void enableAlarmInterrupts ()
 Enables the generation of interrupts for alarms 0 and 1.
 Enables the generation of interrupts for alarms 0 and 1. More...
 
void disableAlarmInterrupts ()
 Disables the generation of interrupts for alarms 0 and 1.
 Disables the generation of interrupts for alarms 0 and 1. More...
 
int firedAlarm ()
 Determines which of alarms 0 or 1 have fired since the last call.
 Determines which of alarms 0 or 1 have fired since the last call. More...
 
void enable32kHzOutput ()
 Enables the 32 kHz output on the DS3232 chip.
 Enables the 32 kHz output on the DS3232 chip. More...
 
void disable32kHzOutput ()
 Disables the 32 kHz output on the DS3232 chip.
- Public Member Functions inherited from RTC
 Disables the 32 kHz output on the DS3232 chip. More...
 
- Public Member Functions inherited from RTC
 RTC ()
 Constructs a new realtime clock handler.
 Constructs a new realtime clock handler. More...
 
- - +
} - + + - + + - + + - + + - - + + + - + + + - + + - + + +

+

Additional Inherited Members

- Public Types inherited from RTC
- Public Types inherited from RTC
enum  DayOfWeek {
-  Monday = 1, +  Monday = 1, Tuesday, Wednesday, Thursday, @@ -162,43 +182,53 @@ Additional Inherited Members
 Day of the week corresponding to a date. More...
- Static Public Member Functions inherited from RTC
 
- Static Public Member Functions inherited from RTC
static void adjustDays (RTCDate *date, uint8_t flags)
 Adjusts date up or down one day according to flags.
 Adjusts date up or down one day according to flags. More...
 
static void adjustMonths (RTCDate *date, uint8_t flags)
 Adjusts date up or down one month according to flags.
 Adjusts date up or down one month according to flags. More...
 
static void adjustYears (RTCDate *date, uint8_t flags)
 Adjusts date up or down one year according to flags.
 Adjusts date up or down one year according to flags. More...
 
static DayOfWeek dayOfWeek (const RTCDate *date)
 Returns the day of the week corresponding to date.
- Static Public Attributes inherited from RTC
 Returns the day of the week corresponding to date. More...
 
- Static Public Attributes inherited from RTC
static const uint8_t ALARM_COUNT = 4
 Number of alarms that are supported by RTC::readAlarm() and RTC::writeAlarm().
 Number of alarms that are supported by RTC::readAlarm() and RTC::writeAlarm().
 
static const int NO_TEMPERATURE = 32767
 Value that is returned from readTemperature() if the realtime clock chip cannot determine the temperature.
 
static const uint8_t INCREMENT = 0x0000
 Increment the day, month, or year in a call to adjustDays(), adjustMonths(), or adjustYears().
 Increment the day, month, or year in a call to adjustDays(), adjustMonths(), or adjustYears().
 
static const uint8_t DECREMENT = 0x0001
 Decrement the day, month, or year in a call to adjustDays(), adjustMonths(), or adjustYears().
 Decrement the day, month, or year in a call to adjustDays(), adjustMonths(), or adjustYears().
 
static const uint8_t WRAP = 0x0002
 Wrap around to the beginning of the current month/year rather than advance to the next one.
 
-

Detailed Description

+

Detailed Description

Communicates with a DS3232 realtime clock chip via I2C.

This class simplifies the process of reading and writing the time and date information in a DS3232 realtime clock chip. The class also provides support for reading and writing information about alarms and other clock settings.

-

If there is no DS3232 chip on the I2C bus, this class will fall back to the RTC class to simulate the current time and date based on the value of millis().

-

Alarms 0 and 1 can be set to generate an interrupt when they fire using enableAlarmInterrupts(). The firedAlarm() function can be used to determine which alarm has fired. Alarms 2 and 3 cannot be monitored with interrupts.

+

If there is no DS3232 chip on the I2C bus, this class will fall back to the RTC class to simulate the current time and date based on the value of millis().

+

Alarms 0 and 1 can be set to generate an interrupt when they fire using enableAlarmInterrupts(). The firedAlarm() function can be used to determine which alarm has fired. Alarms 2 and 3 cannot be monitored with interrupts.

The DS3232 uses a 2-digit year so this class is limited to dates between 2000 and 2099 inclusive.

Note: if this class has not been used with the DS3232 chip before, then the contents of NVRAM will be cleared. Any previous contents will be lost.

-
See Also
RTC, DS1307RTC
+
See Also
RTC, DS1307RTC

Definition at line 30 of file DS3232RTC.h.

-

Constructor & Destructor Documentation

+

Constructor & Destructor Documentation

@@ -224,15 +254,15 @@ static const uint8_t 

Attaches to a realtime clock slave device on bus.

-

If oneHzPin is not 255, then it indicates a digital input pin that is connected to the 1 Hz square wave output on the realtime clock. This input is used by hasUpdates() to determine if the time information has changed in a non-trivial manner.

-

If you wish to use enableAlarmInterrupts(), then oneHzPin must be 255.

-
See Also
hasUpdates(), enableAlarmInterrupts()
+

If oneHzPin is not 255, then it indicates a digital input pin that is connected to the 1 Hz square wave output on the realtime clock. This input is used by hasUpdates() to determine if the time information has changed in a non-trivial manner.

+

If you wish to use enableAlarmInterrupts(), then oneHzPin must be 255.

+
See Also
hasUpdates(), enableAlarmInterrupts()

Definition at line 126 of file DS3232RTC.cpp.

-

Member Function Documentation

+

Member Function Documentation

@@ -255,7 +285,7 @@ static const uint8_t 

Returns the number of bytes of non-volatile memory that can be used for storage of arbitrary settings, excluding storage used by alarms.

-
See Also
readByte(), writeByte()
+
See Also
readByte(), writeByte()

Reimplemented from RTC.

@@ -277,7 +307,7 @@ static const uint8_t 

Disables the 32 kHz output on the DS3232 chip.

-
See Also
enable32kHzOutput()
+
See Also
enable32kHzOutput()

Definition at line 458 of file DS3232RTC.cpp.

@@ -297,7 +327,7 @@ static const uint8_t 

Disables the generation of interrupts for alarms 0 and 1.

-
See Also
enableAlarmInterrupts()
+
See Also
enableAlarmInterrupts()

Definition at line 393 of file DS3232RTC.cpp.

@@ -317,7 +347,7 @@ static const uint8_t 

Enables the 32 kHz output on the DS3232 chip.

-
See Also
disable32kHzOutput()
+
See Also
disable32kHzOutput()

Definition at line 444 of file DS3232RTC.cpp.

@@ -337,9 +367,9 @@ static const uint8_t 

Enables the generation of interrupts for alarms 0 and 1.

-

When the interrupt occurs, use firedAlarm() to determine which alarm has fired. The application is responsible for implementing the interrupt service routine to watch for the interrupt.

-

Note: this function does nothing if the 1 Hz pin was enabled in the constructor, but firedAlarm() can still be used to determine which alarm has fired when hasUpdates() reports that there is an update available.

-
See Also
disableAlarmInterrupts(), firedAlarm()
+

When the interrupt occurs, use firedAlarm() to determine which alarm has fired. The application is responsible for implementing the interrupt service routine to watch for the interrupt.

+

Note: this function does nothing if the 1 Hz pin was enabled in the constructor, but firedAlarm() can still be used to determine which alarm has fired when hasUpdates() reports that there is an update available.

+
See Also
disableAlarmInterrupts(), firedAlarm()

Definition at line 380 of file DS3232RTC.cpp.

@@ -362,7 +392,7 @@ static const uint8_t Returns 0 if alarm 0 has fired, 1 if alarm 1 has fired, 2 if both alarms have fired, or -1 if neither alarm has fired.

The fired alarm state will be cleared, ready for the next call.

This function cannot be used to determine if alarms 2 or 3 have fired as they are stored in NVRAM and are not handled specially by the DS3232.

-
See Also
enableAlarmInterrupts()
+
See Also
enableAlarmInterrupts()

Definition at line 416 of file DS3232RTC.cpp.

@@ -433,7 +463,7 @@ static const uint8_t Reads the details of the alarm with index alarmNum into value.

The alarmNum parameter must be between 0 and ALARM_COUNT - 1.

Alarm details are stored at the end of the realtime clock's non-volatile memory.

-
See Also
writeAlarm(), alarmCount()
+
See Also
writeAlarm(), alarmCount()

Reimplemented from RTC.

@@ -465,7 +495,7 @@ static const uint8_t Reads the byte at offset within the realtime clock's non-volatile memory.

The offset parameter must be between 0 and byteCount() - 1.

-
See Also
writeByte(), byteCount()
+
See Also
writeByte(), byteCount()

Reimplemented from RTC.

@@ -496,8 +526,8 @@ static const uint8_t 

Reads the current date from the realtime clock into value.

-

The time should be read first with readTime() as the default implementation only advances the date when the time is read and it crosses midnight.

-
See Also
writeDate(), readTime()
+

The time should be read first with readTime() as the default implementation only advances the date when the time is read and it crosses midnight.

+
See Also
writeDate(), readTime()

Reimplemented from RTC.

@@ -558,7 +588,7 @@ static const uint8_t 

Reads the current time from the realtime clock into value.

-
See Also
writeTime(), readDate()
+
See Also
writeTime(), readDate()

Reimplemented from RTC.

@@ -601,7 +631,7 @@ static const uint8_t Updates the details of the alarm with index alarmNum from value.

The alarmNum parameter must be between 0 and ALARM_COUNT - 1.

Alarm details are stored at the end of the realtime clock's non-volatile memory.

-
See Also
readAlarm(), alarmCount()
+
See Also
readAlarm(), alarmCount()

Reimplemented from RTC.

@@ -643,7 +673,7 @@ static const uint8_t Writes value to offset within the realtime clock's non-volatile memory.

The offset parameter must be between 0 and byteCount() - 1.

-
See Also
readByte(), byteCount()
+
See Also
readByte(), byteCount()

Reimplemented from RTC.

@@ -674,7 +704,7 @@ static const uint8_t 

Updates the date in the realtime clock to match value.

-
See Also
readDate(), writeTime()
+
See Also
readDate(), writeTime()

Reimplemented from RTC.

@@ -705,7 +735,7 @@ static const uint8_t 

Updates the time in the realtime clock to match value.

-
See Also
readTime(), writeDate()
+
See Also
readTime(), writeDate()

Reimplemented from RTC.

@@ -720,9 +750,9 @@ static const uint8_t  diff --git a/classEEPROM24-members.html b/classEEPROM24-members.html index b037b485..2459b9a4 100644 --- a/classEEPROM24-members.html +++ b/classEEPROM24-members.html @@ -3,6 +3,7 @@ + ArduinoLibs: Member List @@ -29,7 +30,7 @@
- + @@ -100,9 +101,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classEEPROM24.html b/classEEPROM24.html index f9d908df..a115ac44 100644 --- a/classEEPROM24.html +++ b/classEEPROM24.html @@ -3,6 +3,7 @@ + ArduinoLibs: EEPROM24 Class Reference @@ -29,7 +30,7 @@
- + @@ -95,35 +96,43 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

#include <EEPROM24.h>

- - + + - + + - + + - + + - + + - + + - + + - + +

+

Public Member Functions

 EEPROM24 (I2CMaster &bus, unsigned long type, uint8_t bank=0)
 Constructs a new EEPROM access object on bus for an EEPROM of the specified type.
 Constructs a new EEPROM access object on bus for an EEPROM of the specified type. More...
 
unsigned long size () const
 Returns the size of the EEPROM in bytes.
 Returns the size of the EEPROM in bytes. More...
 
unsigned long pageSize () const
 Returns the size of a single EEPROM page in bytes.
 Returns the size of a single EEPROM page in bytes. More...
 
bool available ()
 Returns true if the EEPROM is available on the I2C bus; false otherwise.
 Returns true if the EEPROM is available on the I2C bus; false otherwise. More...
 
uint8_t read (unsigned long address)
 Reads a single byte from the EEPROM at address.
 Reads a single byte from the EEPROM at address. More...
 
size_t read (unsigned long address, void *data, size_t length)
 Reads a block of length bytes from the EEPROM at address into the specified data buffer.
 Reads a block of length bytes from the EEPROM at address into the specified data buffer. More...
 
bool write (unsigned long address, uint8_t value)
 Writes a byte value to address in the EEPROM.
 Writes a byte value to address in the EEPROM. More...
 
size_t write (unsigned long address, const void *data, size_t length)
 Writes length bytes from a data buffer to address in the EEPROM.
 Writes length bytes from a data buffer to address in the EEPROM. More...
 
-

Detailed Description

+

Detailed Description

Reading and writing EEPROM's from the 24LCXX family.

The 24LCXX family of EEPROM's provide a variety of memory sizes from 16 bytes up to 128 kBytes that can be accessed via the I2C protocol. These chips can be used to augment the 1 kByte or so of builtin EEPROM memory that is typical on Arduino boards. The EEPROM should be wired to an Arduino Uno as follows:

eeprom_circuit.png

Access to a 24LCXX chip is initialized as follows:

-
SoftI2C i2c(A4, A5);
-
EEPROM24 eeprom(i2c, EEPROM_24LC256);
-

Once initialized, read() and write() can be used to manipulate the contents of the EEPROM's memory.

+
SoftI2C i2c(A4, A5);
+
EEPROM24 eeprom(i2c, EEPROM_24LC256);
+

Once initialized, read() and write() can be used to manipulate the contents of the EEPROM's memory.

The following EEPROM types are supported by this class:

@@ -162,13 +171,13 @@ Public Member Functions
24lc1026EEPROM_24LC1026 128 kBytes

There can be multiple 24LCXX chips on the same I2C bus, as long as their A0, A1, and A2 address pins are set to different values. For example, two 24LC256 chips can be used to provide the same memory capacity as a single 24LC512 chip. The optional bank parameter to the constructor is used to assign different bank addresses to each chip:

-
SoftI2C i2c(A4, A5);
-
EEPROM24 eeprom0(i2c, EEPROM_24LC256, 0);
-
EEPROM24 eeprom1(i2c, EEPROM_24LC256, 1);
-
See Also
I2CMaster
+
SoftI2C i2c(A4, A5);
+
EEPROM24 eeprom0(i2c, EEPROM_24LC256, 0);
+
EEPROM24 eeprom1(i2c, EEPROM_24LC256, 1);
+
See Also
I2CMaster

Definition at line 60 of file EEPROM24.h.

-

Constructor & Destructor Documentation

+

Constructor & Destructor Documentation

@@ -206,7 +215,7 @@ Public Member Functions
-

Member Function Documentation

+

Member Function Documentation

@@ -222,7 +231,7 @@ Public Member Functions

Returns true if the EEPROM is available on the I2C bus; false otherwise.

This function can be used to probe the I2C bus to determine if the EEPROM is present or not.

-
See Also
read(), write()
+
See Also
read(), write()

Definition at line 152 of file EEPROM24.cpp.

@@ -251,7 +260,7 @@ Public Member Functions

Returns the size of a single EEPROM page in bytes.

Writes that are a multiple of the page size and aligned on a page boundary will typically be more efficient than non-aligned writes.

-
See Also
size()
+
See Also
size()

Definition at line 66 of file EEPROM24.h.

@@ -272,7 +281,7 @@ Public Member Functions

Reads a single byte from the EEPROM at address.

-
See Also
write()
+
See Also
write()

Definition at line 167 of file EEPROM24.cpp.

@@ -309,8 +318,8 @@ Public Member Functions

Reads a block of length bytes from the EEPROM at address into the specified data buffer.

-

Returns the number of bytes that were read, which may be short if address + length is greater than size() or the EEPROM is not available on the I2C bus.

-
See Also
write(), available()
+

Returns the number of bytes that were read, which may be short if address + length is greater than size() or the EEPROM is not available on the I2C bus.

+
See Also
write(), available()

Definition at line 187 of file EEPROM24.cpp.

@@ -338,7 +347,7 @@ Public Member Functions

Returns the size of the EEPROM in bytes.

-
See Also
pageSize()
+
See Also
pageSize()

Definition at line 65 of file EEPROM24.h.

@@ -370,7 +379,7 @@ Public Member Functions

Writes a byte value to address in the EEPROM.

Returns true if the byte was written successfully, or false if address is out of range or the EEPROM is not available on the I2C bus.

-
See Also
read(), available()
+
See Also
read(), available()

Definition at line 213 of file EEPROM24.cpp.

@@ -407,9 +416,9 @@ Public Member Functions

Writes length bytes from a data buffer to address in the EEPROM.

-

Returns the number of bytes that were written, which may be short if address + length is greater than size() or the EEPROM is not available on the I2C bus.

-

Best performance will be achieved if address and length are a multiple of pageSize().

-
See Also
read(), available(), pageSize()
+

Returns the number of bytes that were written, which may be short if address + length is greater than size() or the EEPROM is not available on the I2C bus.

+

Best performance will be achieved if address and length are a multiple of pageSize().

+
See Also
read(), available(), pageSize()

Definition at line 235 of file EEPROM24.cpp.

@@ -422,9 +431,9 @@ Public Member Functions
diff --git a/classField-members.html b/classField-members.html index 3c94db79..6b3f2c82 100644 --- a/classField-members.html +++ b/classField-members.html @@ -3,6 +3,7 @@ + ArduinoLibs: Member List @@ -29,7 +30,7 @@
- + @@ -95,7 +96,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); Field(const String &label)Fieldexplicit Field(Form &form, const String &label)Field form() const Fieldinline - Form (defined in Field)Fieldfriend + Form (defined in Field)Fieldfriend isCurrent() const Field label() const Fieldinline lcd() const Fieldinlineprotected @@ -105,9 +106,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classField.html b/classField.html index efefc82a..969353ec 100644 --- a/classField.html +++ b/classField.html @@ -3,6 +3,7 @@ + ArduinoLibs: Field Class Reference @@ -29,7 +30,7 @@
- + @@ -92,7 +93,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
-

Manages a single data input/output field within a Form. +

Manages a single data input/output field within a Form. More...

#include <Field.h>

@@ -102,58 +103,71 @@ Inheritance diagram for Field:
-BoolField -IntField -ListField -TextField -TimeField +BoolField +IntField +ListField +TextField +TimeField
- - + + + - + + - + + - + + - + + - + + - + + - + + - + +

+

Public Member Functions

 Field (const String &label)
 Constructs a new field with a specific label.
 Constructs a new field with a specific label. More...
 
 Field (Form &form, const String &label)
 Constructs a new field with a specific label and attaches it to a form.
 
 ~Field ()
 Destroys this field and removes it from its owning Form.
 Destroys this field and removes it from its owning Form. More...
 
Formform () const
 Returns the Form that owns this field; null if not associated with a Form.
 Returns the Form that owns this field; null if not associated with a Form.
 
virtual int dispatch (int event)
 Dispatches event via this field.
 Dispatches event via this field. More...
 
virtual void enterField (bool reverse)
 Enters the field due to form navigation.
 Enters the field due to form navigation. More...
 
virtual void exitField ()
 Exits the field due to form navigation.
 Exits the field due to form navigation. More...
 
const String & label () const
 Returns the label to display in the first line of this field.
 Returns the label to display in the first line of this field. More...
 
void setLabel (const String &label)
 Sets the label to display in the first line of this field.
 Sets the label to display in the first line of this field. More...
 
bool isCurrent () const
 Returns true if this field is the currently-displayed field in its owning form; false otherwise.
 Returns true if this field is the currently-displayed field in its owning form; false otherwise. More...
 
- - + + - + +

+

Protected Member Functions

LiquidCrystal * lcd () const
 Returns the LCD that this field is being drawn on.
 Returns the LCD that this field is being drawn on.
 
virtual void updateCursor ()
 Updates the cursor position after the label has been drawn by setLabel().
 Updates the cursor position after the label has been drawn by setLabel(). More...
 
- +

+

Friends

class Form
 
-

Detailed Description

-

Manages a single data input/output field within a Form.

-
See Also
Form, BoolField, IntField, ListField, TextField, TimeField
+

Detailed Description

+

Manages a single data input/output field within a Form.

+
See Also
Form, BoolField, IntField, ListField, TextField, TimeField

Definition at line 28 of file Field.h.

-

Constructor & Destructor Documentation

+

Constructor & Destructor Documentation

@@ -177,8 +191,8 @@ class Form

Constructs a new field with a specific label.

-

The field is initially not associated with a Form. The field can be added to a form later using Form::addField().

-
See Also
Form::addField()
+

The field is initially not associated with a Form. The field can be added to a form later using Form::addField().

+
See Also
Form::addField()

Definition at line 40 of file Field.cpp.

@@ -197,14 +211,14 @@ class Form
-

Destroys this field and removes it from its owning Form.

-
See Also
Form::removeField()
+

Destroys this field and removes it from its owning Form.

+
See Also
Form::removeField()

Definition at line 66 of file Field.cpp.

-

Member Function Documentation

+

Member Function Documentation

@@ -228,11 +242,11 @@ class Form

Dispatches event via this field.

-

The event is usually obtained from LCD::getButton().

+

The event is usually obtained from LCD::getButton().

Returns zero if the event has been handled and no further action is required.

Returns FORM_CHANGED if the event has changed the value of this field in a manner that may require the application to take further action based on the new field value.

-

Returns -1 if the event is not handled by this field, and should be handled by the Form itself (particularly for Left and Right buttons). The default implementation returns -1 for all events.

-
See Also
Form::dispatch(), LCD::getButton()
+

Returns -1 if the event is not handled by this field, and should be handled by the Form itself (particularly for Left and Right buttons). The default implementation returns -1 for all events.

+
See Also
Form::dispatch(), LCD::getButton()

Reimplemented in ListField, TimeField, IntField, and BoolField.

@@ -265,8 +279,8 @@ class Form

Enters the field due to form navigation.

This function is typically called when the user presses Left and Right buttons to navigate to the field. If reverse is true, then navigation was due to the Left button being pressed.

This function can assume that the display has been cleared and the cursor is positioned at (0, 0).

-

The default implementation prints the label().

-
See Also
exitField()
+

The default implementation prints the label().

+
See Also
exitField()

Reimplemented in ListField, TimeField, IntField, BoolField, and TextField.

@@ -297,7 +311,7 @@ class Form

Exits the field due to form navigation.

This function is typically called when the user presses Left and Right buttons to navigate from the field.

-
See Also
enterField()
+
See Also
enterField()

Reimplemented in TimeField.

@@ -347,7 +361,7 @@ class Form

Returns the label to display in the first line of this field.

-
See Also
setLabel()
+
See Also
setLabel()

Definition at line 41 of file Field.h.

@@ -368,7 +382,7 @@ class Form

Sets the label to display in the first line of this field.

-
See Also
label()
+
See Also
label()

Definition at line 146 of file Field.cpp.

@@ -395,9 +409,9 @@ class Form
-

Updates the cursor position after the label has been drawn by setLabel().

-

The default implementation does nothing. Subclasses that use an LCD cursor may override this to ensure that the cursor position stays valid after the label is modified.

-
See Also
setLabel()
+

Updates the cursor position after the label has been drawn by setLabel().

+

The default implementation does nothing. Subclasses that use an LCD cursor may override this to ensure that the cursor position stays valid after the label is modified.

+
See Also
setLabel()

Definition at line 191 of file Field.cpp.

@@ -410,9 +424,9 @@ class Form
diff --git a/classForm-members.html b/classForm-members.html index cee8afd3..8dadfe98 100644 --- a/classForm-members.html +++ b/classForm-members.html @@ -3,6 +3,7 @@ + ArduinoLibs: Member List @@ -29,7 +30,7 @@
- + @@ -93,7 +94,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); currentField() const Forminline defaultField()Form dispatch(int event)Form - Field (defined in Form)Formfriend + Field (defined in Form)Formfriend Form(LiquidCrystal &lcd)Formexplicit hide()Form isCurrent(Field &field) const Forminline @@ -107,9 +108,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classForm.html b/classForm.html index c3c76351..a0d8ae2e 100644 --- a/classForm.html +++ b/classForm.html @@ -3,6 +3,7 @@ + ArduinoLibs: Form Class Reference @@ -29,7 +30,7 @@
- + @@ -96,49 +97,64 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

#include <Form.h>

- - + + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + +

+

Public Member Functions

 Form (LiquidCrystal &lcd)
 Constructs a new form and associates it with lcd.
 Constructs a new form and associates it with lcd. More...
 
 ~Form ()
 Detaches all remaining fields and destroys this form.
 
int dispatch (int event)
 Dispatches event to the currently active field using Field::dispatch().
 Dispatches event to the currently active field using Field::dispatch(). More...
 
void nextField ()
 Changes to the next field in the "tab order".
 Changes to the next field in the "tab order". More...
 
void prevField ()
 Changes to the previous field in the "tab order".
 Changes to the previous field in the "tab order". More...
 
void defaultField ()
 Changes to default field (i.e., the first field).
 Changes to default field (i.e., the first field). More...
 
void addField (Field *field)
 Adds field to this form.
 Adds field to this form. More...
 
void removeField (Field *field)
 Removes field from this form.
 Removes field from this form. More...
 
FieldcurrentField () const
 Returns the current field that is displayed on-screen.
 Returns the current field that is displayed on-screen. More...
 
void setCurrentField (Field *field)
 Sets the current field that is displayed on-screen.
 Sets the current field that is displayed on-screen. More...
 
bool isCurrent (Field &field) const
 Returns true if field is currently displayed on-screen, false otherwise.
 Returns true if field is currently displayed on-screen, false otherwise. More...
 
void show ()
 Shows the form, or does nothing if the form is already on-screen.
 Shows the form, or does nothing if the form is already on-screen. More...
 
void hide ()
 Hides the form, or does nothing if the form is not on-screen.
 Hides the form, or does nothing if the form is not on-screen. More...
 
bool isVisible () const
 Returns true if the form is shown; false if the form is hidden.
 Returns true if the form is shown; false if the form is hidden. More...
 
- +

+

Friends

class Field
 
-

Detailed Description

+

Detailed Description

Manager for a form containing data input/output fields.

See the Form example for more information on creating an application that uses forms and fields.

Definition at line 32 of file Form.h.

-

Constructor & Destructor Documentation

+

Constructor & Destructor Documentation

@@ -162,9 +178,9 @@ class Field

Constructs a new form and associates it with lcd.

-

This constructor is typically followed by calls to construct Field values for each of the fields on the form. For example:

-
Form mainForm(lcd);
-
TextField welcomeField(mainForm, "Form example", "v1.0");
+

This constructor is typically followed by calls to construct Field values for each of the fields on the form. For example:

+
Form mainForm(lcd);
+
TextField welcomeField(mainForm, "Form example", "v1.0");
FormText.png
@@ -173,7 +189,7 @@ class Field
-

Member Function Documentation

+

Member Function Documentation

@@ -190,7 +206,7 @@ class Field

Adds field to this form.

Usually this function is not required because the field's constructor will add the field to the form automatically.

-
See Also
removeField()
+
See Also
removeField()

Definition at line 165 of file Form.cpp.

@@ -218,8 +234,8 @@ class Field

Returns the current field that is displayed on-screen.

-

Returns null if the form has no fields, or setCurrentField() explicitly set the current field to null.

-
See Also
setCurrentField(), isCurrent()
+

Returns null if the form has no fields, or setCurrentField() explicitly set the current field to null.

+
See Also
setCurrentField(), isCurrent()

Definition at line 46 of file Form.h.

@@ -239,7 +255,7 @@ class Field

Changes to default field (i.e., the first field).

-
See Also
nextField(), prevField(), currentField()
+
See Also
nextField(), prevField(), currentField()

Definition at line 152 of file Form.cpp.

@@ -259,11 +275,11 @@ class Field
-

Dispatches event to the currently active field using Field::dispatch().

-

The event is usually obtained from LCD::getButton().

+

Dispatches event to the currently active field using Field::dispatch().

+

The event is usually obtained from LCD::getButton().

Returns zero if the event has been handled and no further action is required.

-

Returns FORM_CHANGED if one of the fields on the form has changed value due to the event, perhaps requiring the application to take further action based on the new field value. Use currentField() or isCurrent() to determine which field has changed.

-
int event = lcd.getButton();
+

Returns FORM_CHANGED if one of the fields on the form has changed value due to the event, perhaps requiring the application to take further action based on the new field value. Use currentField() or isCurrent() to determine which field has changed.

+
int event = lcd.getButton();
if (mainForm.dispatch(event) == FORM_CHANGED) {
if (mainForm.isCurrent(volumeField)) {
// Adjust the volume to match the field.
@@ -271,7 +287,7 @@ class Field
}
}

This function handles the Left and Right buttons to navigate between fields.

-
See Also
Field::dispatch(), LCD::getButton(), currentField(), isCurrent()
+
See Also
Field::dispatch(), LCD::getButton(), currentField(), isCurrent()

Definition at line 99 of file Form.cpp.

@@ -292,7 +308,7 @@ class Field

Hides the form, or does nothing if the form is not on-screen.

The screen will be cleared to remove the contents of the current field.

-
See Also
show(), isVisible()
+
See Also
show(), isVisible()

Definition at line 293 of file Form.cpp.

@@ -321,8 +337,8 @@ class Field

Returns true if field is currently displayed on-screen, false otherwise.

-

This function is typically called after dispatch() returns FORM_CHANGED to determine which field has changed.

-
See Also
currentField(), setCurrentField()
+

This function is typically called after dispatch() returns FORM_CHANGED to determine which field has changed.

+
See Also
currentField(), setCurrentField()

Definition at line 49 of file Form.h.

@@ -350,7 +366,7 @@ class Field

Returns true if the form is shown; false if the form is hidden.

-
See Also
show(), hide()
+
See Also
show(), hide()

Definition at line 53 of file Form.h.

@@ -370,7 +386,7 @@ class Field

Changes to the next field in the "tab order".

-
See Also
prevField(), defaultField(), currentField()
+
See Also
prevField(), defaultField(), currentField()

Definition at line 118 of file Form.cpp.

@@ -390,7 +406,7 @@ class Field

Changes to the previous field in the "tab order".

-
See Also
nextField(), defaultField(), currentField()
+
See Also
nextField(), defaultField(), currentField()

Definition at line 135 of file Form.cpp.

@@ -412,7 +428,7 @@ class Field

Removes field from this form.

If field is the current field on-screen, then either the next or previous field will be made current.

-
See Also
addField()
+
See Also
addField()

Definition at line 187 of file Form.cpp.

@@ -434,7 +450,7 @@ class Field

Sets the current field that is displayed on-screen.

Use this function to programmatically force the form to display a specific field on-screen.

-
See Also
currentField(), isCurrent()
+
See Also
currentField(), isCurrent()

Definition at line 230 of file Form.cpp.

@@ -454,9 +470,9 @@ class Field

Shows the form, or does nothing if the form is already on-screen.

-

When the form is shown, the screen will be cleared and the currentField() will be drawn.

-

If the form was previously hidden, then the field that was previously current will be shown again. Call defaultField() before show() to reset the form to show the first field instead.

-
See Also
hide(), isVisible(), defaultField()
+

When the form is shown, the screen will be cleared and the currentField() will be drawn.

+

If the form was previously hidden, then the field that was previously current will be shown again. Call defaultField() before show() to reset the form to show the first field instead.

+
See Also
hide(), isVisible(), defaultField()

Definition at line 274 of file Form.cpp.

@@ -469,9 +485,9 @@ class Field
diff --git a/classHash-members.html b/classHash-members.html new file mode 100644 index 00000000..816bbdc9 --- /dev/null +++ b/classHash-members.html @@ -0,0 +1,109 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
Hash Member List
+
+
+ +

This is the complete list of members for Hash, including all inherited members.

+ + + + + + + + + +
blockSize() const =0Hashpure virtual
clear()=0Hashpure virtual
finalize(void *hash, size_t len)=0Hashpure virtual
Hash()Hash
hashSize() const =0Hashpure virtual
reset()=0Hashpure virtual
update(const void *data, size_t len)=0Hashpure virtual
~Hash()Hashvirtual
+ + + + diff --git a/classHash.html b/classHash.html new file mode 100644 index 00000000..2f37a23c --- /dev/null +++ b/classHash.html @@ -0,0 +1,393 @@ + + + + + + +ArduinoLibs: Hash Class Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
Hash Class Referenceabstract
+
+
+ +

Abstract base class for cryptographic hash algorithms. + More...

+ +

#include <Hash.h>

+
+Inheritance diagram for Hash:
+
+
+ + +BLAKE2s +SHA1 +SHA256 + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Hash ()
 Constructs a new hash object.
 
virtual ~Hash ()
 Destroys this hash object. More...
 
virtual size_t hashSize () const =0
 Size of the hash result from finalize(). More...
 
virtual size_t blockSize () const =0
 Size of the internal block used by the hash algorithm. More...
 
virtual void reset ()=0
 Resets the hash ready for a new hashing process. More...
 
virtual void update (const void *data, size_t len)=0
 Updates the hash with more data. More...
 
virtual void finalize (void *hash, size_t len)=0
 Finalizes the hashing process and returns the hash. More...
 
virtual void clear ()=0
 Clears the hash state, removing all sensitive data, and then resets the hash ready for a new hashing process. More...
 
+

Detailed Description

+

Abstract base class for cryptographic hash algorithms.

+
See Also
SHA1, SHA256
+ +

Definition at line 29 of file Hash.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + +
Hash::~Hash ()
+
+virtual
+
+ +

Destroys this hash object.

+
Note
Subclasses are responsible for clearing any sensitive data that remains in the hash object when it is destroyed.
+
See Also
clear()
+ +

Definition at line 47 of file Hash.cpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
size_t Hash::blockSize () const
+
+pure virtual
+
+ +

Size of the internal block used by the hash algorithm.

+
See Also
update(), hashSize()
+ +

Implemented in BLAKE2s, SHA1, and SHA256.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void Hash::clear ()
+
+pure virtual
+
+ +

Clears the hash state, removing all sensitive data, and then resets the hash ready for a new hashing process.

+
See Also
reset()
+ +

Implemented in BLAKE2s, SHA1, and SHA256.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void Hash::finalize (void * hash,
size_t len 
)
+
+pure virtual
+
+ +

Finalizes the hashing process and returns the hash.

+
Parameters
+ + + +
hashThe buffer to return the hash value in.
lenThe length of the hash buffer, normally hashSize().
+
+
+

If len is less than hashSize(), then the hash value will be truncated to the first len bytes. If len is greater than hashSize(), then the remaining bytes will left unchanged.

+

If finalize() is called again, the same hash value is returned again until the next call to reset() or update().

+
See Also
reset(), update()
+ +

Implemented in BLAKE2s, SHA1, and SHA256.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
size_t Hash::hashSize () const
+
+pure virtual
+
+ +

Size of the hash result from finalize().

+
See Also
finalize(), blockSize()
+ +

Implemented in BLAKE2s, SHA1, and SHA256.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void Hash::reset ()
+
+pure virtual
+
+ +

Resets the hash ready for a new hashing process.

+
See Also
update(), finalize()
+ +

Implemented in BLAKE2s, SHA1, and SHA256.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void Hash::update (const void * data,
size_t len 
)
+
+pure virtual
+
+ +

Updates the hash with more data.

+
Parameters
+ + + +
dataData to be hashed.
lenNumber of bytes of data to be hashed.
+
+
+

If finalize() has already been called, then calling update() will reset() the hash and start a new hashing process.

+
See Also
reset(), finalize()
+ +

Implemented in BLAKE2s, SHA1, and SHA256.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/classHash.png b/classHash.png new file mode 100644 index 00000000..81ca9b76 Binary files /dev/null and b/classHash.png differ diff --git a/classI2CMaster-members.html b/classI2CMaster-members.html index ccc4e238..9b8d9956 100644 --- a/classI2CMaster-members.html +++ b/classI2CMaster-members.html @@ -3,6 +3,7 @@ + ArduinoLibs: Member List @@ -29,7 +30,7 @@
- + @@ -99,9 +100,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classI2CMaster.html b/classI2CMaster.html index 75fc5de9..a6d7fb56 100644 --- a/classI2CMaster.html +++ b/classI2CMaster.html @@ -3,6 +3,7 @@ + ArduinoLibs: I2CMaster Class Reference @@ -29,7 +30,7 @@
- + @@ -86,7 +87,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); Public Member Functions | List of all members
-
I2CMaster Class Reference
+
I2CMaster Class Referenceabstract
@@ -100,34 +101,41 @@ Inheritance diagram for I2CMaster:
-SoftI2C +SoftI2C
- + - + + - + + - + + - + + - + + - + +

+

Public Member Functions

virtual unsigned int maxTransferSize () const =0
 Returns the maximum number of bytes that can be read or written in a single request by this bus master.
 
virtual void startWrite (unsigned int address)
 Starts a write operation by sending a start condition and the I2C control byte.
 Starts a write operation by sending a start condition and the I2C control byte. More...
 
virtual void write (uint8_t value)=0
 Writes a single byte value on the I2C bus.
 Writes a single byte value on the I2C bus. More...
 
virtual bool endWrite ()=0
 Ends the current write operation.
 Ends the current write operation. More...
 
virtual bool startRead (unsigned int address, unsigned int count)=0
 Starts a read operation for count bytes by sending the start condition and the I2C control byte.
 Starts a read operation for count bytes by sending the start condition and the I2C control byte. More...
 
virtual unsigned int available ()=0
 Returns the number of bytes that are still available for reading.
 Returns the number of bytes that are still available for reading. More...
 
virtual uint8_t read ()=0
 Reads a single byte from the I2C bus.
 Reads a single byte from the I2C bus. More...
 
-

Detailed Description

+

Detailed Description

Abstract base class for I2C master implementations.

-
See Also
SoftI2C
+
See Also
SoftI2C

Definition at line 28 of file I2CMaster.h.

-

Member Function Documentation

+

Member Function Documentation

@@ -150,7 +158,7 @@ virtual unsigned int 

Returns the number of bytes that are still available for reading.

-
See Also
startRead(), read()
+
See Also
startRead(), read()

Implemented in SoftI2C.

@@ -179,7 +187,7 @@ virtual unsigned int Ends the current write operation.

Returns true if the write operation was acknowledged; false otherwise.

-
See Also
startWrite(), write()
+
See Also
startWrite(), write()

Implemented in SoftI2C.

@@ -207,7 +215,7 @@ virtual unsigned int 

Reads a single byte from the I2C bus.

-
See Also
startRead(), available()
+
See Also
startRead(), available()

Implemented in SoftI2C.

@@ -247,8 +255,8 @@ virtual unsigned int Starts a read operation for count bytes by sending the start condition and the I2C control byte.

The address must be the 7-bit or 10-bit address of the I2C slave on the bus.

-

Returns true if the read request was acknowledged by the I2C slave or false otherwise. If true, this function should be followed by count calls to read() to fetch the bytes.

-
See Also
available(), read(), startWrite()
+

Returns true if the read request was acknowledged by the I2C slave or false otherwise. If true, this function should be followed by count calls to read() to fetch the bytes.

+
See Also
available(), read(), startWrite()

Implemented in SoftI2C.

@@ -278,7 +286,7 @@ virtual unsigned int Starts a write operation by sending a start condition and the I2C control byte.

The address must be the 7-bit or 10-bit address of the I2C slave on the bus.

-
See Also
write(), endWrite(), startRead()
+
See Also
write(), endWrite(), startRead()

Reimplemented in SoftI2C.

@@ -307,7 +315,7 @@ virtual unsigned int 

Writes a single byte value on the I2C bus.

-
See Also
startWrite(), endWrite()
+
See Also
startWrite(), endWrite()

Implemented in SoftI2C.

@@ -320,9 +328,9 @@ virtual unsigned int  diff --git a/classIRreceiver-members.html b/classIRreceiver-members.html index baa5d5de..8d2595eb 100644 --- a/classIRreceiver-members.html +++ b/classIRreceiver-members.html @@ -3,6 +3,7 @@ + ArduinoLibs: Member List @@ -29,7 +30,7 @@
- + @@ -89,7 +90,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

This is the complete list of members for IRreceiver, including all inherited members.

- + @@ -99,9 +100,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
_IR_receive_interrupt (defined in IRreceiver)IRreceiverfriend
_IR_receive_interrupt (defined in IRreceiver)IRreceiverfriend
AUTO_REPEATIRreceiverstatic
command()IRreceiver
IRreceiver(int interruptNumber=0)IRreceiverexplicit
diff --git a/classIRreceiver.html b/classIRreceiver.html index c9dc8138..dc1bf608 100644 --- a/classIRreceiver.html +++ b/classIRreceiver.html @@ -3,6 +3,7 @@ + ArduinoLibs: IRreceiver Class Reference @@ -29,7 +30,7 @@
- + @@ -97,47 +98,54 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

#include <IRreceiver.h>

- + - + + - + + - + + - + +

+

Public Member Functions

 IRreceiver (int interruptNumber=0)
 Constructs a new infrared remote control receiver that is attached to interruptNumber.
 
int command ()
 Returns the next command from the remote control.
 Returns the next command from the remote control. More...
 
int system () const
 Returns the system number of the previous command(), indicating whether the command was for a TV, VCR, CD player, etc.
 Returns the system number of the previous command(), indicating whether the command was for a TV, VCR, CD player, etc. More...
 
int systemFilter () const
 Returns the system to filter commands against, or -1 if no filter is set.
 Returns the system to filter commands against, or -1 if no filter is set. More...
 
void setSystemFilter (int system)
 Sets the system to filter commands against, or -1 to turn off the system filter.
 Sets the system to filter commands against, or -1 to turn off the system filter. More...
 
- - + +

+

Static Public Attributes

static const int AUTO_REPEAT = 128
 Flag that is added to the output of command() when the command is an auto-repeated button press rather than the original button press.
 Flag that is added to the output of command() when the command is an auto-repeated button press rather than the original button press.
 
- +

+

Friends

void _IR_receive_interrupt (void)
 
-

Detailed Description

+

Detailed Description

Manages the reception of RC-5 commands from an infrared remote control.

-

IRreceiver recognizes commands in the Philips RC-5 protocol. This is a fairly common infrared protocol, supported by most universal remote controls. Program the universal remote to simulate a Philips TV, VCR, CD player, etc.

+

IRreceiver recognizes commands in the Philips RC-5 protocol. This is a fairly common infrared protocol, supported by most universal remote controls. Program the universal remote to simulate a Philips TV, VCR, CD player, etc.

This class uses interrupts to process incoming bits from a standard 3-pin infrared receiver:

irchip.jpg

Typically, pin 1 of the receiver should be connected to the Arduino interrupt pin (e.g. D2), pin 2 should be connected to GND, and pin 3 should be connected to 5V. Consult the datasheet for your receiver to be sure though; some receivers may have different pin assignments.

-

The receiver is initialized by constructing an instance of the IRreceiver class:

-
+

The receiver is initialized by constructing an instance of the IRreceiver class:

+

By default, interrupt 0 on pin D2 is used. To change to another interrupt, pass its number to the constructor:

-
IRreceiver ir(1); // Interrupt 1 on pin D3
-

Currently this class can only handle a single instance of IRreceiver being active in the application. It isn't possible to have separate IRreceiver instances on different pins. Usually this won't be a problem because the same receiver can process inputs from multiple remotes.

-

The application retrieves incoming infrared commands by calling the command() function. The return value indicates the type of command:

+
IRreceiver ir(1); // Interrupt 1 on pin D3
+

Currently this class can only handle a single instance of IRreceiver being active in the application. It isn't possible to have separate IRreceiver instances on different pins. Usually this won't be a problem because the same receiver can process inputs from multiple remotes.

+

The application retrieves incoming infrared commands by calling the command() function. The return value indicates the type of command:

void loop() {
-
switch (ir.command()) {
+
switch (ir.command()) {
case RC5_0: case RC5_1: case RC5_2: case RC5_3: case RC5_4:
case RC5_5: case RC5_6: case RC5_7: case RC5_8: case RC5_9:
// Process a digit
@@ -155,9 +163,9 @@ void _IR_receive_interrupt
break;
}
}
-

If the command is an auto-repeat of a previous button press, then the AUTO_REPEAT flag will be set in the value returned from command(). The application can choose to ignore all auto-repeats, process all auto-repeats, or choose which button to auto-repeat based on its code:

+

If the command is an auto-repeat of a previous button press, then the AUTO_REPEAT flag will be set in the value returned from command(). The application can choose to ignore all auto-repeats, process all auto-repeats, or choose which button to auto-repeat based on its code:

void loop() {
-
switch (ir.command()) {
+
switch (ir.command()) {
case RC5_INC_VOLUME:
case IRreceiver::AUTO_REPEAT | RC5_INC_VOLUME:
// Volume increase button pressed or held.
@@ -176,10 +184,10 @@ void _IR_receive_interrupt
break;
}
}
-

By default, command codes will be generated for every type of RC-5 remote control, be it a TV, VCR, CD player, or something else. The application can distinguish between the remote controls using system(); noting that command() must be called before system() for the system value to be valid. For example, the following code could be used in a two-player video game where the first player's remote is configured as a TV and the second player's remote is configured as a VCR:

+

By default, command codes will be generated for every type of RC-5 remote control, be it a TV, VCR, CD player, or something else. The application can distinguish between the remote controls using system(); noting that command() must be called before system() for the system value to be valid. For example, the following code could be used in a two-player video game where the first player's remote is configured as a TV and the second player's remote is configured as a VCR:

void loop() {
-
int cmd = ir.command();
-
int sys = ir.system();
+
int cmd = ir.command();
+
int sys = ir.system();
if (sys == RC5_SYS_TV)
player1(cmd);
else if (sys == RC5_SYS_VCR)
@@ -188,16 +196,16 @@ void _IR_receive_interrupt
...
}

If the application only cares about a single system and wishes to ignore all other systems, it can configure a system filter at startup:

-
+
void setup() {
-
ir.setSystemFilter(RC5_SYS_VCR);
+
ir.setSystemFilter(RC5_SYS_VCR);
}

The complete list of RC-5 system numbers and command codes is given in the RC5.h header file.

See Also
DumpIR Example

Definition at line 29 of file IRreceiver.h.

-

Member Function Documentation

+

Member Function Documentation

@@ -213,10 +221,10 @@ void _IR_receive_interrupt

Returns the next command from the remote control.

Returns -1 if there is no new command, or the number between 0 and 127 corresponding to the command. If the command is an auto-repeat button press rather than an original button press, then the AUTO_REPEAT flag will be set.

-

The companion function system() will return the system number for the command indicating whether the command is for a TV, VCR, CD player, etc. By default, all systems are reported; use setSystemFilter() to filter out commands from all but a specific system.

-

The next call to command() will return -1 or the code for the next button press.

+

The companion function system() will return the system number for the command indicating whether the command is for a TV, VCR, CD player, etc. By default, all systems are reported; use setSystemFilter() to filter out commands from all but a specific system.

+

The next call to command() will return -1 or the code for the next button press.

The header file RC5.h contains a list of command codes for common remote controls.

-
See Also
system(), setSystemFilter()
+
See Also
system(), setSystemFilter()

Definition at line 220 of file IRreceiver.cpp.

@@ -245,10 +253,10 @@ void _IR_receive_interrupt

Sets the system to filter commands against, or -1 to turn off the system filter.

-

If system is -1, then all received systems are returned via command() and system() irrespective of whether they are for a TV, VCR, CD player, or some other type of system. If system is set to anything other than -1, then only commands for that system are returned via command(). For example:

-
-
ir.setSystemFilter(RC5_SYS_VCR);
-
See Also
systemFilter(), system(), command()
+

If system is -1, then all received systems are returned via command() and system() irrespective of whether they are for a TV, VCR, CD player, or some other type of system. If system is set to anything other than -1, then only commands for that system are returned via command(). For example:

+
+
ir.setSystemFilter(RC5_SYS_VCR);
+
See Also
systemFilter(), system(), command()

Definition at line 40 of file IRreceiver.h.

@@ -275,10 +283,10 @@ void _IR_receive_interrupt
-

Returns the system number of the previous command(), indicating whether the command was for a TV, VCR, CD player, etc.

-

The return value from this function is valid only after a call to command(). The next call to command() will clear the system value, possibly to -1 if there is no new command.

+

Returns the system number of the previous command(), indicating whether the command was for a TV, VCR, CD player, etc.

+

The return value from this function is valid only after a call to command(). The next call to command() will clear the system value, possibly to -1 if there is no new command.

The header file RC5.h contains a list of system numbers for common remote controls.

-
See Also
command(), setSystemFilter()
+
See Also
command(), setSystemFilter()

Definition at line 37 of file IRreceiver.h.

@@ -306,8 +314,8 @@ void _IR_receive_interrupt

Returns the system to filter commands against, or -1 if no filter is set.

-

If this value is -1, then all received systems are returned via command() and system() irrespective of whether they are for a TV, VCR, CD player, or some other type of system. If this value is set to anything other than -1, then only commands for that system are returned via command().

-
See Also
setSystemFilter(), system(), command()
+

If this value is -1, then all received systems are returned via command() and system() irrespective of whether they are for a TV, VCR, CD player, or some other type of system. If this value is set to anything other than -1, then only commands for that system are returned via command().

+
See Also
setSystemFilter(), system(), command()

Definition at line 39 of file IRreceiver.h.

@@ -320,9 +328,9 @@ void _IR_receive_interrupt
diff --git a/classIntField-members.html b/classIntField-members.html index db1996fa..9bb7fc86 100644 --- a/classIntField-members.html +++ b/classIntField-members.html @@ -3,6 +3,7 @@ + ArduinoLibs: Member List @@ -29,7 +30,7 @@
- + @@ -117,9 +118,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classIntField.html b/classIntField.html index 785c3e78..8848a4dd 100644 --- a/classIntField.html +++ b/classIntField.html @@ -3,6 +3,7 @@ + ArduinoLibs: IntField Class Reference @@ -29,7 +30,7 @@ - + @@ -90,7 +91,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
-

Field that manages the input of an integer value. +

Field that manages the input of an integer value. More...

#include <IntField.h>

@@ -100,89 +101,114 @@ Inheritance diagram for IntField:
-Field +Field
- - + + - + + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - - + + + - + + + - + + - + + - + + - + + - + + - + +

+

Public Member Functions

 IntField (const String &label)
 Constructs a new integer field with a specific label.
 Constructs a new integer field with a specific label. More...
 
 IntField (Form &form, const String &label, int minValue, int maxValue, int stepValue, int value)
 Constructs a new integer field with a specific label, minValue, maxValue, stepValue, and value, and attaches it to a form.
 Constructs a new integer field with a specific label, minValue, maxValue, stepValue, and value, and attaches it to a form. More...
 
 IntField (Form &form, const String &label, int minValue, int maxValue, int stepValue, int value, const String &suffix)
 Constructs a new integer field with a specific label, minValue, maxValue, stepValue, value, and suffix and attaches it to a form.
 
int dispatch (int event)
 Dispatches event via this field.
 Dispatches event via this field. More...
 
void enterField (bool reverse)
 Enters the field due to form navigation.
 Enters the field due to form navigation. More...
 
int minValue () const
 Returns the minimum value for the input field.
 Returns the minimum value for the input field. More...
 
void setMinValue (int value)
 Sets the minimum value for the input field.
 Sets the minimum value for the input field. More...
 
int maxValue () const
 Returns the maximum value for the input field.
 Returns the maximum value for the input field. More...
 
void setMaxValue (int value)
 Sets the maximum value for the input field.
 Sets the maximum value for the input field. More...
 
int stepValue () const
 Returns the step value to use when increasing or decreasing the value() due to Up and Down button presses.
 Returns the step value to use when increasing or decreasing the value() due to Up and Down button presses. More...
 
void setStepValue (int value)
 Sets the step value value to use when increasing or decreasing the value() due to Up and Down button presses.
 Sets the step value value to use when increasing or decreasing the value() due to Up and Down button presses. More...
 
int value () const
 Returns the current value of this field.
 Returns the current value of this field. More...
 
void setValue (int value)
 Sets the current value of this field.
 Sets the current value of this field. More...
 
const String & suffix () const
 Returns the suffix string to be displayed after the field's value.
 Returns the suffix string to be displayed after the field's value. More...
 
void setSuffix (const String &suffix)
 Sets the suffix string to be displayed after the field's value.
- Public Member Functions inherited from Field
 Sets the suffix string to be displayed after the field's value. More...
 
- Public Member Functions inherited from Field
 Field (const String &label)
 Constructs a new field with a specific label.
 Constructs a new field with a specific label. More...
 
 Field (Form &form, const String &label)
 Constructs a new field with a specific label and attaches it to a form.
 
 ~Field ()
 Destroys this field and removes it from its owning Form.
 Destroys this field and removes it from its owning Form. More...
 
Formform () const
 Returns the Form that owns this field; null if not associated with a Form.
 Returns the Form that owns this field; null if not associated with a Form.
 
virtual void exitField ()
 Exits the field due to form navigation.
 Exits the field due to form navigation. More...
 
const String & label () const
 Returns the label to display in the first line of this field.
 Returns the label to display in the first line of this field. More...
 
void setLabel (const String &label)
 Sets the label to display in the first line of this field.
 Sets the label to display in the first line of this field. More...
 
bool isCurrent () const
 Returns true if this field is the currently-displayed field in its owning form; false otherwise.
 Returns true if this field is the currently-displayed field in its owning form; false otherwise. More...
 
- - + - + + - + +

+

Additional Inherited Members

- Protected Member Functions inherited from Field
- Protected Member Functions inherited from Field
LiquidCrystal * lcd () const
 Returns the LCD that this field is being drawn on.
 Returns the LCD that this field is being drawn on.
 
virtual void updateCursor ()
 Updates the cursor position after the label has been drawn by setLabel().
 Updates the cursor position after the label has been drawn by setLabel(). More...
 
-

Detailed Description

-

Field that manages the input of an integer value.

-

IntField is intended for field values that are modifiable by the user. Pressing Up adds stepValue() to the current value and pressing Down subtracts stepValue() from the current value. The value is clamped to the range minValue() to maxValue().

-

The following example creates an integer field with the label "Iterations", that ranges between 1 and 5, with a stepValue() of 1, and an initial default value() of 2:

-
Form mainForm(lcd);
-
IntField iterField(mainForm, "Iterations", 1, 5, 1, 2);
-

IntField can be configured to show a suffix() on the screen after the integer value(). This is intended for communicating the units in which the value is expressed. For example:

-
IntField volumeField(mainForm, "Volume", 0, 100, 5, 85, "%");
-
IntField speedField(mainForm, "Speed", 0, 2000, 15, 450, " rpm");
+

Detailed Description

+

Field that manages the input of an integer value.

+

IntField is intended for field values that are modifiable by the user. Pressing Up adds stepValue() to the current value and pressing Down subtracts stepValue() from the current value. The value is clamped to the range minValue() to maxValue().

+

The following example creates an integer field with the label "Iterations", that ranges between 1 and 5, with a stepValue() of 1, and an initial default value() of 2:

+
Form mainForm(lcd);
+
IntField iterField(mainForm, "Iterations", 1, 5, 1, 2);
+

IntField can be configured to show a suffix() on the screen after the integer value(). This is intended for communicating the units in which the value is expressed. For example:

+
IntField volumeField(mainForm, "Volume", 0, 100, 5, 85, "%");
+
IntField speedField(mainForm, "Speed", 0, 2000, 15, 450, " rpm");
FormInt.png
-

Use TextField for read-only fields that report integer values but which are not modifiable by the user.

-
See Also
Field, TextField
+

Use TextField for read-only fields that report integer values but which are not modifiable by the user.

+
See Also
Field, TextField

Definition at line 28 of file IntField.h.

-

Constructor & Destructor Documentation

+

Constructor & Destructor Documentation

@@ -206,9 +232,9 @@ LiquidCrystal * 

Constructs a new integer field with a specific label.

-

The field is initially not associated with a Form. The field can be added to a form later using Form::addField().

-

Initially, value() is 0, minValue() is 0, maxValue() is 100, stepValue() is 1, and suffix() is an empty string.

-
See Also
Form::addField()
+

The field is initially not associated with a Form. The field can be added to a form later using Form::addField().

+

Initially, value() is 0, minValue() is 0, maxValue() is 100, stepValue() is 1, and suffix() is an empty string.

+
See Also
Form::addField()

Definition at line 71 of file IntField.cpp.

@@ -263,13 +289,13 @@ LiquidCrystal * 

Constructs a new integer field with a specific label, minValue, maxValue, stepValue, and value, and attaches it to a form.

-

The suffix() is initially set to an empty string.

+

The suffix() is initially set to an empty string.

Definition at line 88 of file IntField.cpp.

-

Member Function Documentation

+

Member Function Documentation

@@ -293,11 +319,11 @@ LiquidCrystal * 

Dispatches event via this field.

-

The event is usually obtained from LCD::getButton().

+

The event is usually obtained from LCD::getButton().

Returns zero if the event has been handled and no further action is required.

Returns FORM_CHANGED if the event has changed the value of this field in a manner that may require the application to take further action based on the new field value.

-

Returns -1 if the event is not handled by this field, and should be handled by the Form itself (particularly for Left and Right buttons). The default implementation returns -1 for all events.

-
See Also
Form::dispatch(), LCD::getButton()
+

Returns -1 if the event is not handled by this field, and should be handled by the Form itself (particularly for Left and Right buttons). The default implementation returns -1 for all events.

+
See Also
Form::dispatch(), LCD::getButton()

Reimplemented from Field.

@@ -330,8 +356,8 @@ LiquidCrystal * Enters the field due to form navigation.

This function is typically called when the user presses Left and Right buttons to navigate to the field. If reverse is true, then navigation was due to the Left button being pressed.

This function can assume that the display has been cleared and the cursor is positioned at (0, 0).

-

The default implementation prints the label().

-
See Also
exitField()
+

The default implementation prints the label().

+
See Also
exitField()

Reimplemented from Field.

@@ -361,7 +387,7 @@ LiquidCrystal * 

Returns the maximum value for the input field.

-
See Also
setMaxValue(), minValue(), stepValue(), value()
+
See Also
setMaxValue(), minValue(), stepValue(), value()

Definition at line 41 of file IntField.h.

@@ -389,7 +415,7 @@ LiquidCrystal * 

Returns the minimum value for the input field.

-
See Also
setMinValue(), maxValue(), stepValue(), value()
+
See Also
setMinValue(), maxValue(), stepValue(), value()

Definition at line 38 of file IntField.h.

@@ -418,8 +444,8 @@ LiquidCrystal * 

Sets the maximum value for the input field.

-

The new maximum value will be used to clamp the field's value the next time setValue() is called.

-
See Also
maxValue(), setMinValue(), setStepValue(), setValue()
+

The new maximum value will be used to clamp the field's value the next time setValue() is called.

+
See Also
maxValue(), setMinValue(), setStepValue(), setValue()

Definition at line 42 of file IntField.h.

@@ -448,8 +474,8 @@ LiquidCrystal * 

Sets the minimum value for the input field.

-

The new minimum value will be used to clamp the field's value the next time setValue() is called.

-
See Also
minValue(), setMaxValue(), setStepValue(), setValue()
+

The new minimum value will be used to clamp the field's value the next time setValue() is called.

+
See Also
minValue(), setMaxValue(), setStepValue(), setValue()

Definition at line 39 of file IntField.h.

@@ -477,8 +503,8 @@ LiquidCrystal * 
-

Sets the step value value to use when increasing or decreasing the value() due to Up and Down button presses.

-
See Also
stepValue(), setMinValue(), setMaxValue(), setValue()
+

Sets the step value value to use when increasing or decreasing the value() due to Up and Down button presses.

+
See Also
stepValue(), setMinValue(), setMaxValue(), setValue()

Definition at line 45 of file IntField.h.

@@ -499,10 +525,10 @@ LiquidCrystal * 

Sets the suffix string to be displayed after the field's value.

-

Suffixes are typically used to indicate the units that the value() is expressed in. For example:

+

Suffixes are typically used to indicate the units that the value() is expressed in. For example:

field.setSuffix("%");
field.setSuffix(" rpm");
-
See Also
suffix()
+
See Also
suffix()

Definition at line 231 of file IntField.cpp.

@@ -523,8 +549,8 @@ LiquidCrystal * 

Sets the current value of this field.

-

The value will be clamped to the range defined by minValue() and maxValue().

-
See Also
value(), setMinValue(), setMaxValue(), setStepValue()
+

The value will be clamped to the range defined by minValue() and maxValue().

+
See Also
value(), setMinValue(), setMaxValue(), setStepValue()

Definition at line 198 of file IntField.cpp.

@@ -551,8 +577,8 @@ LiquidCrystal * 
-

Returns the step value to use when increasing or decreasing the value() due to Up and Down button presses.

-
See Also
setStepValue(), minValue(), maxValue(), value()
+

Returns the step value to use when increasing or decreasing the value() due to Up and Down button presses.

+
See Also
setStepValue(), minValue(), maxValue(), value()

Definition at line 44 of file IntField.h.

@@ -580,7 +606,7 @@ LiquidCrystal * 

Returns the suffix string to be displayed after the field's value.

-
See Also
setSuffix()
+
See Also
setSuffix()

Definition at line 50 of file IntField.h.

@@ -608,7 +634,7 @@ LiquidCrystal * 

Returns the current value of this field.

-
See Also
setValue(), minValue(), maxValue(), stepValue()
+
See Also
setValue(), minValue(), maxValue(), stepValue()

Definition at line 47 of file IntField.h.

@@ -621,9 +647,9 @@ LiquidCrystal *  diff --git a/classLCD-members.html b/classLCD-members.html index 2dbcc7ca..b31426b4 100644 --- a/classLCD-members.html +++ b/classLCD-members.html @@ -3,6 +3,7 @@ + ArduinoLibs: Member List @@ -29,7 +30,7 @@
- + @@ -100,17 +101,18 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); isScreenSaved() const LCDinline LCD()LCDinline LCD(uint8_t pin9)LCDinline - noDisplay()LCD - ScreenSaverMode enum nameLCD - screenSaverMode() const LCDinline - setBacklightPin(uint8_t pin)LCD - setScreenSaverMode(ScreenSaverMode mode)LCD + LCD(uint8_t rs, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3) (defined in LCD)LCDinline + noDisplay()LCD + ScreenSaverMode enum nameLCD + screenSaverMode() const LCDinline + setBacklightPin(uint8_t pin)LCD + setScreenSaverMode(ScreenSaverMode mode)LCD
diff --git a/classLCD.html b/classLCD.html index 551bb1cf..7ed501dd 100644 --- a/classLCD.html +++ b/classLCD.html @@ -3,6 +3,7 @@ + ArduinoLibs: LCD Class Reference @@ -29,7 +30,7 @@
- + @@ -91,52 +92,76 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
-

Enhanced library for Freetronics 16x2 LCD shields. +

Enhanced library for Freetronics 16x2 LCD shields. More...

#include <LCD.h>

+
+Inheritance diagram for LCD:
+
+
+ + + +
- +

+

Public Types

enum  ScreenSaverMode { DisplayOff, BacklightOff, BacklightOnSelect }
 Screen saver mode that controls the display and back light. More...
 
- - + + - + + + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + +

+

Public Member Functions

 LCD ()
 Initialize the Freetronics LCD display with the default pin assignment.
 Initialize the Freetronics LCD display with the default pin assignment. More...
 
 LCD (uint8_t pin9)
 Initialize the Freetronics LCD display for USBDroid.
 Initialize the Freetronics LCD display for USBDroid. More...
 
LCD (uint8_t rs, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
 
uint8_t backlightPin () const
 Returns the pin that is being used to control the back light. The default is 3.
 Returns the pin that is being used to control the back light. The default is 3. More...
 
void setBacklightPin (uint8_t pin)
 Sets the back light pin for the LCD shield.
 Sets the back light pin for the LCD shield. More...
 
void display ()
 Turns on the display of text on the LCD and the back light.
 Turns on the display of text on the LCD and the back light. More...
 
void noDisplay ()
 Turns off the display of text on the LCD and the back light.
 Turns off the display of text on the LCD and the back light. More...
 
ScreenSaverMode screenSaverMode () const
 Returns the current screen saver mode; default is DisplayOff.
 Returns the current screen saver mode; default is DisplayOff. More...
 
void setScreenSaverMode (ScreenSaverMode mode)
 Sets the current screen saver mode.
 Sets the current screen saver mode. More...
 
void enableScreenSaver (int timeoutSecs=10)
 Enables the screen saver and causes it to activate after timeoutSecs of inactivity on the buttons.
 Enables the screen saver and causes it to activate after timeoutSecs of inactivity on the buttons. More...
 
void disableScreenSaver ()
 Disables the screen saver.
 Disables the screen saver. More...
 
bool isScreenSaved () const
 Returns true if the screen has been saved; false otherwise.
 Returns true if the screen has been saved; false otherwise. More...
 
int getButton ()
 Gets the next button press, release, or idle event.
 Gets the next button press, release, or idle event. More...
 
-

Detailed Description

-

Enhanced library for Freetronics 16x2 LCD shields.

-

This class extends the standard Arduino LiquidCrystal library with extra functionality for the Freetronics 16x2 LCD shield:

+

Detailed Description

+

Enhanced library for Freetronics 16x2 LCD shields.

+

This class extends the standard Arduino LiquidCrystal library with extra functionality for the Freetronics 16x2 LCD shield:

http://www.freetronics.com/pages/16x2-lcd-shield-quickstart-guide

-

The Freetronics LCD has an additional back light, which is turned on and off with the display() and noDisplay() functions. The user can also call enableScreenSaver() to cause the display and back light to automatically turn off after a specific timeout. The setScreenSaverMode() function controls which of the display and back light are disabled when the screen saver activates.

-

The Freetronics LCD also has 5 push buttons for Left, Right, Up, Down, and Select, to assist with the creation of interactive sketches. The user can call getButton() to get the current button state. One of the following values may be returned:

+

The Freetronics LCD has an additional back light, which is turned on and off with the display() and noDisplay() functions. The user can also call enableScreenSaver() to cause the display and back light to automatically turn off after a specific timeout. The setScreenSaverMode() function controls which of the display and back light are disabled when the screen saver activates.

+

The Freetronics LCD also has 5 push buttons for Left, Right, Up, Down, and Select, to assist with the creation of interactive sketches. The user can call getButton() to get the current button state. One of the following values may be returned:

  • LCD_BUTTON_NONE - No button has been pressed, or a button has been pressed but not yet released.
  • LCD_BUTTON_LEFT - Left button was pressed.
  • @@ -154,16 +179,16 @@ Public Member Functions

    Support for DFRobot LCD Shield

    The DFRobot LCD Shield is almost identical to the Freetronics shield, except it uses pin 10 for the back light instead of pin 3. This can be specified in the application's setup() function:

    -
    LCD lcd;
    +
    LCD lcd;
    void setup() {
    -
    lcd.setBacklightPin(10);
    +
    lcd.setBacklightPin(10);
    }
    -

    The back light pin is configured for output the first time the application calls getButton().

    -
    See Also
    Form, Hello World Example
    +

    The back light pin is configured for output the first time the application calls getButton().

    +
    See Also
    Form, Hello World Example

    Definition at line 48 of file LCD.h.

    -

Member Enumeration Documentation

+

Member Enumeration Documentation

@@ -175,25 +200,23 @@ Support for DFRobot LCD Shield

Screen saver mode that controls the display and back light.

-
Enumerator:
-
DisplayOff  + + - -
Enumerator
DisplayOff 

Turn off both the display and the backlight when the screen saver is activated.

BacklightOff  +
BacklightOff 

Turn off the back light but leave the display on when the screen saver is activated.

BacklightOnSelect  +
BacklightOnSelect 

Same as BacklightOff but the screen saver is only deactivated when Select is pressed; other buttons have no effect.

- - -

Definition at line 59 of file LCD.h.

+

Definition at line 62 of file LCD.h.

-

Constructor & Destructor Documentation

+

Constructor & Destructor Documentation

@@ -215,9 +238,9 @@ Support for DFRobot LCD Shield
-

Initialize the Freetronics LCD display with the default pin assignment.

-

The following example shows how to initialize the Freetronics LCD shield:

-
LCD lcd;
+

Initialize the Freetronics LCD display with the default pin assignment.

+

The following example shows how to initialize the Freetronics LCD shield:

+
LCD lcd;

Definition at line 50 of file LCD.h.

@@ -245,16 +268,16 @@ Support for DFRobot LCD Shield
-

Initialize the Freetronics LCD display for USBDroid.

-

On the USBDroid, the D9 pin is used for USB Host functionality. Either the USB Host's use of D9 must be reassigned to another pin, or the Freetronics LCD shield must be modified. The following Web page describes the modifications that are necessary: http://www.freetronics.com/pages/combining-the-lcd-keypad-shield-and-the-usbdroid

-

If you choose to modify the LCD shield, then you must use this version of the constructor to initialize the shield, passing the alternative pin as the pin9 parameter. Using the recommended pin from the above Web page of A1, you would initialize the LCD as follows:

-
LCD lcd(A1);
+

Initialize the Freetronics LCD display for USBDroid.

+

On the USBDroid, the D9 pin is used for USB Host functionality. Either the USB Host's use of D9 must be reassigned to another pin, or the Freetronics LCD shield must be modified. The following Web page describes the modifications that are necessary: http://www.freetronics.com/pages/combining-the-lcd-keypad-shield-and-the-usbdroid

+

If you choose to modify the LCD shield, then you must use this version of the constructor to initialize the shield, passing the alternative pin as the pin9 parameter. Using the recommended pin from the above Web page of A1, you would initialize the LCD as follows:

+
LCD lcd(A1);

Definition at line 51 of file LCD.h.

-

Member Function Documentation

+

Member Function Documentation

@@ -277,9 +300,9 @@ Support for DFRobot LCD Shield

Returns the pin that is being used to control the back light. The default is 3.

-
See Also
setBacklightPin()
+
See Also
setBacklightPin()
-

Definition at line 53 of file LCD.h.

+

Definition at line 56 of file LCD.h.

@@ -297,7 +320,7 @@ Support for DFRobot LCD Shield

Disables the screen saver.

-
See Also
enableScreenSaver(), display(), isScreenSaved()
+
See Also
enableScreenSaver(), display(), isScreenSaved()

Definition at line 308 of file LCD.cpp.

@@ -316,9 +339,9 @@ Support for DFRobot LCD Shield
-

Turns on the display of text on the LCD and the back light.

+

Turns on the display of text on the LCD and the back light.

If the screen saver is active, then calling this function will deactivate the screen saver and reset the timeout. Thus, this function can be called for force the screen to restore.

-
See Also
noDisplay(), enableScreenSaver(), setScreenSaverMode()
+
See Also
noDisplay(), enableScreenSaver(), setScreenSaverMode()

Definition at line 206 of file LCD.cpp.

@@ -339,10 +362,10 @@ Support for DFRobot LCD Shield

Enables the screen saver and causes it to activate after timeoutSecs of inactivity on the buttons.

-

If timeoutSecs is less than or equal to zero, then the call is equivalent to calling disableScreenSaver().

-

For the screen saver to work, the application must regularly call getButton() to fetch the LCD's button state even if no buttons are pressed.

+

If timeoutSecs is less than or equal to zero, then the call is equivalent to calling disableScreenSaver().

+

For the screen saver to work, the application must regularly call getButton() to fetch the LCD's button state even if no buttons are pressed.

If the timeoutSecs parameter is not supplied, the default is 10 seconds.

-
See Also
disableScreenSaver(), display(), getButton(), isScreenSaved()
+
See Also
disableScreenSaver(), display(), getButton(), isScreenSaved()

Definition at line 294 of file LCD.cpp.

@@ -364,9 +387,9 @@ Support for DFRobot LCD Shield

Gets the next button press, release, or idle event.

If no buttons are pressed, this function will return LCD_BUTTON_NONE.

When a button is pressed, this function will return one of LCD_BUTTON_LEFT, LCD_BUTTON_RIGHT, LCD_BUTTON_UP, LCD_BUTTON_DOWN, or LCD_BUTTON_SELECT. While the button is pressed, this function will return LCD_BUTTON_NONE until the button is released. When the button is released, this function will return one of LCD_BUTTON_LEFT_RELEASED, LCD_BUTTON_RIGHT_RELEASED, LCD_BUTTON_UP_RELEAED, LCD_BUTTON_DOWN_RELEASED, or LCD_BUTTON_SELECT_RELEASED.

-

If the screen saver is currently active, then it will be deactivated by this function whenever a button is pressed. If screenSaverMode() is DisplayOff, the function will "eat" the button press and return LCD_BUTTON_NONE. The scrren saver can also be deactivated under program control by calling display().

+

If the screen saver is currently active, then it will be deactivated by this function whenever a button is pressed. If screenSaverMode() is DisplayOff, the function will "eat" the button press and return LCD_BUTTON_NONE. The scrren saver can also be deactivated under program control by calling display().

This function debounces the button state automatically so there is no need for the caller to worry about spurious button events.

-
See Also
enableScreenSaver(), display(), Form::dispatch()
+
See Also
enableScreenSaver(), display(), Form::dispatch()

Definition at line 353 of file LCD.cpp.

@@ -396,7 +419,7 @@ Support for DFRobot LCD Shield

Returns true if the screen has been saved; false otherwise.

See Also
enableScreenSaver()
-

Definition at line 71 of file LCD.h.

+

Definition at line 74 of file LCD.h.

@@ -413,9 +436,9 @@ Support for DFRobot LCD Shield
-

Turns off the display of text on the LCD and the back light.

+

Turns off the display of text on the LCD and the back light.

This function can be called to force the screen saver to activate.

-
See Also
display(), enableScreenSaver(), setScreenSaverMode()
+
See Also
display(), enableScreenSaver(), setScreenSaverMode()

Definition at line 223 of file LCD.cpp.

@@ -443,9 +466,9 @@ Support for DFRobot LCD Shield

Returns the current screen saver mode; default is DisplayOff.

-
See Also
setScreenSaverMode(), enableScreenSaver()
+
See Also
setScreenSaverMode(), enableScreenSaver()
-

Definition at line 66 of file LCD.h.

+

Definition at line 69 of file LCD.h.

@@ -463,15 +486,15 @@ Support for DFRobot LCD Shield
-

Sets the back light pin for the LCD shield.

+

Sets the back light pin for the LCD shield.

The DFRobot LCD Shield uses pin 10 for the back light instead of pin 3:

-
LCD lcd;
+
LCD lcd;
void setup() {
-
lcd.setBacklightPin(10);
+
lcd.setBacklightPin(10);
}
-

The back light pin is configured for output the next time the application calls getButton().

-
See Also
backlightPin()
+

The back light pin is configured for output the next time the application calls getButton().

+
See Also
backlightPin()

Definition at line 182 of file LCD.cpp.

@@ -492,7 +515,7 @@ Support for DFRobot LCD Shield

Sets the current screen saver mode.

-
See Also
screenSaverMode(), enableScreenSaver()
+
See Also
screenSaverMode(), enableScreenSaver()

Definition at line 268 of file LCD.cpp.

@@ -505,9 +528,9 @@ Support for DFRobot LCD Shield
diff --git a/classLCD.png b/classLCD.png new file mode 100644 index 00000000..b3dc8d1f Binary files /dev/null and b/classLCD.png differ diff --git a/classListField-members.html b/classListField-members.html index ad7fb560..38233b30 100644 --- a/classListField-members.html +++ b/classListField-members.html @@ -3,6 +3,7 @@ + ArduinoLibs: Member List @@ -29,7 +30,7 @@
- + @@ -110,9 +111,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classListField.html b/classListField.html index 60af0a2a..98ac9472 100644 --- a/classListField.html +++ b/classListField.html @@ -3,6 +3,7 @@ + ArduinoLibs: ListField Class Reference @@ -29,7 +30,7 @@
- + @@ -90,7 +91,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
-

Field that manages selection from a static list of items. +

Field that manages selection from a static list of items. More...

#include <ListField.h>

@@ -100,61 +101,79 @@ Inheritance diagram for ListField:
-Field +Field
- - + + + - + + - + + - + + - + + - + + - - + + + - + + + - + + - + + - + + - + + - + + - + +

+

Public Member Functions

 ListField (const String &label)
 Constructs a new list field with a specific label.
 Constructs a new list field with a specific label. More...
 
 ListField (Form &form, const String &label, ListItems items, int value=0)
 Constructs a new list field with a specific label, list of items, and value, and attaches it to a form.
 
int dispatch (int event)
 Dispatches event via this field.
 Dispatches event via this field. More...
 
void enterField (bool reverse)
 Enters the field due to form navigation.
 Enters the field due to form navigation. More...
 
ListItems items () const
 Returns the array of items in this list.
 Returns the array of items in this list. More...
 
void setItems (ListItems items)
 Sets the array of items for this list.
 Sets the array of items for this list. More...
 
int value () const
 Returns the value of this list; i.e. the index within items() of the selected item.
 Returns the value of this list; i.e. the index within items() of the selected item. More...
 
void setValue (int value)
 Sets the value of this list; i.e. the index within items() of the selected item.
- Public Member Functions inherited from Field
 Sets the value of this list; i.e. the index within items() of the selected item. More...
 
- Public Member Functions inherited from Field
 Field (const String &label)
 Constructs a new field with a specific label.
 Constructs a new field with a specific label. More...
 
 Field (Form &form, const String &label)
 Constructs a new field with a specific label and attaches it to a form.
 
 ~Field ()
 Destroys this field and removes it from its owning Form.
 Destroys this field and removes it from its owning Form. More...
 
Formform () const
 Returns the Form that owns this field; null if not associated with a Form.
 Returns the Form that owns this field; null if not associated with a Form.
 
virtual void exitField ()
 Exits the field due to form navigation.
 Exits the field due to form navigation. More...
 
const String & label () const
 Returns the label to display in the first line of this field.
 Returns the label to display in the first line of this field. More...
 
void setLabel (const String &label)
 Sets the label to display in the first line of this field.
 Sets the label to display in the first line of this field. More...
 
bool isCurrent () const
 Returns true if this field is the currently-displayed field in its owning form; false otherwise.
 Returns true if this field is the currently-displayed field in its owning form; false otherwise. More...
 
- - + - + + - + +

+

Additional Inherited Members

- Protected Member Functions inherited from Field
- Protected Member Functions inherited from Field
LiquidCrystal * lcd () const
 Returns the LCD that this field is being drawn on.
 Returns the LCD that this field is being drawn on.
 
virtual void updateCursor ()
 Updates the cursor position after the label has been drawn by setLabel().
 Updates the cursor position after the label has been drawn by setLabel(). More...
 
-

Detailed Description

-

Field that manages selection from a static list of items.

-

ListField is intended for selecting an element from a list of items. Each items is represented by a string within program memory, with the list terminated by null. For example:

+

Detailed Description

+

Field that manages selection from a static list of items.

+

ListField is intended for selecting an element from a list of items. Each items is represented by a string within program memory, with the list terminated by null. For example:

const char item_Eggs[] PROGMEM = "Eggs";
const char item_Cheese[] PROGMEM = "Cheese";
const char item_Pumpkin[] PROGMEM = "Pumpkin";
@@ -165,13 +184,13 @@ LiquidCrystal *  0
};
-
Form mainForm(lcd);
-
ListField ingredient(mainForm, "Select ingredient", ingredients);
-

If there are only two items in the list, then BoolField can be used instead.

-
See Also
Field, BoolField
+
Form mainForm(lcd);
+
ListField ingredient(mainForm, "Select ingredient", ingredients);
+

If there are only two items in the list, then BoolField can be used instead.

+
See Also
Field, BoolField

Definition at line 32 of file ListField.h.

-

Constructor & Destructor Documentation

+

Constructor & Destructor Documentation

@@ -195,15 +214,15 @@ LiquidCrystal * 

Constructs a new list field with a specific label.

-

The field is initially not associated with a Form. The field can be added to a form later using Form::addField().

-

Initially, items() is null and value() is -1.

-
See Also
Form::addField()
+

The field is initially not associated with a Form. The field can be added to a form later using Form::addField().

+

Initially, items() is null and value() is -1.

+
See Also
Form::addField()

Definition at line 64 of file ListField.cpp.

-

Member Function Documentation

+

Member Function Documentation

@@ -227,11 +246,11 @@ LiquidCrystal * 

Dispatches event via this field.

-

The event is usually obtained from LCD::getButton().

+

The event is usually obtained from LCD::getButton().

Returns zero if the event has been handled and no further action is required.

Returns FORM_CHANGED if the event has changed the value of this field in a manner that may require the application to take further action based on the new field value.

-

Returns -1 if the event is not handled by this field, and should be handled by the Form itself (particularly for Left and Right buttons). The default implementation returns -1 for all events.

-
See Also
Form::dispatch(), LCD::getButton()
+

Returns -1 if the event is not handled by this field, and should be handled by the Form itself (particularly for Left and Right buttons). The default implementation returns -1 for all events.

+
See Also
Form::dispatch(), LCD::getButton()

Reimplemented from Field.

@@ -264,8 +283,8 @@ LiquidCrystal * Enters the field due to form navigation.

This function is typically called when the user presses Left and Right buttons to navigate to the field. If reverse is true, then navigation was due to the Left button being pressed.

This function can assume that the display has been cleared and the cursor is positioned at (0, 0).

-

The default implementation prints the label().

-
See Also
exitField()
+

The default implementation prints the label().

+
See Also
exitField()

Reimplemented from Field.

@@ -295,7 +314,7 @@ LiquidCrystal * 

Returns the array of items in this list.

-
See Also
setItems()
+
See Also
setItems()

Definition at line 41 of file ListField.h.

@@ -328,7 +347,7 @@ LiquidCrystal * };
list.setItems(ingredients);
-
See Also
items()
+
See Also
items()

Definition at line 141 of file ListField.cpp.

@@ -348,9 +367,9 @@ LiquidCrystal * 
-

Sets the value of this list; i.e. the index within items() of the selected item.

-

The value will be clamped to the range of items().

-
See Also
value(), items()
+

Sets the value of this list; i.e. the index within items() of the selected item.

+

The value will be clamped to the range of items().

+
See Also
value(), items()

Definition at line 178 of file ListField.cpp.

@@ -377,9 +396,9 @@ LiquidCrystal * 
-

Returns the value of this list; i.e. the index within items() of the selected item.

-

Returns -1 if the items() array is empty or null.

-
See Also
setValue(), items()
+

Returns the value of this list; i.e. the index within items() of the selected item.

+

Returns -1 if the items() array is empty or null.

+
See Also
setValue(), items()

Definition at line 44 of file ListField.h.

@@ -392,9 +411,9 @@ LiquidCrystal *  diff --git a/classMelody-members.html b/classMelody-members.html index cb43598f..06225923 100644 --- a/classMelody-members.html +++ b/classMelody-members.html @@ -3,6 +3,7 @@ + ArduinoLibs: Member List @@ -29,7 +30,7 @@
- + @@ -102,9 +103,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classMelody.html b/classMelody.html index 20032369..4516d997 100644 --- a/classMelody.html +++ b/classMelody.html @@ -3,6 +3,7 @@ + ArduinoLibs: Melody Class Reference @@ -29,7 +30,7 @@ - + @@ -95,32 +96,42 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

#include <Melody.h>

- + + - + + - + + - + + - + + - + + - + + - + + - + +

+

Public Member Functions

 Melody (uint8_t pin)
 Constructs a new melody playing object for pin.
 
bool isPlaying () const
 Returns true if the melody is currently playing; false if not.
 
int loopCount () const
 Returns the number of times the melody should loop before stopping.
 Returns the number of times the melody should loop before stopping. More...
 
void setLoopCount (int count)
 Sets the number of times the melody should loop to count.
 Sets the number of times the melody should loop to count. More...
 
void setLoopDuration (unsigned long ms)
 Sets the maximum number of loops to last no longer than ms milliseconds.
 Sets the maximum number of loops to last no longer than ms milliseconds. More...
 
void play ()
 Starts playing the melody, or restarts it if already playing.
 Starts playing the melody, or restarts it if already playing. More...
 
void playOnce ()
 Plays the melody once and then stops.
 Plays the melody once and then stops. More...
 
void stop ()
 Stops playing the melody.
 Stops playing the melody. More...
 
void setMelody (const int *notes, const uint8_t *lengths, unsigned int size)
 Sets the melody to the size elements of notes and lengths.
 Sets the melody to the size elements of notes and lengths. More...
 
void run ()
 Runs the melody control loop.
 Runs the melody control loop. More...
 
-

Detailed Description

+

Detailed Description

Plays a melody on a digital output pin using tone().

The following example plays a simple tone three times on digital pin 8:

#include <Melody.h>
@@ -131,7 +142,7 @@ bool };
byte lengths[] = {4, 8, 8, 4, 4, 4, 4, 4, 2};
-
Melody melody(8);
+
Melody melody(8);
void setup() {
melody.setMelody(notes, lengths, sizeof(lengths));
@@ -143,8 +154,8 @@ bool  melody.run();
}

The notes array contains the frequency of the notes to be played, with the special value NOTE_REST indicating a rest where no notes are playing. The lengths array contains the lengths of each of the notes; a value of 4 indicates a quarter note, a value of 8 indicates an eighth note, etc.

-

The run() method must be called from the application's main loop() method to ensure that the melody advances from one note to the next. It will not block the application while notes are playing.

-

The number of loops can also be specified with setLoopDuration() which sets a maximum amount of time that the melody will play before stopping. The following example plays the melody for no more than 60 seconds:

+

The run() method must be called from the application's main loop() method to ensure that the melody advances from one note to the next. It will not block the application while notes are playing.

+

The number of loops can also be specified with setLoopDuration() which sets a maximum amount of time that the melody will play before stopping. The following example plays the melody for no more than 60 seconds:

void setup() {
melody.setMelody(notes, lengths, sizeof(lengths));
melody.setLoopDuration(60000UL);
@@ -152,7 +163,7 @@ bool }

Definition at line 122 of file Melody.h.

-

Member Function Documentation

+

Member Function Documentation

@@ -176,7 +187,7 @@ bool 
See Also
setLoopCount(), setLoopDuration(), play()
+
See Also
setLoopCount(), setLoopDuration(), play()

Definition at line 128 of file Melody.h.

@@ -196,7 +207,7 @@ bool 

Starts playing the melody, or restarts it if already playing.

-
See Also
playOnce(), setMelody(), stop(), loopCount()
+
See Also
playOnce(), setMelody(), stop(), loopCount()

Definition at line 146 of file Melody.cpp.

@@ -216,7 +227,7 @@ bool 

Plays the melody once and then stops.

-
See Also
play(), stop()
+
See Also
play(), stop()

Definition at line 162 of file Melody.cpp.

@@ -266,7 +277,7 @@ bool 
See Also
loopCount(), setLoopDuration()
+
See Also
loopCount(), setLoopDuration()

Definition at line 129 of file Melody.h.

@@ -287,8 +298,8 @@ bool 

Sets the maximum number of loops to last no longer than ms milliseconds.

-

This function must be called after the melody is specified with setMelody() as it uses the length of the melody and ms to determine the loopCount().

-
See Also
loopCount(), setLoopCount()
+

This function must be called after the melody is specified with setMelody() as it uses the length of the melody and ms to determine the loopCount().

+
See Also
loopCount(), setLoopCount()

Definition at line 131 of file Melody.cpp.

@@ -327,7 +338,7 @@ bool 
See Also
play()
+
See Also
play()

Definition at line 199 of file Melody.cpp.

@@ -347,7 +358,7 @@ bool 

Stops playing the melody.

-
See Also
play()
+
See Also
play()

Definition at line 178 of file Melody.cpp.

@@ -360,9 +371,9 @@ bool  diff --git a/classNoiseSource-members.html b/classNoiseSource-members.html new file mode 100644 index 00000000..18a4b2c6 --- /dev/null +++ b/classNoiseSource-members.html @@ -0,0 +1,106 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
NoiseSource Member List
+
+
+ +

This is the complete list of members for NoiseSource, including all inherited members.

+ + + + + + +
calibrating() const =0NoiseSourcepure virtual
NoiseSource()NoiseSource
output(const uint8_t *data, size_t len, unsigned int credit)NoiseSourceprotectedvirtual
stir()=0NoiseSourcepure virtual
~NoiseSource()NoiseSourcevirtual
+ + + + diff --git a/classNoiseSource.html b/classNoiseSource.html new file mode 100644 index 00000000..4f249f3d --- /dev/null +++ b/classNoiseSource.html @@ -0,0 +1,265 @@ + + + + + + +ArduinoLibs: NoiseSource Class Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
NoiseSource Class Referenceabstract
+
+
+ +

Abstract base class for random noise sources. + More...

+ +

#include <NoiseSource.h>

+
+Inheritance diagram for NoiseSource:
+
+
+ + +TransistorNoiseSource + +
+ + + + + + + + + + + + + + +

+Public Member Functions

NoiseSource ()
 Constructs a new random noise source.
 
+virtual ~NoiseSource ()
 Destroys this random noise source.
 
virtual bool calibrating () const =0
 Determine if the noise source is still calibrating itself. More...
 
virtual void stir ()=0
 Stirs entropy from this noise source into the global random number pool. More...
 
+ + + + +

+Protected Member Functions

virtual void output (const uint8_t *data, size_t len, unsigned int credit)
 Called from subclasses to output noise to the global random number pool. More...
 
+

Detailed Description

+

Abstract base class for random noise sources.

+
See Also
RNG, TransistorNoiseSource
+ +

Definition at line 29 of file NoiseSource.h.

+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
bool NoiseSource::calibrating () const
+
+pure virtual
+
+ +

Determine if the noise source is still calibrating itself.

+
Returns
Returns true if calibration is in progress; false if the noise source is generating valid random data.
+

Noise sources that require calibration start doing so at system startup and then switch over to random data generation once calibration is complete. Since no random data is being generated during calibration, the output from RNG.rand() may be predictable. Use RNG.available() to determine when sufficient entropy is available to generate good random values.

+

It is possible that the noise source never exits calibration. This can happen if the input voltage is insufficient to trigger noise or if the noise source is not connected. Noise sources may also periodically recalibrate themselves.

+
See Also
stir()
+ +

Implemented in TransistorNoiseSource.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void NoiseSource::output (const uint8_t * data,
size_t len,
unsigned int credit 
)
+
+protectedvirtual
+
+ +

Called from subclasses to output noise to the global random number pool.

+
Parameters
+ + + + +
dataPoints to the noise data.
lenNumber of bytes of noise data.
creditThe number of bits of entropy to credit for the data. Note that this is bits, not bytes.
+
+
+

The default implementation of this function calls RNG.stir() to add the entropy from this noise source to the global random number pool.

+

This function may be overridden by subclasses to capture the raw output from the noise source before it is mixed into the pool to allow the raw data to be analyzed for randomness.

+ +

Definition at line 102 of file NoiseSource.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void NoiseSource::stir ()
+
+pure virtual
+
+ +

Stirs entropy from this noise source into the global random number pool.

+

This function should call output() to add the entropy from this noise source to the global random number pool.

+

The noise source should batch up the entropy data, providing between 16 and 48 bytes of data each time. If the noise source does not have sufficient entropy data at the moment, it should return without stiring the current data in.

+
See Also
calibrating(), output()
+ +

Implemented in TransistorNoiseSource.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/classNoiseSource.png b/classNoiseSource.png new file mode 100644 index 00000000..785a8ea5 Binary files /dev/null and b/classNoiseSource.png differ diff --git a/classOFB-members.html b/classOFB-members.html new file mode 100644 index 00000000..3f78bf84 --- /dev/null +++ b/classOFB-members.html @@ -0,0 +1,114 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
OFB< T > Member List
+
+
+ +

This is the complete list of members for OFB< T >, including all inherited members.

+ + + + + + + + + + + + + + +
Cipher()Cipher
clear()OFBCommonvirtual
decrypt(uint8_t *output, const uint8_t *input, size_t len)OFBCommonvirtual
encrypt(uint8_t *output, const uint8_t *input, size_t len)OFBCommonvirtual
ivSize() const OFBCommonvirtual
keySize() const OFBCommonvirtual
OFB()OFB< T >inline
OFBCommon()OFBCommonprotected
setBlockCipher(BlockCipher *cipher)OFBCommoninlineprotected
setIV(const uint8_t *iv, size_t len)OFBCommonvirtual
setKey(const uint8_t *key, size_t len)OFBCommonvirtual
~Cipher()Ciphervirtual
~OFBCommon()OFBCommonvirtual
+ + + + diff --git a/classOFB.html b/classOFB.html new file mode 100644 index 00000000..af7ec51e --- /dev/null +++ b/classOFB.html @@ -0,0 +1,189 @@ + + + + + + +ArduinoLibs: OFB< T > Class Template Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
OFB< T > Class Template Reference
+
+
+ +

Implementation of the Output Feedback (OFB) mode for 128-bit block ciphers. + More...

+ +

#include <OFB.h>

+
+Inheritance diagram for OFB< T >:
+
+
+ + +OFBCommon +Cipher + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

OFB ()
 Constructs a new OFB object for the block cipher T.
 
- Public Member Functions inherited from OFBCommon
+virtual ~OFBCommon ()
 Destroys this cipher object after clearing sensitive information.
 
size_t keySize () const
 Default size of the key for this cipher, in bytes. More...
 
size_t ivSize () const
 Size of the initialization vector for this cipher, in bytes. More...
 
bool setKey (const uint8_t *key, size_t len)
 Sets the key to use for future encryption and decryption operations. More...
 
bool setIV (const uint8_t *iv, size_t len)
 Sets the initialization vector to use for future encryption and decryption operations. More...
 
void encrypt (uint8_t *output, const uint8_t *input, size_t len)
 Encrypts an input buffer and writes the ciphertext to an output buffer. More...
 
void decrypt (uint8_t *output, const uint8_t *input, size_t len)
 Decrypts an input buffer and writes the plaintext to an output buffer. More...
 
void clear ()
 Clears all security-sensitive state from this cipher. More...
 
- Public Member Functions inherited from Cipher
Cipher ()
 Constructs a new cipher object.
 
virtual ~Cipher ()
 Destroys this cipher object. More...
 
+ + + + + + + + +

+Additional Inherited Members

- Protected Member Functions inherited from OFBCommon
 OFBCommon ()
 Constructs a new cipher in OFB mode. More...
 
void setBlockCipher (BlockCipher *cipher)
 Sets the block cipher to use for this OFB object. More...
 
+

Detailed Description

+

template<typename T>
+class OFB< T >

+ +

Implementation of the Output Feedback (OFB) mode for 128-bit block ciphers.

+

The template parameter T must be a concrete subclass of BlockCipher indicating the specific block cipher to use. T must have a block size of 16 bytes (128 bits).

+

For example, the following creates a OFB object using AES192 as the underlying cipher:

+
+
ofb.setKey(key, 24);
+
ofb.setIV(iv, 16);
+
ofb.encrypt(output, input, len);
+

Decryption is identical to encryption for OFB mode.

+

The size of the ciphertext will always be the same as the size of the plaintext.

+

Reference: http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation

+
See Also
CTR, CFB, CBC
+ +

Definition at line 56 of file OFB.h.

+

The documentation for this class was generated from the following files: +
+ + + + diff --git a/classOFB.png b/classOFB.png new file mode 100644 index 00000000..4bf8fac5 Binary files /dev/null and b/classOFB.png differ diff --git a/classOFBCommon-members.html b/classOFBCommon-members.html new file mode 100644 index 00000000..5ee73a88 --- /dev/null +++ b/classOFBCommon-members.html @@ -0,0 +1,113 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
OFBCommon Member List
+
+
+ +

This is the complete list of members for OFBCommon, including all inherited members.

+ + + + + + + + + + + + + +
Cipher()Cipher
clear()OFBCommonvirtual
decrypt(uint8_t *output, const uint8_t *input, size_t len)OFBCommonvirtual
encrypt(uint8_t *output, const uint8_t *input, size_t len)OFBCommonvirtual
ivSize() const OFBCommonvirtual
keySize() const OFBCommonvirtual
OFBCommon()OFBCommonprotected
setBlockCipher(BlockCipher *cipher)OFBCommoninlineprotected
setIV(const uint8_t *iv, size_t len)OFBCommonvirtual
setKey(const uint8_t *key, size_t len)OFBCommonvirtual
~Cipher()Ciphervirtual
~OFBCommon()OFBCommonvirtual
+ + + + diff --git a/classOFBCommon.html b/classOFBCommon.html new file mode 100644 index 00000000..a3874b36 --- /dev/null +++ b/classOFBCommon.html @@ -0,0 +1,542 @@ + + + + + + +ArduinoLibs: OFBCommon Class Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+ +
+ +

Concrete base class to assist with implementing OFB for 128-bit block ciphers. + More...

+ +

#include <OFB.h>

+
+Inheritance diagram for OFBCommon:
+
+
+ + +Cipher +OFB< T > + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+virtual ~OFBCommon ()
 Destroys this cipher object after clearing sensitive information.
 
size_t keySize () const
 Default size of the key for this cipher, in bytes. More...
 
size_t ivSize () const
 Size of the initialization vector for this cipher, in bytes. More...
 
bool setKey (const uint8_t *key, size_t len)
 Sets the key to use for future encryption and decryption operations. More...
 
bool setIV (const uint8_t *iv, size_t len)
 Sets the initialization vector to use for future encryption and decryption operations. More...
 
void encrypt (uint8_t *output, const uint8_t *input, size_t len)
 Encrypts an input buffer and writes the ciphertext to an output buffer. More...
 
void decrypt (uint8_t *output, const uint8_t *input, size_t len)
 Decrypts an input buffer and writes the plaintext to an output buffer. More...
 
void clear ()
 Clears all security-sensitive state from this cipher. More...
 
- Public Member Functions inherited from Cipher
Cipher ()
 Constructs a new cipher object.
 
virtual ~Cipher ()
 Destroys this cipher object. More...
 
+ + + + + + + +

+Protected Member Functions

 OFBCommon ()
 Constructs a new cipher in OFB mode. More...
 
void setBlockCipher (BlockCipher *cipher)
 Sets the block cipher to use for this OFB object. More...
 
+

Detailed Description

+

Concrete base class to assist with implementing OFB for 128-bit block ciphers.

+

Reference: http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation

+
See Also
OFB
+ +

Definition at line 29 of file OFB.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + +
OFBCommon::OFBCommon ()
+
+protected
+
+ +

Constructs a new cipher in OFB mode.

+

This constructor should be followed by a call to setBlockCipher().

+ +

Definition at line 42 of file OFB.cpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
void OFBCommon::clear ()
+
+virtual
+
+ +

Clears all security-sensitive state from this cipher.

+

Security-sensitive information includes key schedules, initialization vectors, and any temporary state that is used by encrypt() or decrypt() which is stored in the cipher itself.

+ +

Implements Cipher.

+ +

Definition at line 113 of file OFB.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void OFBCommon::decrypt (uint8_t * output,
const uint8_t * input,
size_t len 
)
+
+virtual
+
+ +

Decrypts an input buffer and writes the plaintext to an output buffer.

+
Parameters
+ + + + +
outputThe output buffer to write to, which may be the same buffer as input. The output buffer must have at least as many bytes as the input buffer.
inputThe input buffer to read from.
lenThe number of bytes to decrypt.
+
+
+

The decrypt() function can be called multiple times with different regions of the ciphertext data.

+
See Also
encrypt()
+ +

Implements Cipher.

+ +

Definition at line 108 of file OFB.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void OFBCommon::encrypt (uint8_t * output,
const uint8_t * input,
size_t len 
)
+
+virtual
+
+ +

Encrypts an input buffer and writes the ciphertext to an output buffer.

+
Parameters
+ + + + +
outputThe output buffer to write to, which may be the same buffer as input. The output buffer must have at least as many bytes as the input buffer.
inputThe input buffer to read from.
lenThe number of bytes to encrypt.
+
+
+

The encrypt() function can be called multiple times with different regions of the plaintext data.

+
See Also
decrypt()
+ +

Implements Cipher.

+ +

Definition at line 85 of file OFB.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
size_t OFBCommon::ivSize () const
+
+virtual
+
+ +

Size of the initialization vector for this cipher, in bytes.

+

If the cipher does not need an initialization vector, this function will return zero.

+ +

Implements Cipher.

+ +

Definition at line 61 of file OFB.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
size_t OFBCommon::keySize () const
+
+virtual
+
+ +

Default size of the key for this cipher, in bytes.

+

If the cipher supports variable-sized keys, keySize() indicates the default or recommended key size. The cipher may support other key sizes.

+
See Also
setKey(), ivSize()
+ +

Implements Cipher.

+ +

Definition at line 56 of file OFB.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void OFBCommon::setBlockCipher (BlockCiphercipher)
+
+inlineprotected
+
+ +

Sets the block cipher to use for this OFB object.

+
Parameters
+ + +
cipherThe block cipher to use to implement OFB mode, which must have a block size of 16 bytes (128 bits).
+
+
+ +

Definition at line 47 of file OFB.h.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool OFBCommon::setIV (const uint8_t * iv,
size_t len 
)
+
+virtual
+
+ +

Sets the initialization vector to use for future encryption and decryption operations.

+
Parameters
+ + + +
ivThe initialization vector to use.
lenThe length of the initialization vector in bytes.
+
+
+
Returns
Returns false if the length is not supported.
+

Initialization vectors should be set before the first call to encrypt() or decrypt() after a setKey() call. If the initialization vector is changed after encryption or decryption begins, then the behaviour is undefined.

+
Note
The IV is not encoded into the output stream by encrypt(). The caller is responsible for communicating the IV to the other party.
+
See Also
ivSize()
+ +

Implements Cipher.

+ +

Definition at line 76 of file OFB.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool OFBCommon::setKey (const uint8_t * key,
size_t len 
)
+
+virtual
+
+ +

Sets the key to use for future encryption and decryption operations.

+
Parameters
+ + + +
keyThe key to use.
lenThe length of the key in bytes.
+
+
+
Returns
Returns false if the key length is not supported, or the key is somehow "weak" and unusable by this cipher.
+

Use clear() or the destructor to remove the key and any other sensitive data from the object once encryption or decryption is complete.

+

Calling setKey() resets the cipher. Any temporary data that was being retained for encrypting partial blocks will be abandoned.

+
See Also
keySize(), clear()
+ +

Implements Cipher.

+ +

Definition at line 66 of file OFB.cpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/classOFBCommon.png b/classOFBCommon.png new file mode 100644 index 00000000..87536b58 Binary files /dev/null and b/classOFBCommon.png differ diff --git a/classRNGClass-members.html b/classRNGClass-members.html new file mode 100644 index 00000000..ab0ed35a --- /dev/null +++ b/classRNGClass-members.html @@ -0,0 +1,113 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
RNGClass Member List
+
+
+ +

This is the complete list of members for RNGClass, including all inherited members.

+ + + + + + + + + + + + + +
available(size_t len) const RNGClass
begin(const char *tag, int eepromAddress)RNGClass
destroy()RNGClass
loop()RNGClass
rand(uint8_t *data, size_t len)RNGClass
RNGClass()RNGClass
save()RNGClass
SEED_SIZERNGClassstatic
setAutoSaveTime(uint16_t minutes)RNGClass
stir(const uint8_t *data, size_t len, unsigned int credit=0)RNGClass
stir(NoiseSource &source)RNGClass
~RNGClass()RNGClass
+ + + + diff --git a/classRNGClass.html b/classRNGClass.html new file mode 100644 index 00000000..f9569093 --- /dev/null +++ b/classRNGClass.html @@ -0,0 +1,524 @@ + + + + + + +ArduinoLibs: RNGClass Class Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+ +
+ +

Pseudo random number generator suitable for cryptography. + More...

+ +

#include <RNG.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 RNGClass ()
 Constructs a new random number generator instance. More...
 
~RNGClass ()
 Destroys this random number generator instance.
 
void begin (const char *tag, int eepromAddress)
 Initializes the random number generator. More...
 
void setAutoSaveTime (uint16_t minutes)
 Sets the amount of time between automatic seed saves. More...
 
void rand (uint8_t *data, size_t len)
 Generates random bytes into a caller-supplied buffer. More...
 
bool available (size_t len) const
 Determine if there is sufficient entropy available for a specific request size. More...
 
void stir (const uint8_t *data, size_t len, unsigned int credit=0)
 Stirs additional entropy data into the random pool. More...
 
void stir (NoiseSource &source)
 Stirs in data from a noise source into the random pool. More...
 
void save ()
 Saves the random seed to EEPROM. More...
 
void loop ()
 Run periodic housekeeping tasks on the random number generator. More...
 
void destroy ()
 Destroys the data in the random number pool and the saved seed in EEPROM. More...
 
+ + + + +

+Static Public Attributes

+static const int SEED_SIZE = 49
 Size of a saved random number seed in EEPROM space.
 
+

Detailed Description

+

Pseudo random number generator suitable for cryptography.

+

Random number generators must be seeded properly before they can be used or an adversary may be able to predict the random output. Seed data may be:

+
    +
  • Device-specific, for example serial numbers or MAC addresses.
  • +
  • Application-specific, unique to the application. The tag that is passed to begin() is an example of an application-specific value.
  • +
  • Noise-based, generated by a hardware random number generator that provides unpredictable values from a noise source.
  • +
+

The following example demonstrates how to initialise the random number generator:

+
#include <SPI.h>
+
#include <Ethernet.h>
+
#include <Crypto.h>
+
#include <RNG.h>
+
#include <TransistorNoiseSource.h>
+
+
// Noise source to seed the random number generator.
+ +
+
// MAC address for Ethernet communication.
+
byte mac_address[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
+
+
void setup() {
+
// Initialize the Ethernet shield.
+
Ethernet.begin(mac_address);
+
+
// Initialize the random number generator with the application tag
+
// "MyApp 1.0" and load the previous seed from EEPROM address 500.
+
RNG.begin("MyApp 1.0", 500);
+
+
// Stir in the Ethernet MAC address.
+
RNG.stir(mac_address, sizeof(mac_address));
+
+
// ...
+
}
+

The application should regularly call stir() to mix in new data from the noise source and also regularly call loop():

+
void loop() {
+
// ...
+
+
// If the noise source has accumulated new entropy, then stir it in.
+
RNG.stir(noise);
+
+
// Perform regular housekeeping on the random number generator.
+
RNG.loop();
+
+
// ...
+
}
+

The loop() function will automatically save the random number seed on a regular basis. By default the seed is saved every hour but this can be changed using setAutoSaveTime().

+

Keep in mind that saving too often may cause the EEPROM to wear out quicker. It is wise to limit saving to once an hour or once a day depending upon how long you intend to field the device before replacing it. For example, an EEPROM rated for 100k erase/write cycles will last about 69 days saving once a minute or 11 years saving once an hour.

+

The application can still elect to call save() at any time if wants. For example, if the application can detect power loss or shutdown conditions programmatically, then it may make sense to force a save() of the seed upon shutdown.

+
See Also
NoiseSource
+ +

Definition at line 31 of file RNG.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
RNGClass::RNGClass ()
+
+ +

Constructs a new random number generator instance.

+

This constructor must be followed by a call to begin() to properly initialize the random number generator.

+
See Also
begin()
+ +

Definition at line 167 of file RNG.cpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
bool RNGClass::available (size_t len) const
+
+ +

Determine if there is sufficient entropy available for a specific request size.

+
Parameters
+ + +
lenThe number of bytes of random data that will be requested via a call to rand().
+
+
+
Returns
Returns true if there is at least len * 8 bits of entropy in the random number pool, or false if not.
+

This function can be used by the application to wait for sufficient entropy to become available from the system's noise sources before generating important values. For example:

+
bool haveKey = false;
+
byte key[32];
+
+
void loop() {
+
...
+
+
if (!haveKey && RNG.available(sizeof(key))) {
+
RNG.rand(key, sizeof(key));
+
haveKey = true;
+
}
+
+
...
+
}
+

If len is larger than the maximum number of entropy credits supported by the random number pool (384 bits, 48 bytes), then the maximum will be used instead. For example, asking if 512 bits (64 bytes) are available will return true if in reality only 384 bits are available. If this is a problem for the application's security requirements, then large requests for random data should be broken up into smaller chunks with the application waiting for the entropy pool to refill between chunks.

+
See Also
rand()
+ +

Definition at line 354 of file RNG.cpp.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void RNGClass::begin (const char * tag,
int eepromAddress 
)
+
+ +

Initializes the random number generator.

+
Parameters
+ + + +
tagA string that is stirred into the random pool at startup; usually this should be a value that is unique to the application and version such as "MyApp 1.0" so that different applications do not generate the same sequence of values upon first boot.
eepromAddressThe EEPROM address to load the previously saved seed from and to save new seeds when save() is called. There must be at least SEED_SIZE (49) bytes of EEPROM space available at the address.
+
+
+

This function should be followed by calls to stir() to mix in additional entropy data from noise sources to initialize the random number generator properly.

+
See Also
stir(), save()
+ +

Definition at line 202 of file RNG.cpp.

+ +
+
+ +
+
+ + + + + + + +
void RNGClass::destroy ()
+
+ +

Destroys the data in the random number pool and the saved seed in EEPROM.

+

This function attempts to throw away any data that could theoretically be used to predict previous and future outputs of the random number generator if the device is captured, sold, or otherwise compromised.

+

After this function is called, begin() must be called again to re-initialize the random number generator, followed by stir() to add in new entropy from system noise sources.

+
Note
The rand() and save() functions take some care to manage the random number pool in a way that makes prediction of past outputs from a captured state very difficult. Future outputs may be predictable if noise or other high-entropy data is not mixed in with stir() on a regular basis.
+
See Also
begin()
+ +

Definition at line 513 of file RNG.cpp.

+ +
+
+ +
+
+ + + + + + + +
void RNGClass::loop ()
+
+ +

Run periodic housekeeping tasks on the random number generator.

+

This function must be called on a regular basis from the application's main "loop()" function.

+ +

Definition at line 486 of file RNG.cpp.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void RNGClass::rand (uint8_t * data,
size_t len 
)
+
+ +

Generates random bytes into a caller-supplied buffer.

+
Parameters
+ + + +
dataPoints to the buffer to fill with random bytes.
lenNumber of bytes to generate.
+
+
+

Calling this function will decrease the amount of entropy in the random number pool by len * 8 bits. If there isn't enough entropy, then this function will still return len bytes of random data generated from what entropy it does have.

+

If the application requires a specific amount of entropy before generating important values, the available() function can be polled to determine when sufficient entropy is available.

+
See Also
available(), stir()
+ +

Definition at line 277 of file RNG.cpp.

+ +
+
+ +
+
+ + + + + + + +
void RNGClass::save ()
+
+ +

Saves the random seed to EEPROM.

+

During system startup, noise sources typically won't have accumulated much entropy. But startup is usually the time when the system most needs to generate random data for session keys, IV's, and the like.

+

The purpose of this function is to pass some of the accumulated entropy from one session to the next after a loss of power. Thus, once the system has been running for a while it will get progressively better at generating random values and the accumulated entropy will not be completely lost.

+

Normally it isn't necessary to call save() directly. The loop() function will automatically save the seed on a periodic basis (default of 1 hour).

+

The seed that is saved is generated in such a way that it cannot be used to predict random values that were generated previously or subsequently in the current session. So a compromise of the EEPROM contents of a captured device should not result in compromise of random values that have already been generated. However, if power is lost and the system restarted, then there will be a short period of time where the random state will be predictable from the seed. For this reason it is very important to stir() in new noise data at startup.

+
See Also
loop(), stir()
+ +

Definition at line 468 of file RNG.cpp.

+ +
+
+ +
+
+ + + + + + + + +
void RNGClass::setAutoSaveTime (uint16_t minutes)
+
+ +

Sets the amount of time between automatic seed saves.

+
Parameters
+ + +
minutesThe number of minutes between automatic seed saves.
+
+
+

The default time between automatic seed saves is 1 hour.

+

This function is intended to help with EEPROM wear by slowing down how often seed data is saved as noise is stirred into the random pool. The exact period to use depends upon how long you intend to field the device before replacing it. For example, an EEPROM rated for 100k erase/write cycles will last about 69 days saving once a minute or 11 years saving once an hour.

+
See Also
save(), stir()
+ +

Definition at line 253 of file RNG.cpp.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void RNGClass::stir (const uint8_t * data,
size_t len,
unsigned int credit = 0 
)
+
+ +

Stirs additional entropy data into the random pool.

+
Parameters
+ + + + +
dataPoints to the additional data to be stirred in.
lenNumber of bytes to be stirred in.
creditThe number of bits of entropy to credit for the data that is stirred in. Note that this is bits, not bytes.
+
+
+

The maximum credit allowed is len * 8 bits, indicating that every bit in the input data is good and random. Practical noise sources are rarely that good, so credit will usually be smaller. For example, to credit 2 bits of entropy per byte, the function would be called as follows:

+
RNG.stir(noise_data, noise_bytes, noise_bytes * 2);
+

If credit is zero, then the data will be stirred in but no entropy credit is given. This is useful for static values like serial numbers and MAC addresses that are different between devices but highly predictable.

+
See Also
loop()
+ +

Definition at line 387 of file RNG.cpp.

+ +
+
+ +
+
+ + + + + + + + +
void RNGClass::stir (NoiseSourcesource)
+
+ +

Stirs in data from a noise source into the random pool.

+
Parameters
+ + +
sourceThe noise source to obtain entropy data from.
+
+
+
See Also
save(), NoiseSource::stir()
+ +

Definition at line 437 of file RNG.cpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/classRTC-members.html b/classRTC-members.html index 46df0a88..c3e001b6 100644 --- a/classRTC-members.html +++ b/classRTC-members.html @@ -3,6 +3,7 @@ + ArduinoLibs: Member List @@ -29,7 +30,7 @@
- + @@ -97,7 +98,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); dayOfWeek(const RTCDate *date)RTCstatic DayOfWeek enum nameRTC DECREMENTRTCstatic - Friday enum value (defined in RTC)RTC + Friday enum value (defined in RTC)RTC hasUpdates()RTCvirtual INCREMENTRTCstatic Monday enum value (defined in RTC)RTC @@ -109,9 +110,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); readTime(RTCTime *value)RTCvirtual RTC()RTC Saturday enum value (defined in RTC)RTC - Sunday enum value (defined in RTC)RTC + Sunday enum value (defined in RTC)RTC Thursday enum value (defined in RTC)RTC - Tuesday enum value (defined in RTC)RTC + Tuesday enum value (defined in RTC)RTC Wednesday enum value (defined in RTC)RTC WRAPRTCstatic writeAlarm(uint8_t alarmNum, const RTCAlarm *value)RTCvirtual @@ -122,9 +123,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classRTC.html b/classRTC.html index 904ebbbe..39a1c335 100644 --- a/classRTC.html +++ b/classRTC.html @@ -3,6 +3,7 @@ + ArduinoLibs: RTC Class Reference @@ -29,7 +30,7 @@ - + @@ -103,15 +104,15 @@ Inheritance diagram for RTC:
-DS1307RTC -DS3232RTC +DS1307RTC +DS3232RTC
-
} +

+

Public Types

enum  DayOfWeek {
-  Monday = 1, +  Monday = 1, Tuesday, Wednesday, Thursday, @@ -122,72 +123,94 @@ Public Types
 Day of the week corresponding to a date. More...
 
- - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + +

+

Public Member Functions

 RTC ()
 Constructs a new realtime clock handler.
 Constructs a new realtime clock handler. More...
 
virtual bool hasUpdates ()
 Returns true if the realtime clock has updated since the last call to this function.
 Returns true if the realtime clock has updated since the last call to this function. More...
 
virtual void readTime (RTCTime *value)
 Reads the current time from the realtime clock into value.
 Reads the current time from the realtime clock into value. More...
 
virtual void readDate (RTCDate *value)
 Reads the current date from the realtime clock into value.
 Reads the current date from the realtime clock into value. More...
 
virtual void writeTime (const RTCTime *value)
 Updates the time in the realtime clock to match value.
 Updates the time in the realtime clock to match value. More...
 
virtual void writeDate (const RTCDate *value)
 Updates the date in the realtime clock to match value.
 Updates the date in the realtime clock to match value. More...
 
virtual void readAlarm (uint8_t alarmNum, RTCAlarm *value)
 Reads the details of the alarm with index alarmNum into value.
 Reads the details of the alarm with index alarmNum into value. More...
 
virtual void writeAlarm (uint8_t alarmNum, const RTCAlarm *value)
 Updates the details of the alarm with index alarmNum from value.
 Updates the details of the alarm with index alarmNum from value. More...
 
virtual int byteCount () const
 Returns the number of bytes of non-volatile memory that can be used for storage of arbitrary settings, excluding storage used by alarms.
 Returns the number of bytes of non-volatile memory that can be used for storage of arbitrary settings, excluding storage used by alarms. More...
 
virtual uint8_t readByte (uint8_t offset)
 Reads the byte at offset within the realtime clock's non-volatile memory.
 Reads the byte at offset within the realtime clock's non-volatile memory. More...
 
virtual void writeByte (uint8_t offset, uint8_t value)
 Writes value to offset within the realtime clock's non-volatile memory.
 Writes value to offset within the realtime clock's non-volatile memory. More...
 
virtual int readTemperature ()
 Reads the value of the temperature sensor and returns the temperature in quarters of a degree celcius.
 Reads the value of the temperature sensor and returns the temperature in quarters of a degree celcius. More...
 
- - + + - + + - + + - + +

+

Static Public Member Functions

static void adjustDays (RTCDate *date, uint8_t flags)
 Adjusts date up or down one day according to flags.
 Adjusts date up or down one day according to flags. More...
 
static void adjustMonths (RTCDate *date, uint8_t flags)
 Adjusts date up or down one month according to flags.
 Adjusts date up or down one month according to flags. More...
 
static void adjustYears (RTCDate *date, uint8_t flags)
 Adjusts date up or down one year according to flags.
 Adjusts date up or down one year according to flags. More...
 
static DayOfWeek dayOfWeek (const RTCDate *date)
 Returns the day of the week corresponding to date.
 Returns the day of the week corresponding to date. More...
 
- - + + + - + + - + + +

+

Static Public Attributes

static const uint8_t ALARM_COUNT = 4
 Number of alarms that are supported by RTC::readAlarm() and RTC::writeAlarm().
 Number of alarms that are supported by RTC::readAlarm() and RTC::writeAlarm().
 
static const int NO_TEMPERATURE = 32767
 Value that is returned from readTemperature() if the realtime clock chip cannot determine the temperature.
 
static const uint8_t INCREMENT = 0x0000
 Increment the day, month, or year in a call to adjustDays(), adjustMonths(), or adjustYears().
 Increment the day, month, or year in a call to adjustDays(), adjustMonths(), or adjustYears().
 
static const uint8_t DECREMENT = 0x0001
 Decrement the day, month, or year in a call to adjustDays(), adjustMonths(), or adjustYears().
 Decrement the day, month, or year in a call to adjustDays(), adjustMonths(), or adjustYears().
 
static const uint8_t WRAP = 0x0002
 Wrap around to the beginning of the current month/year rather than advance to the next one.
 
-

Detailed Description

+

Detailed Description

Base class for realtime clock handlers.

This class simplifies the process of reading and writing the time and date information in a realtime clock chip. The class also provides support for reading and writing information about alarms and other clock settings.

-

It is intended that the application will instantiate a subclass of this class to handle the specific realtime clock chip in the system. The default implementation in RTC simulates a clock based on the value of millis(), with alarms and clock settings stored in main memory.

+

It is intended that the application will instantiate a subclass of this class to handle the specific realtime clock chip in the system. The default implementation in RTC simulates a clock based on the value of millis(), with alarms and clock settings stored in main memory.

Because the common DS1307 and DS3232 realtime clock chips use a 2-digit year, this class is also limited to dates between 2000 and 2099 inclusive.

-
See Also
RTCTime, RTCDate, RTCAlarm, DS1307RTC, DS3232RTC
+
See Also
RTCTime, RTCDate, RTCAlarm, DS1307RTC, DS3232RTC

Definition at line 49 of file RTC.h.

-

Member Enumeration Documentation

+

Member Enumeration Documentation

@@ -199,13 +222,13 @@ static const uint8_t 
-

Constructor & Destructor Documentation

+

Constructor & Destructor Documentation

@@ -220,13 +243,13 @@ static const uint8_t 
-

Member Function Documentation

+

Member Function Documentation

@@ -260,7 +283,7 @@ static const uint8_t 

Adjusts date up or down one day according to flags.

-
See Also
adjustMonths(), adjustYears()
+
See Also
adjustMonths(), adjustYears()

Definition at line 313 of file RTC.cpp.

@@ -299,7 +322,7 @@ static const uint8_t 

Adjusts date up or down one month according to flags.

-
See Also
adjustDays(), adjustYears()
+
See Also
adjustDays(), adjustYears()

Definition at line 343 of file RTC.cpp.

@@ -338,7 +361,7 @@ static const uint8_t 

Adjusts date up or down one year according to flags.

-
See Also
adjustDays(), adjustMonths()
+
See Also
adjustDays(), adjustMonths()

Definition at line 370 of file RTC.cpp.

@@ -366,7 +389,7 @@ static const uint8_t 

Returns the number of bytes of non-volatile memory that can be used for storage of arbitrary settings, excluding storage used by alarms.

-
See Also
readByte(), writeByte()
+
See Also
readByte(), writeByte()

Reimplemented in DS1307RTC, and DS3232RTC.

@@ -468,7 +491,7 @@ static const uint8_t Reads the details of the alarm with index alarmNum into value.

The alarmNum parameter must be between 0 and ALARM_COUNT - 1.

Alarm details are stored at the end of the realtime clock's non-volatile memory.

-
See Also
writeAlarm(), alarmCount()
+
See Also
writeAlarm(), alarmCount()

Reimplemented in DS1307RTC, and DS3232RTC.

@@ -500,7 +523,7 @@ static const uint8_t Reads the byte at offset within the realtime clock's non-volatile memory.

The offset parameter must be between 0 and byteCount() - 1.

-
See Also
writeByte(), byteCount()
+
See Also
writeByte(), byteCount()

Reimplemented in DS1307RTC, and DS3232RTC.

@@ -531,8 +554,8 @@ static const uint8_t 

Reads the current date from the realtime clock into value.

-

The time should be read first with readTime() as the default implementation only advances the date when the time is read and it crosses midnight.

-
See Also
writeDate(), readTime()
+

The time should be read first with readTime() as the default implementation only advances the date when the time is read and it crosses midnight.

+
See Also
writeDate(), readTime()

Reimplemented in DS1307RTC, and DS3232RTC.

@@ -593,7 +616,7 @@ static const uint8_t 

Reads the current time from the realtime clock into value.

-
See Also
writeTime(), readDate()
+
See Also
writeTime(), readDate()

Reimplemented in DS1307RTC, and DS3232RTC.

@@ -636,7 +659,7 @@ static const uint8_t Updates the details of the alarm with index alarmNum from value.

The alarmNum parameter must be between 0 and ALARM_COUNT - 1.

Alarm details are stored at the end of the realtime clock's non-volatile memory.

-
See Also
readAlarm(), alarmCount()
+
See Also
readAlarm(), alarmCount()

Reimplemented in DS1307RTC, and DS3232RTC.

@@ -678,7 +701,7 @@ static const uint8_t Writes value to offset within the realtime clock's non-volatile memory.

The offset parameter must be between 0 and byteCount() - 1.

-
See Also
readByte(), byteCount()
+
See Also
readByte(), byteCount()

Reimplemented in DS1307RTC, and DS3232RTC.

@@ -709,7 +732,7 @@ static const uint8_t 

Updates the date in the realtime clock to match value.

-
See Also
readDate(), writeTime()
+
See Also
readDate(), writeTime()

Reimplemented in DS1307RTC, and DS3232RTC.

@@ -740,7 +763,7 @@ static const uint8_t 

Updates the time in the realtime clock to match value.

-
See Also
readTime(), writeDate()
+
See Also
readTime(), writeDate()

Reimplemented in DS1307RTC, and DS3232RTC.

@@ -755,9 +778,9 @@ static const uint8_t  diff --git a/classRTCAlarm-members.html b/classRTCAlarm-members.html index 33ea53dd..fa1dc63d 100644 --- a/classRTCAlarm-members.html +++ b/classRTCAlarm-members.html @@ -3,6 +3,7 @@ + ArduinoLibs: Member List @@ -29,7 +30,7 @@
- + @@ -95,9 +96,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classRTCDate-members.html b/classRTCDate-members.html index cee66cf2..c285dfdc 100644 --- a/classRTCDate-members.html +++ b/classRTCDate-members.html @@ -3,6 +3,7 @@ + ArduinoLibs: Member List @@ -29,7 +30,7 @@
- + @@ -95,9 +96,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classRTCTime-members.html b/classRTCTime-members.html index 2d3a5d88..968e47c7 100644 --- a/classRTCTime-members.html +++ b/classRTCTime-members.html @@ -3,6 +3,7 @@ + ArduinoLibs: Member List @@ -29,7 +30,7 @@
- + @@ -95,9 +96,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classSHA1-members.html b/classSHA1-members.html new file mode 100644 index 00000000..63ce8c1d --- /dev/null +++ b/classSHA1-members.html @@ -0,0 +1,116 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
SHA1 Member List
+
+
+ +

This is the complete list of members for SHA1, including all inherited members.

+ + + + + + + + + + + + + + + + +
blockSize() const SHA1virtual
chunkSize (defined in SHA1)SHA1
clear()SHA1virtual
finalize(void *hash, size_t len)SHA1virtual
finalized (defined in SHA1)SHA1
h (defined in SHA1)SHA1
Hash()Hash
hashSize() const SHA1virtual
length (defined in SHA1)SHA1
reset()SHA1virtual
SHA1()SHA1
update(const void *data, size_t len)SHA1virtual
w (defined in SHA1)SHA1
~Hash()Hashvirtual
~SHA1()SHA1virtual
+ + + + diff --git a/classSHA1.html b/classSHA1.html new file mode 100644 index 00000000..582e2910 --- /dev/null +++ b/classSHA1.html @@ -0,0 +1,383 @@ + + + + + + +ArduinoLibs: SHA1 Class Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
SHA1 Class Reference
+
+
+ +

SHA-1 hash algorithm. + More...

+ +

#include <SHA1.h>

+
+Inheritance diagram for SHA1:
+
+
+ + +Hash + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

SHA1 ()
 Constructs a SHA-1 hash object.
 
+virtual ~SHA1 ()
 Destroys this SHA-1 hash object after clearing sensitive information.
 
size_t hashSize () const
 Size of the hash result from finalize(). More...
 
size_t blockSize () const
 Size of the internal block used by the hash algorithm. More...
 
void reset ()
 Resets the hash ready for a new hashing process. More...
 
void update (const void *data, size_t len)
 Updates the hash with more data. More...
 
void finalize (void *hash, size_t len)
 Finalizes the hashing process and returns the hash. More...
 
void clear ()
 Clears the hash state, removing all sensitive data, and then resets the hash ready for a new hashing process. More...
 
- Public Member Functions inherited from Hash
Hash ()
 Constructs a new hash object.
 
virtual ~Hash ()
 Destroys this hash object. More...
 
+

Detailed Description

+

SHA-1 hash algorithm.

+

Reference: http://en.wikipedia.org/wiki/SHA-1

+
See Also
SHA256
+ +

Definition at line 28 of file SHA1.h.

+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
size_t SHA1::blockSize () const
+
+virtual
+
+ +

Size of the internal block used by the hash algorithm.

+
See Also
update(), hashSize()
+ +

Implements Hash.

+ +

Definition at line 59 of file SHA1.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void SHA1::clear ()
+
+virtual
+
+ +

Clears the hash state, removing all sensitive data, and then resets the hash ready for a new hashing process.

+
See Also
reset()
+ +

Implements Hash.

+ +

Definition at line 137 of file SHA1.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void SHA1::finalize (void * hash,
size_t len 
)
+
+virtual
+
+ +

Finalizes the hashing process and returns the hash.

+
Parameters
+ + + +
hashThe buffer to return the hash value in.
lenThe length of the hash buffer, normally hashSize().
+
+
+

If len is less than hashSize(), then the hash value will be truncated to the first len bytes. If len is greater than hashSize(), then the remaining bytes will left unchanged.

+

If finalize() is called again, the same hash value is returned again until the next call to reset() or update().

+
See Also
reset(), update()
+ +

Implements Hash.

+ +

Definition at line 102 of file SHA1.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
size_t SHA1::hashSize () const
+
+virtual
+
+ +

Size of the hash result from finalize().

+
See Also
finalize(), blockSize()
+ +

Implements Hash.

+ +

Definition at line 54 of file SHA1.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void SHA1::reset ()
+
+virtual
+
+ +

Resets the hash ready for a new hashing process.

+
See Also
update(), finalize()
+ +

Implements Hash.

+ +

Definition at line 64 of file SHA1.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void SHA1::update (const void * data,
size_t len 
)
+
+virtual
+
+ +

Updates the hash with more data.

+
Parameters
+ + + +
dataData to be hashed.
lenNumber of bytes of data to be hashed.
+
+
+

If finalize() has already been called, then calling update() will reset() the hash and start a new hashing process.

+
See Also
reset(), finalize()
+ +

Implements Hash.

+ +

Definition at line 76 of file SHA1.cpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/classSHA1.png b/classSHA1.png new file mode 100644 index 00000000..c68d93bd Binary files /dev/null and b/classSHA1.png differ diff --git a/classSHA256-members.html b/classSHA256-members.html new file mode 100644 index 00000000..d3265d7e --- /dev/null +++ b/classSHA256-members.html @@ -0,0 +1,116 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
SHA256 Member List
+
+
+ +

This is the complete list of members for SHA256, including all inherited members.

+ + + + + + + + + + + + + + + + +
blockSize() const SHA256virtual
chunkSize (defined in SHA256)SHA256
clear()SHA256virtual
finalize(void *hash, size_t len)SHA256virtual
finalized (defined in SHA256)SHA256
h (defined in SHA256)SHA256
Hash()Hash
hashSize() const SHA256virtual
length (defined in SHA256)SHA256
reset()SHA256virtual
SHA256()SHA256
update(const void *data, size_t len)SHA256virtual
w (defined in SHA256)SHA256
~Hash()Hashvirtual
~SHA256()SHA256virtual
+ + + + diff --git a/classSHA256.html b/classSHA256.html new file mode 100644 index 00000000..3f09fc15 --- /dev/null +++ b/classSHA256.html @@ -0,0 +1,383 @@ + + + + + + +ArduinoLibs: SHA256 Class Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
SHA256 Class Reference
+
+
+ +

SHA-256 hash algorithm. + More...

+ +

#include <SHA256.h>

+
+Inheritance diagram for SHA256:
+
+
+ + +Hash + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

SHA256 ()
 Constructs a SHA-256 hash object.
 
+virtual ~SHA256 ()
 Destroys this SHA-256 hash object after clearing sensitive information.
 
size_t hashSize () const
 Size of the hash result from finalize(). More...
 
size_t blockSize () const
 Size of the internal block used by the hash algorithm. More...
 
void reset ()
 Resets the hash ready for a new hashing process. More...
 
void update (const void *data, size_t len)
 Updates the hash with more data. More...
 
void finalize (void *hash, size_t len)
 Finalizes the hashing process and returns the hash. More...
 
void clear ()
 Clears the hash state, removing all sensitive data, and then resets the hash ready for a new hashing process. More...
 
- Public Member Functions inherited from Hash
Hash ()
 Constructs a new hash object.
 
virtual ~Hash ()
 Destroys this hash object. More...
 
+

Detailed Description

+

SHA-256 hash algorithm.

+

Reference: http://en.wikipedia.org/wiki/SHA-2

+
See Also
SHA1, BLAKE2s
+ +

Definition at line 28 of file SHA256.h.

+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
size_t SHA256::blockSize () const
+
+virtual
+
+ +

Size of the internal block used by the hash algorithm.

+
See Also
update(), hashSize()
+ +

Implements Hash.

+ +

Definition at line 61 of file SHA256.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void SHA256::clear ()
+
+virtual
+
+ +

Clears the hash state, removing all sensitive data, and then resets the hash ready for a new hashing process.

+
See Also
reset()
+ +

Implements Hash.

+ +

Definition at line 142 of file SHA256.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void SHA256::finalize (void * hash,
size_t len 
)
+
+virtual
+
+ +

Finalizes the hashing process and returns the hash.

+
Parameters
+ + + +
hashThe buffer to return the hash value in.
lenThe length of the hash buffer, normally hashSize().
+
+
+

If len is less than hashSize(), then the hash value will be truncated to the first len bytes. If len is greater than hashSize(), then the remaining bytes will left unchanged.

+

If finalize() is called again, the same hash value is returned again until the next call to reset() or update().

+
See Also
reset(), update()
+ +

Implements Hash.

+ +

Definition at line 107 of file SHA256.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
size_t SHA256::hashSize () const
+
+virtual
+
+ +

Size of the hash result from finalize().

+
See Also
finalize(), blockSize()
+ +

Implements Hash.

+ +

Definition at line 56 of file SHA256.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void SHA256::reset ()
+
+virtual
+
+ +

Resets the hash ready for a new hashing process.

+
See Also
update(), finalize()
+ +

Implements Hash.

+ +

Definition at line 66 of file SHA256.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void SHA256::update (const void * data,
size_t len 
)
+
+virtual
+
+ +

Updates the hash with more data.

+
Parameters
+ + + +
dataData to be hashed.
lenNumber of bytes of data to be hashed.
+
+
+

If finalize() has already been called, then calling update() will reset() the hash and start a new hashing process.

+
See Also
reset(), finalize()
+ +

Implements Hash.

+ +

Definition at line 81 of file SHA256.cpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/classSHA256.png b/classSHA256.png new file mode 100644 index 00000000..b3599afe Binary files /dev/null and b/classSHA256.png differ diff --git a/classSoftI2C-members.html b/classSoftI2C-members.html index c16fca72..bdf6c55f 100644 --- a/classSoftI2C-members.html +++ b/classSoftI2C-members.html @@ -3,6 +3,7 @@ + ArduinoLibs: Member List @@ -29,7 +30,7 @@
- + @@ -100,9 +101,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classSoftI2C.html b/classSoftI2C.html index b832cc84..8908c716 100644 --- a/classSoftI2C.html +++ b/classSoftI2C.html @@ -3,6 +3,7 @@ + ArduinoLibs: SoftI2C Class Reference @@ -29,7 +30,7 @@
- + @@ -100,39 +101,47 @@ Inheritance diagram for SoftI2C:
-I2CMaster +I2CMaster
- + + - + + - + + - + + - + + - + + - + +

+

Public Member Functions

 SoftI2C (uint8_t dataPin, uint8_t clockPin)
 Constructs a new software I2C master on dataPin and clockPin.
 
unsigned int maxTransferSize () const
 Returns the maximum number of bytes that can be read or written in a single request by this bus master.
 
void startWrite (unsigned int address)
 Starts a write operation by sending a start condition and the I2C control byte.
 Starts a write operation by sending a start condition and the I2C control byte. More...
 
void write (uint8_t value)
 Writes a single byte value on the I2C bus.
 Writes a single byte value on the I2C bus. More...
 
bool endWrite ()
 Ends the current write operation.
 Ends the current write operation. More...
 
bool startRead (unsigned int address, unsigned int count)
 Starts a read operation for count bytes by sending the start condition and the I2C control byte.
 Starts a read operation for count bytes by sending the start condition and the I2C control byte. More...
 
unsigned int available ()
 Returns the number of bytes that are still available for reading.
 Returns the number of bytes that are still available for reading. More...
 
uint8_t read ()
 Reads a single byte from the I2C bus.
 Reads a single byte from the I2C bus. More...
 
-

Detailed Description

+

Detailed Description

Bit-banged implementation of an I2C master.

This class implements the I2C master protocol on any arbitrary pair of data and clock pins. It is not restricted to pre-defined pins as is the case for the standard Arduino two-wire interface.

This implementation only implements the master side of the protocol. It assumes that there is a single bus master, no arbitration, and no clock stretching.

-
See Also
I2CMaster
+
See Also
I2CMaster

Definition at line 28 of file SoftI2C.h.

-

Member Function Documentation

+

Member Function Documentation

@@ -155,7 +164,7 @@ unsigned int 

Returns the number of bytes that are still available for reading.

-
See Also
startRead(), read()
+
See Also
startRead(), read()

Implements I2CMaster.

@@ -186,7 +195,7 @@ unsigned int Ends the current write operation.

Returns true if the write operation was acknowledged; false otherwise.

-
See Also
startWrite(), write()
+
See Also
startWrite(), write()

Implements I2CMaster.

@@ -216,7 +225,7 @@ unsigned int 

Reads a single byte from the I2C bus.

-
See Also
startRead(), available()
+
See Also
startRead(), available()

Implements I2CMaster.

@@ -258,8 +267,8 @@ unsigned int Starts a read operation for count bytes by sending the start condition and the I2C control byte.

The address must be the 7-bit or 10-bit address of the I2C slave on the bus.

-

Returns true if the read request was acknowledged by the I2C slave or false otherwise. If true, this function should be followed by count calls to read() to fetch the bytes.

-
See Also
available(), read(), startWrite()
+

Returns true if the read request was acknowledged by the I2C slave or false otherwise. If true, this function should be followed by count calls to read() to fetch the bytes.

+
See Also
available(), read(), startWrite()

Implements I2CMaster.

@@ -291,7 +300,7 @@ unsigned int Starts a write operation by sending a start condition and the I2C control byte.

The address must be the 7-bit or 10-bit address of the I2C slave on the bus.

-
See Also
write(), endWrite(), startRead()
+
See Also
write(), endWrite(), startRead()

Reimplemented from I2CMaster.

@@ -322,7 +331,7 @@ unsigned int 

Writes a single byte value on the I2C bus.

-
See Also
startWrite(), endWrite()
+
See Also
startWrite(), endWrite()

Implements I2CMaster.

@@ -337,9 +346,9 @@ unsigned int  diff --git a/classTextField-members.html b/classTextField-members.html index 408a0618..074dc48e 100644 --- a/classTextField-members.html +++ b/classTextField-members.html @@ -3,6 +3,7 @@ + ArduinoLibs: Member List @@ -29,7 +30,7 @@
- + @@ -108,9 +109,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classTextField.html b/classTextField.html index f5184281..919e31b5 100644 --- a/classTextField.html +++ b/classTextField.html @@ -3,6 +3,7 @@ + ArduinoLibs: TextField Class Reference @@ -29,7 +30,7 @@
- + @@ -90,7 +91,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
-

Field that displays a read-only text value. +

Field that displays a read-only text value. More...

#include <TextField.h>

@@ -100,73 +101,89 @@ Inheritance diagram for TextField:
-Field +Field
- - + + - + + - + + - + + - - + + + - + + + - + + - + + - + + - + + - + + - + + - + +

+

Public Member Functions

 TextField (const String &label)
 Constructs a new text field with a specific label.
 Constructs a new text field with a specific label. More...
 
 TextField (Form &form, const String &label, const String &value)
 Constructs a new text field with a specific label and value attaches it to a form.
 Constructs a new text field with a specific label and value attaches it to a form. More...
 
void enterField (bool reverse)
 Enters the field due to form navigation.
 Enters the field due to form navigation. More...
 
const String & value () const
 Returns the text value that is currently displayed by this field.
 Returns the text value that is currently displayed by this field. More...
 
void setValue (const String &value)
 Sets the text value that is displayed by this field.
- Public Member Functions inherited from Field
 Sets the text value that is displayed by this field. More...
 
- Public Member Functions inherited from Field
 Field (const String &label)
 Constructs a new field with a specific label.
 Constructs a new field with a specific label. More...
 
 Field (Form &form, const String &label)
 Constructs a new field with a specific label and attaches it to a form.
 
 ~Field ()
 Destroys this field and removes it from its owning Form.
 Destroys this field and removes it from its owning Form. More...
 
Formform () const
 Returns the Form that owns this field; null if not associated with a Form.
 Returns the Form that owns this field; null if not associated with a Form.
 
virtual int dispatch (int event)
 Dispatches event via this field.
 Dispatches event via this field. More...
 
virtual void exitField ()
 Exits the field due to form navigation.
 Exits the field due to form navigation. More...
 
const String & label () const
 Returns the label to display in the first line of this field.
 Returns the label to display in the first line of this field. More...
 
void setLabel (const String &label)
 Sets the label to display in the first line of this field.
 Sets the label to display in the first line of this field. More...
 
bool isCurrent () const
 Returns true if this field is the currently-displayed field in its owning form; false otherwise.
 Returns true if this field is the currently-displayed field in its owning form; false otherwise. More...
 
- - + - + + - + +

+

Additional Inherited Members

- Protected Member Functions inherited from Field
- Protected Member Functions inherited from Field
LiquidCrystal * lcd () const
 Returns the LCD that this field is being drawn on.
 Returns the LCD that this field is being drawn on.
 
virtual void updateCursor ()
 Updates the cursor position after the label has been drawn by setLabel().
 Updates the cursor position after the label has been drawn by setLabel(). More...
 
-

Detailed Description

-

Field that displays a read-only text value.

-

This following example displays a text field with the label "Form example" and a value() of "v1.0".

-
Form mainForm(lcd);
-
TextField welcomeField(mainForm, "Form example", "v1.0");
+

Detailed Description

+

Field that displays a read-only text value.

+

This following example displays a text field with the label "Form example" and a value() of "v1.0".

+
Form mainForm(lcd);
+
TextField welcomeField(mainForm, "Form example", "v1.0");
FormText.png
-

As well as static messages, TextField can be used to display read-only information that is computed at runtime:

-
TextField timeField(mainForm, "Time since reset", "0");
+

As well as static messages, TextField can be used to display read-only information that is computed at runtime:

+
TextField timeField(mainForm, "Time since reset", "0");
void loop() {
timeField.setValue(millis() / 1000);
-
mainForm.dispatch(lcd.getButton());
+
mainForm.dispatch(lcd.getButton());
}
-

For writable fields, use BoolField, IntField, or TimeField.

-
See Also
Field
+

For writable fields, use BoolField, IntField, or TimeField.

+
See Also
Field

Definition at line 28 of file TextField.h.

-

Constructor & Destructor Documentation

+

Constructor & Destructor Documentation

@@ -190,9 +207,9 @@ LiquidCrystal * 

Constructs a new text field with a specific label.

-

The field is initially not associated with a Form. The field can be added to a form later using Form::addField().

-

The initial value() will be the empty string.

-
See Also
Form::addField()
+

The field is initially not associated with a Form. The field can be added to a form later using Form::addField().

+

The initial value() will be the empty string.

+
See Also
Form::addField()

Definition at line 66 of file TextField.cpp.

@@ -229,13 +246,13 @@ LiquidCrystal * 
-

Member Function Documentation

+

Member Function Documentation

@@ -261,8 +278,8 @@ LiquidCrystal * Enters the field due to form navigation.

This function is typically called when the user presses Left and Right buttons to navigate to the field. If reverse is true, then navigation was due to the Left button being pressed.

This function can assume that the display has been cleared and the cursor is positioned at (0, 0).

-

The default implementation prints the label().

-
See Also
exitField()
+

The default implementation prints the label().

+
See Also
exitField()

Reimplemented from Field.

@@ -285,7 +302,7 @@ LiquidCrystal * 

Sets the text value that is displayed by this field.

-
See Also
value()
+
See Also
value()

Definition at line 102 of file TextField.cpp.

@@ -313,7 +330,7 @@ LiquidCrystal * 

Returns the text value that is currently displayed by this field.

-
See Also
setValue()
+
See Also
setValue()

Definition at line 35 of file TextField.h.

@@ -326,9 +343,9 @@ LiquidCrystal *  diff --git a/classTimeField-members.html b/classTimeField-members.html index a6b9df70..e50aa319 100644 --- a/classTimeField-members.html +++ b/classTimeField-members.html @@ -3,6 +3,7 @@ + ArduinoLibs: Member List @@ -29,7 +30,7 @@
- + @@ -112,9 +113,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classTimeField.html b/classTimeField.html index 1344732f..c44c3546 100644 --- a/classTimeField.html +++ b/classTimeField.html @@ -3,6 +3,7 @@ + ArduinoLibs: TimeField Class Reference @@ -29,7 +30,7 @@
- + @@ -90,7 +91,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
-

Field that manages the display and editing of a time value. +

Field that manages the display and editing of a time value. More...

#include <TimeField.h>

@@ -100,85 +101,105 @@ Inheritance diagram for TimeField:
-Field +Field
- - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - - + + + - + + + - + + - + + - + + - + + - + +

+

Public Member Functions

 TimeField (const String &label)
 Constructs a new time field with a specific label.
 Constructs a new time field with a specific label. More...
 
 TimeField (Form &form, const String &label, int maxHours, bool readOnly)
 Constructs a new boolean field with a specific label and attaches it to a form.
 Constructs a new boolean field with a specific label and attaches it to a form. More...
 
int dispatch (int event)
 Dispatches event via this field.
 Dispatches event via this field. More...
 
void enterField (bool reverse)
 Enters the field due to form navigation.
 Enters the field due to form navigation. More...
 
void exitField ()
 Exits the field due to form navigation.
 Exits the field due to form navigation. More...
 
unsigned long value () const
 Returns the current value of this time field, in seconds.
 Returns the current value of this time field, in seconds. More...
 
void setValue (unsigned long value)
 Sets the value of this time field, in seconds.
 Sets the value of this time field, in seconds. More...
 
int maxHours () const
 Returns the maximum number of hours before the field wraps around.
 Returns the maximum number of hours before the field wraps around. More...
 
void setMaxHours (int maxHours)
 Sets the maximum number of hours before the field wraps around to maxHours.
 Sets the maximum number of hours before the field wraps around to maxHours. More...
 
bool readOnly () const
 Returns TIMEFIELD_READ_ONLY (true) or TIMEFIELD_READ_WRITE (false).
 Returns TIMEFIELD_READ_ONLY (true) or TIMEFIELD_READ_WRITE (false). More...
 
void setReadOnly (bool value)
 Sets the read-only state of this field to value.
- Public Member Functions inherited from Field
 Sets the read-only state of this field to value. More...
 
- Public Member Functions inherited from Field
 Field (const String &label)
 Constructs a new field with a specific label.
 Constructs a new field with a specific label. More...
 
 Field (Form &form, const String &label)
 Constructs a new field with a specific label and attaches it to a form.
 
 ~Field ()
 Destroys this field and removes it from its owning Form.
 Destroys this field and removes it from its owning Form. More...
 
Formform () const
 Returns the Form that owns this field; null if not associated with a Form.
 Returns the Form that owns this field; null if not associated with a Form.
 
const String & label () const
 Returns the label to display in the first line of this field.
 Returns the label to display in the first line of this field. More...
 
void setLabel (const String &label)
 Sets the label to display in the first line of this field.
 Sets the label to display in the first line of this field. More...
 
bool isCurrent () const
 Returns true if this field is the currently-displayed field in its owning form; false otherwise.
 Returns true if this field is the currently-displayed field in its owning form; false otherwise. More...
 
- - + - + + - + +

+

Additional Inherited Members

- Protected Member Functions inherited from Field
- Protected Member Functions inherited from Field
LiquidCrystal * lcd () const
 Returns the LCD that this field is being drawn on.
 Returns the LCD that this field is being drawn on.
 
virtual void updateCursor ()
 Updates the cursor position after the label has been drawn by setLabel().
 Updates the cursor position after the label has been drawn by setLabel(). More...
 
-

Detailed Description

-

Field that manages the display and editing of a time value.

-

TimeField is suitable for displaying wall clock time in 24-hour format, or for displaying timeouts and durations in seconds. Times are specified in seconds as an unsigned long value. They are displayed as HH:MM:SS, for hours, minutes, and seconds.

+

Detailed Description

+

Field that manages the display and editing of a time value.

+

TimeField is suitable for displaying wall clock time in 24-hour format, or for displaying timeouts and durations in seconds. Times are specified in seconds as an unsigned long value. They are displayed as HH:MM:SS, for hours, minutes, and seconds.

The time field can be either read-only or read-write. When read-write, the Up, Down, Left, and Right buttons can be used to modify the hour, minute, and second components of the time value.

The following example displays the number of hours, minutes, and seconds since the device was reset, wrapping around after 24 hours:

-
Form mainForm(lcd);
-
TimeField timeField(mainForm, "Time since reset", 24, TIMEFIELD_READ_ONLY);
+
Form mainForm(lcd);
+
TimeField timeField(mainForm, "Time since reset", 24, TIMEFIELD_READ_ONLY);
void loop() {
timeField.setValue(millis() / 1000);
-
mainForm.dispatch(lcd.getButton());
+
mainForm.dispatch(lcd.getButton());
}
FormTimeRO.png

A read-write field can be used to ask the user for the duration of an application count-down timer:

-
TimeField durationField(mainForm, "Timer duration", 24, TIMEFIELD_READ_WRITE);
+
TimeField durationField(mainForm, "Timer duration", 24, TIMEFIELD_READ_WRITE);
FormTimeRW.png
-
See Also
Field
+
See Also
Field

Definition at line 31 of file TimeField.h.

-

Constructor & Destructor Documentation

+

Constructor & Destructor Documentation

@@ -202,9 +223,9 @@ LiquidCrystal * 

Constructs a new time field with a specific label.

-

The field is initially not associated with a Form. The field can be added to a form later using Form::addField().

-

Initially value() is 0, maxHours() is 24, and isReadOnly() is TIMEFIELD_READ_WRITE.

-
See Also
Form::addField()
+

The field is initially not associated with a Form. The field can be added to a form later using Form::addField().

+

Initially value() is 0, maxHours() is 24, and isReadOnly() is TIMEFIELD_READ_WRITE.

+
See Also
Form::addField()

Definition at line 82 of file TimeField.cpp.

@@ -247,15 +268,15 @@ LiquidCrystal * 

Constructs a new boolean field with a specific label and attaches it to a form.

-

The initial value() of the field will be 0. The value() will be limited to be less than maxHours * 60 * 60 seconds.

+

The initial value() of the field will be 0. The value() will be limited to be less than maxHours * 60 * 60 seconds.

If readOnly is TIMEFIELD_READ_ONLY, then the field will display times but not allow them to be modified by the user. If readOnly is TIMEFIELD_READ_WRITE, then the field will modifiable by the user.

-
See Also
value()
+
See Also
value()

Definition at line 105 of file TimeField.cpp.

-

Member Function Documentation

+

Member Function Documentation

@@ -279,11 +300,11 @@ LiquidCrystal * 

Dispatches event via this field.

-

The event is usually obtained from LCD::getButton().

+

The event is usually obtained from LCD::getButton().

Returns zero if the event has been handled and no further action is required.

Returns FORM_CHANGED if the event has changed the value of this field in a manner that may require the application to take further action based on the new field value.

-

Returns -1 if the event is not handled by this field, and should be handled by the Form itself (particularly for Left and Right buttons). The default implementation returns -1 for all events.

-
See Also
Form::dispatch(), LCD::getButton()
+

Returns -1 if the event is not handled by this field, and should be handled by the Form itself (particularly for Left and Right buttons). The default implementation returns -1 for all events.

+
See Also
Form::dispatch(), LCD::getButton()

Reimplemented from Field.

@@ -316,8 +337,8 @@ LiquidCrystal * Enters the field due to form navigation.

This function is typically called when the user presses Left and Right buttons to navigate to the field. If reverse is true, then navigation was due to the Left button being pressed.

This function can assume that the display has been cleared and the cursor is positioned at (0, 0).

-

The default implementation prints the label().

-
See Also
exitField()
+

The default implementation prints the label().

+
See Also
exitField()

Reimplemented from Field.

@@ -348,7 +369,7 @@ LiquidCrystal * Exits the field due to form navigation.

This function is typically called when the user presses Left and Right buttons to navigate from the field.

-
See Also
enterField()
+
See Also
enterField()

Reimplemented from Field.

@@ -378,7 +399,7 @@ LiquidCrystal * 

Returns the maximum number of hours before the field wraps around.

-
See Also
setMaxHours(), setValue()
+
See Also
setMaxHours(), setValue()

Definition at line 44 of file TimeField.h.

@@ -406,7 +427,7 @@ LiquidCrystal * 

Returns TIMEFIELD_READ_ONLY (true) or TIMEFIELD_READ_WRITE (false).

-
See Also
setReadOnly()
+
See Also
setReadOnly()

Definition at line 47 of file TimeField.h.

@@ -435,7 +456,7 @@ LiquidCrystal * 

Sets the maximum number of hours before the field wraps around to maxHours.

-
See Also
maxHours(), setValue()
+
See Also
maxHours(), setValue()

Definition at line 45 of file TimeField.h.

@@ -457,7 +478,7 @@ LiquidCrystal * Sets the read-only state of this field to value.

The value should be one of TIMEFIELD_READ_ONLY (true) or TIMEFIELD_READ_WRITE (false). Use of the named constants is recommended.

-
See Also
readOnly()
+
See Also
readOnly()

Definition at line 268 of file TimeField.cpp.

@@ -478,8 +499,8 @@ LiquidCrystal * 

Sets the value of this time field, in seconds.

-

If value is greater than or equal to maxHours() * 60 * 60, then it will be wrapped around to fall within the valid range.

-
See Also
value(), maxHours()
+

If value is greater than or equal to maxHours() * 60 * 60, then it will be wrapped around to fall within the valid range.

+
See Also
value(), maxHours()

Definition at line 227 of file TimeField.cpp.

@@ -507,7 +528,7 @@ LiquidCrystal * 

Returns the current value of this time field, in seconds.

-
See Also
setValue()
+
See Also
setValue()

Definition at line 41 of file TimeField.h.

@@ -520,9 +541,9 @@ LiquidCrystal *  diff --git a/classTransistorNoiseSource-members.html b/classTransistorNoiseSource-members.html new file mode 100644 index 00000000..40e84ec7 --- /dev/null +++ b/classTransistorNoiseSource-members.html @@ -0,0 +1,108 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
TransistorNoiseSource Member List
+
+
+ +

This is the complete list of members for TransistorNoiseSource, including all inherited members.

+ + + + + + + + +
calibrating() const TransistorNoiseSourcevirtual
NoiseSource()NoiseSource
output(const uint8_t *data, size_t len, unsigned int credit)NoiseSourceprotectedvirtual
stir()TransistorNoiseSourcevirtual
TransistorNoiseSource(uint8_t pin)TransistorNoiseSourceexplicit
~NoiseSource()NoiseSourcevirtual
~TransistorNoiseSource() (defined in TransistorNoiseSource)TransistorNoiseSourcevirtual
+ + + + diff --git a/classTransistorNoiseSource.html b/classTransistorNoiseSource.html new file mode 100644 index 00000000..37021280 --- /dev/null +++ b/classTransistorNoiseSource.html @@ -0,0 +1,285 @@ + + + + + + +ArduinoLibs: TransistorNoiseSource Class Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
TransistorNoiseSource Class Reference
+
+
+ +

Processes the signal from a transistor-based noise source. + More...

+ +

#include <TransistorNoiseSource.h>

+
+Inheritance diagram for TransistorNoiseSource:
+
+
+ + +NoiseSource + +
+ + + + + + + + + + + + + + + + + + +

+Public Member Functions

 TransistorNoiseSource (uint8_t pin)
 Constructs a new transitor-based noise source handler. More...
 
bool calibrating () const
 Determine if the noise source is still calibrating itself. More...
 
void stir ()
 Stirs entropy from this noise source into the global random number pool. More...
 
- Public Member Functions inherited from NoiseSource
NoiseSource ()
 Constructs a new random noise source.
 
+virtual ~NoiseSource ()
 Destroys this random noise source.
 
+ + + + + +

+Additional Inherited Members

- Protected Member Functions inherited from NoiseSource
virtual void output (const uint8_t *data, size_t len, unsigned int credit)
 Called from subclasses to output noise to the global random number pool. More...
 
+

Detailed Description

+

Processes the signal from a transistor-based noise source.

+

This class processes input from a transistor-based noise source, such as that described by Rob Seward. See that Web page for full details on how such noise sources work, how the output should be used, and caveats for the unwary. For convenience, Rob's circuit is reproduced below:

+
+transistor_noise_source.png +
+

The following example shows how to initialize a transistor-based noise source and use it with RNG. The noise is read from the A1 pin on the Arduino and stirred into the random number pool on a regular basis. For more information, see the documentation for RNG.

+
#include <Crypto.h>
+
#include <RNG.h>
+
#include <TransistorNoiseSource.h>
+
+
// Noise source to seed the random number generator.
+ +
+
void setup() {
+
// Initialize the random number generator with the application tag
+
// "MyApp 1.0" and load the previous seed from EEPROM address 500.
+
RNG.begin("MyApp 1.0", 500);
+
+
// ...
+
}
+
+
void loop() {
+
// ...
+
+
// If the noise source has accumulated new entropy, then stir it in.
+
RNG.stir(noise);
+
+
// Perform regular housekeeping on the random number generator.
+
RNG.loop();
+
+
// ...
+
}
+
See Also
RNG, NoiseSource
+ +

Definition at line 29 of file TransistorNoiseSource.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
TransistorNoiseSource::TransistorNoiseSource (uint8_t pin)
+
+explicit
+
+ +

Constructs a new transitor-based noise source handler.

+
Parameters
+ + +
pinThe analog input pin that the noise will appear on.
+
+
+ +

Definition at line 138 of file TransistorNoiseSource.cpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
bool TransistorNoiseSource::calibrating () const
+
+virtual
+
+ +

Determine if the noise source is still calibrating itself.

+
Returns
Returns true if calibration is in progress; false if the noise source is generating valid random data.
+

Noise sources that require calibration start doing so at system startup and then switch over to random data generation once calibration is complete. Since no random data is being generated during calibration, the output from RNG.rand() may be predictable. Use RNG.available() to determine when sufficient entropy is available to generate good random values.

+

It is possible that the noise source never exits calibration. This can happen if the input voltage is insufficient to trigger noise or if the noise source is not connected. Noise sources may also periodically recalibrate themselves.

+
See Also
stir()
+ +

Implements NoiseSource.

+ +

Definition at line 156 of file TransistorNoiseSource.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void TransistorNoiseSource::stir ()
+
+virtual
+
+ +

Stirs entropy from this noise source into the global random number pool.

+

This function should call output() to add the entropy from this noise source to the global random number pool.

+

The noise source should batch up the entropy data, providing between 16 and 48 bytes of data each time. If the noise source does not have sufficient entropy data at the moment, it should return without stiring the current data in.

+
See Also
calibrating(), output()
+ +

Implements NoiseSource.

+ +

Definition at line 161 of file TransistorNoiseSource.cpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/classTransistorNoiseSource.png b/classTransistorNoiseSource.png new file mode 100644 index 00000000..7bbe617d Binary files /dev/null and b/classTransistorNoiseSource.png differ diff --git a/classes.html b/classes.html index 9d4430fe..048df882 100644 --- a/classes.html +++ b/classes.html @@ -3,6 +3,7 @@ + ArduinoLibs: Class Index @@ -29,7 +30,7 @@
- + @@ -86,40 +87,50 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Class Index
-
B | C | D | E | F | I | L | M | R | S | T
+
A | B | C | D | E | F | H | I | L | M | N | O | R | S | T
+ + + + + + - - - - - - - - - - - + + + + + + + + + + + +
  A  
+
CBCCommon   
  F  
+
  M  
+
RTCTime   
CFB   
  S  
+
AES128   CFBCommon   Field   Melody   
AES192   ChaCha   Form   
  N  
+
SHA1   
AES256   Charlieplex   
  H  
+
SHA256   
AESCommon   ChaseLEDs   NoiseSource   SoftI2C   
  B  
-
DS1307RTC   IntField   RTCAlarm   
DS3232RTC   IRreceiver   RTCDate   
Bitmap   
  E  
-
  L  
-
RTCTime   
BlinkLED   
  S  
-
BoolField   EEPROM24   LCD   
  C  
-
  F  
-
ListField   SoftI2C   
  M  
+
Cipher   Hash   
  O  
  T  
-
Charlieplex   Field   
ChaseLEDs   Form   Melody   TextField   
  D  
-
  I  
-
  R  
-
TimeField   
DMD   I2CMaster   RTC   
CTR   
  I  
+
Bitmap   CTRCommon   OFB   TextField   
BLAKE2s   Curve25519   I2CMaster   OFBCommon   TimeField   
BlinkLED   
  D  
+
IntField   
  R  
+
TransistorNoiseSource   
BlockCipher   IRreceiver   
BoolField   DMD   
  L  
+
RNGClass   
  C  
+
DS1307RTC   RTC   
DS3232RTC   LCD   RTCAlarm   
CBC   
  E  
+
ListField   RTCDate   
EEPROM24   
-
B | C | D | E | F | I | L | M | R | S | T
+
A | B | C | D | E | F | H | I | L | M | N | O | R | S | T
diff --git a/crypto.html b/crypto.html new file mode 100644 index 00000000..4dcee283 --- /dev/null +++ b/crypto.html @@ -0,0 +1,140 @@ + + + + + + +ArduinoLibs: Cryptographic Library + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + +
+ +
+ +
+
+
+
Cryptographic Library
+
+
+

+Supported Algorithms

+ +

All cryptographic algorithms have been optimized for 8-bit Arduino platforms like the Uno. Memory usage is also reduced, particularly for SHA1 and SHA256 which save 256 and 192 bytes respectively over traditional implementations. For other algorithms, static sbox tables and the like are placed into program memory to further reduce data memory usage.

+

ChaCha with 20 rounds and 256-bit keys is the recommended symmetric encryption algorithm because it is twice as fast as AES128, constant-time, and much more secure. AES128, AES192, and AES256 are provided for use in applications where compatibility with other systems is desirable.

+

BLAKE2s is a variation on the ChaCha stream cipher, designed for hashing, with a 256-bit hash output. It is intended as a high performance drop-in replacement for SHA256 for when speed is critical but exact SHA256 compatibility is not.

+

+Performance

+

All figures are for the Arduino Uno running at 16 MHz. Figures for the Ardunino Mega 2560 running at 16 MHz are similar:

+ + + + + + + + + + + + + + + + + + + + + +
AlgorithmEncryption / Hashing (per byte)Decryption (per byte)Key SetupState Size (bytes)
AES128 (ECB mode)36.90us66.48us160.00us208
AES192 (ECB mode)44.20us80.35us166.54us240
AES256 (ECB mode)51.50us94.22us227.97us272
ChaCha (20 rounds)14.87us14.88us43.74us130
ChaCha (12 rounds)10.38us10.38us43.74us130
ChaCha (8 rounds)8.13us8.14us43.74us130
SHA121.90us94
SHA25643.85us106
BLAKE2s18.54us170
+

Where a cipher supports more than one key size (such as ChaCha), the values are typically almost identical for 128-bit and 256-bit keys so only the maximum is shown above.

+

Public key algorithms have the following results on an Arduino Uno:

+ + + + + + + + + +
AlgorithmOperationTimeComment
Curve25519eval()3738 msRaw curve evaluation
Curve25519dh1()3740 msFirst half of Diffie-Hellman key agreement
Curve25519dh2()3738 msSecond half of Diffie-Hellman key agreement
+
+ + + + diff --git a/crypto_8dox.html b/crypto_8dox.html new file mode 100644 index 00000000..2067a684 --- /dev/null +++ b/crypto_8dox.html @@ -0,0 +1,95 @@ + + + + + + +ArduinoLibs: crypto.dox File Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
crypto.dox File Reference
+
+
+
+ + + + diff --git a/dir_1586d320a3b1e622174530fde769cda9.html b/dir_1586d320a3b1e622174530fde769cda9.html index 7dc69c3a..5bbac117 100644 --- a/dir_1586d320a3b1e622174530fde769cda9.html +++ b/dir_1586d320a3b1e622174530fde769cda9.html @@ -3,7 +3,8 @@ -ArduinoLibs: /home/rweather/sketchbook/libraries/BlinkLED/ Directory Reference + +ArduinoLibs: BlinkLED Directory Reference @@ -29,7 +30,7 @@
- + @@ -83,21 +84,27 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
- + + + + + +

+

Files

file  BlinkLED.cpp [code]
 
file  BlinkLED.h [code]
 
file  Charlieplex.cpp [code]
 
file  Charlieplex.h [code]
 
file  ChaseLEDs.cpp [code]
 
file  ChaseLEDs.h [code]
 
diff --git a/dir_48f64e79f12bd77ba047e9e436ec978c.html b/dir_48f64e79f12bd77ba047e9e436ec978c.html index 33b34ce5..16907e16 100644 --- a/dir_48f64e79f12bd77ba047e9e436ec978c.html +++ b/dir_48f64e79f12bd77ba047e9e436ec978c.html @@ -3,7 +3,8 @@ -ArduinoLibs: /home/rweather/sketchbook/libraries/LCD/ Directory Reference + +ArduinoLibs: LCD Directory Reference @@ -29,7 +30,7 @@
- + @@ -83,31 +84,47 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
- + + + + + + + + + + + + + + + +

+

Files

file  BoolField.cpp [code]
 
file  BoolField.h [code]
 
file  Field.cpp [code]
 
file  Field.h [code]
 
file  Form.cpp [code]
 
file  Form.h [code]
 
file  IntField.cpp [code]
 
file  IntField.h [code]
 
file  LCD.cpp [code]
 
file  LCD.h [code]
 
file  ListField.cpp [code]
 
file  ListField.h [code]
 
file  TextField.cpp [code]
 
file  TextField.h [code]
 
file  TimeField.cpp [code]
 
file  TimeField.h [code]
 
diff --git a/dir_5e87a7229a108582288ef7eda1233dc3.html b/dir_5e87a7229a108582288ef7eda1233dc3.html index 157fec0c..b446d8b8 100644 --- a/dir_5e87a7229a108582288ef7eda1233dc3.html +++ b/dir_5e87a7229a108582288ef7eda1233dc3.html @@ -3,7 +3,8 @@ -ArduinoLibs: /home/rweather/sketchbook/libraries/PowerSave/ Directory Reference + +ArduinoLibs: PowerSave Directory Reference @@ -29,7 +30,7 @@
- + @@ -83,17 +84,19 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
- + +

+

Files

file  PowerSave.cpp [code]
 
file  PowerSave.h [code]
 
diff --git a/dir_6591a2127a29f6cea3994dcb5b0596d1.html b/dir_6591a2127a29f6cea3994dcb5b0596d1.html index c749453f..ad163a0c 100644 --- a/dir_6591a2127a29f6cea3994dcb5b0596d1.html +++ b/dir_6591a2127a29f6cea3994dcb5b0596d1.html @@ -3,7 +3,8 @@ -ArduinoLibs: /home/rweather/sketchbook/libraries/DMD/ Directory Reference + +ArduinoLibs: DMD Directory Reference @@ -29,7 +30,7 @@
- + @@ -83,23 +84,31 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
- + + + + + + + +

+

Files

file  Bitmap.cpp [code]
 
file  Bitmap.h [code]
 
file  DejaVuSans9.h [code]
 
file  DejaVuSansBold9.h [code]
 
file  DejaVuSansItalic9.h [code]
 
file  DMD.cpp [code]
 
file  DMD.h [code]
 
file  Mono5x7.h [code]
 
diff --git a/dir_9a34040863d1190c0e01b23e6b44de01.html b/dir_9a34040863d1190c0e01b23e6b44de01.html index 84056487..c0f5cb45 100644 --- a/dir_9a34040863d1190c0e01b23e6b44de01.html +++ b/dir_9a34040863d1190c0e01b23e6b44de01.html @@ -3,7 +3,8 @@ -ArduinoLibs: /home/rweather/sketchbook/libraries/IR/ Directory Reference + +ArduinoLibs: IR Directory Reference @@ -29,7 +30,7 @@
- + @@ -83,18 +84,21 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
- + + +

+

Files

file  IRreceiver.cpp [code]
 
file  IRreceiver.h [code]
 
file  RC5.h [code]
 
diff --git a/dir_bc0718b08fb2015b8e59c47b2805f60c.html b/dir_bc0718b08fb2015b8e59c47b2805f60c.html index 6b47eea5..6349f7de 100644 --- a/dir_bc0718b08fb2015b8e59c47b2805f60c.html +++ b/dir_bc0718b08fb2015b8e59c47b2805f60c.html @@ -3,7 +3,8 @@ -ArduinoLibs: /home/rweather/sketchbook/libraries/ Directory Reference + +ArduinoLibs: libraries Directory Reference @@ -29,7 +30,7 @@
- + @@ -83,23 +84,33 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
- + + + + + + + + + +

+

Directories

directory  BlinkLED
 
directory  Crypto
 
directory  DMD
 
directory  I2C
 
directory  IR
 
directory  LCD
 
directory  Melody
 
directory  PowerSave
 
directory  RTC
 
diff --git a/dir_be059bf9978ae156837504b1b8a7568c.html b/dir_be059bf9978ae156837504b1b8a7568c.html index 4ad116a8..42206b44 100644 --- a/dir_be059bf9978ae156837504b1b8a7568c.html +++ b/dir_be059bf9978ae156837504b1b8a7568c.html @@ -3,7 +3,8 @@ -ArduinoLibs: /home/rweather/sketchbook/libraries/Melody/ Directory Reference + +ArduinoLibs: Melody Directory Reference @@ -29,7 +30,7 @@ - + @@ -83,17 +84,19 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
- + +

+

Files

file  Melody.cpp [code]
 
file  Melody.h [code]
 
diff --git a/dir_e2ce51835550ba18edf07a8311722290.html b/dir_e2ce51835550ba18edf07a8311722290.html new file mode 100644 index 00000000..d347ca74 --- /dev/null +++ b/dir_e2ce51835550ba18edf07a8311722290.html @@ -0,0 +1,172 @@ + + + + + + +ArduinoLibs: Crypto Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + +
+ +
+ + +
+
+
+
Crypto Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  AES.h [code]
 
file  AES128.cpp [code]
 
file  AES192.cpp [code]
 
file  AES256.cpp [code]
 
file  AESCommon.cpp [code]
 
file  BLAKE2s.cpp [code]
 
file  BLAKE2s.h [code]
 
file  BlockCipher.cpp [code]
 
file  BlockCipher.h [code]
 
file  CBC.cpp [code]
 
file  CBC.h [code]
 
file  CFB.cpp [code]
 
file  CFB.h [code]
 
file  ChaCha.cpp [code]
 
file  ChaCha.h [code]
 
file  Cipher.cpp [code]
 
file  Cipher.h [code]
 
file  Crypto.cpp [code]
 
file  Crypto.h [code]
 
file  CTR.cpp [code]
 
file  CTR.h [code]
 
file  Curve25519.cpp [code]
 
file  Curve25519.h [code]
 
file  Hash.cpp [code]
 
file  Hash.h [code]
 
file  NoiseSource.cpp [code]
 
file  NoiseSource.h [code]
 
file  OFB.cpp [code]
 
file  OFB.h [code]
 
file  RNG.cpp [code]
 
file  RNG.h [code]
 
file  SHA1.cpp [code]
 
file  SHA1.h [code]
 
file  SHA256.cpp [code]
 
file  SHA256.h [code]
 
file  TransistorNoiseSource.cpp [code]
 
file  TransistorNoiseSource.h [code]
 
+
+ + + + diff --git a/dir_f34881fcf60f680b800190d5274dfaea.html b/dir_f34881fcf60f680b800190d5274dfaea.html index f1a4189d..79f7dd1c 100644 --- a/dir_f34881fcf60f680b800190d5274dfaea.html +++ b/dir_f34881fcf60f680b800190d5274dfaea.html @@ -3,7 +3,8 @@ -ArduinoLibs: /home/rweather/sketchbook/libraries/RTC/ Directory Reference + +ArduinoLibs: RTC Directory Reference @@ -29,7 +30,7 @@ - + @@ -83,21 +84,27 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
- + + + + + +

+

Files

file  DS1307RTC.cpp [code]
 
file  DS1307RTC.h [code]
 
file  DS3232RTC.cpp [code]
 
file  DS3232RTC.h [code]
 
file  RTC.cpp [code]
 
file  RTC.h [code]
 
diff --git a/dir_f9b96888882c2691b8eeaeafd1b9501d.html b/dir_f9b96888882c2691b8eeaeafd1b9501d.html index 8a52fe93..5e04f97d 100644 --- a/dir_f9b96888882c2691b8eeaeafd1b9501d.html +++ b/dir_f9b96888882c2691b8eeaeafd1b9501d.html @@ -3,7 +3,8 @@ -ArduinoLibs: /home/rweather/sketchbook/libraries/I2C/ Directory Reference + +ArduinoLibs: I2C Directory Reference @@ -29,7 +30,7 @@ - + @@ -83,21 +84,27 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
- + + + + + +

+

Files

file  EEPROM24.cpp [code]
 
file  EEPROM24.h [code]
 
file  I2CMaster.cpp [code]
 
file  I2CMaster.h [code]
 
file  SoftI2C.cpp [code]
 
file  SoftI2C.h [code]
 
diff --git a/dmd-demo_8dox.html b/dmd-demo_8dox.html index 9cfd3578..c9f5bf06 100644 --- a/dmd-demo_8dox.html +++ b/dmd-demo_8dox.html @@ -3,6 +3,7 @@ + ArduinoLibs: dmd-demo.dox File Reference @@ -29,7 +30,7 @@ - + @@ -83,15 +84,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
dmd-demo.dox File Reference
-

Detailed Description

-
-

Definition in file dmd-demo.dox.

-
+ diff --git a/dmd-running-figure_8dox.html b/dmd-running-figure_8dox.html index b55e8933..613f92c4 100644 --- a/dmd-running-figure_8dox.html +++ b/dmd-running-figure_8dox.html @@ -3,6 +3,7 @@ + ArduinoLibs: dmd-running-figure.dox File Reference @@ -29,7 +30,7 @@ - + @@ -83,15 +84,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
dmd-running-figure.dox File Reference
-

Detailed Description

-
-

Definition in file dmd-running-figure.dox.

-
+ diff --git a/dmd_demo.html b/dmd_demo.html index a96331d5..27bdfce1 100644 --- a/dmd_demo.html +++ b/dmd_demo.html @@ -3,6 +3,7 @@ + ArduinoLibs: Dot Matrix Display Demo @@ -29,7 +30,7 @@ - + @@ -78,7 +79,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Dot Matrix Display Demo
-

This demo shows off various features of drawing with the Bitmap class to a DMD display:

+

This demo shows off various features of drawing with the Bitmap class to a DMD display:

  • Drawing circles, lines, and rectangles.
  • Filling the screen with a bitmap-based brick pattern.
  • @@ -101,15 +102,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    #include <DejaVuSansItalic9.h>
    #include <Mono5x7.h>
    -
    DMD display;
    +
    DMD display;
    ISR(TIMER1_OVF_vect)
    {
    -
    display.refresh();
    +
    display.refresh();
    }
    void setup() {
    -
    display.enableTimer1();
    +
    display.enableTimer1();
    }
    void loop() {
    @@ -140,12 +141,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    void drawShapes()
    {
    -
    display.clear();
    -
    display.drawCircle(6, 8, 3);
    -
    display.drawFilledCircle(16, 8, 3);
    -
    display.drawLine(22, 5, 28, 11);
    -
    display.drawLine(28, 5, 22, 11);
    -
    display.drawRect(0, 0, display.width() - 1, display.height() - 1);
    +
    display.clear();
    +
    display.drawCircle(6, 8, 3);
    +
    display.drawFilledCircle(16, 8, 3);
    +
    display.drawLine(22, 5, 28, 11);
    +
    display.drawLine(28, 5, 22, 11);
    +
    display.drawRect(0, 0, display.width() - 1, display.height() - 1);
    }
    void drawBricks()
    @@ -159,7 +160,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    B00001000, B00001000,
    B00001000, B00001000
    };
    -
    display.fill(0, 0, display.width(), display.height(), bricks);
    +
    display.fill(0, 0, display.width(), display.height(), bricks);
    }
    void drawStickFigures()
    @@ -180,64 +181,64 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    B01000001, B00000000,
    B10000000, B10000000
    };
    -
    display.clear();
    -
    display.drawBitmap(2, 1, stickFigure);
    -
    display.drawInvertedBitmap(12, 1, stickFigure);
    -
    display.drawBitmap(22, 1, stickFigure);
    +
    display.clear();
    +
    display.drawBitmap(2, 1, stickFigure);
    +
    display.drawInvertedBitmap(12, 1, stickFigure);
    +
    display.drawBitmap(22, 1, stickFigure);
    }
    void drawText()
    {
    -
    display.clear();
    -
    display.setFont(DejaVuSans9);
    -
    display.drawText(0, 0, "Hello");
    -
    display.drawText(9, 8, "World");
    +
    display.clear();
    +
    display.setFont(DejaVuSans9);
    +
    display.drawText(0, 0, "Hello");
    +
    display.drawText(9, 8, "World");
    }
    void drawBoldText()
    {
    -
    display.clear();
    -
    display.setFont(DejaVuSansBold9);
    -
    display.drawText(0, 0, "Hello");
    -
    display.drawText(4, 8, "World");
    +
    display.clear();
    +
    display.setFont(DejaVuSansBold9);
    +
    display.drawText(0, 0, "Hello");
    +
    display.drawText(4, 8, "World");
    }
    void drawItalicText()
    {
    -
    display.clear();
    -
    display.setFont(DejaVuSansItalic9);
    -
    display.drawText(0, 0, "Hello");
    -
    display.drawText(2, 8, "World");
    +
    display.clear();
    +
    display.setFont(DejaVuSansItalic9);
    +
    display.drawText(0, 0, "Hello");
    +
    display.drawText(2, 8, "World");
    }
    void drawMonoText()
    {
    -
    display.clear();
    -
    display.setFont(Mono5x7);
    -
    display.drawText(0, 0, "Hello");
    -
    display.drawText(3, 8, "World");
    +
    display.clear();
    +
    display.setFont(Mono5x7);
    +
    display.drawText(0, 0, "Hello");
    +
    display.drawText(3, 8, "World");
    }
    static const char message[] = "Eat at Joes!";
    void drawMarquee()
    {
    -
    int width = display.width();
    -
    display.setFont(DejaVuSans9);
    -
    int msgWidth = display.textWidth(message);
    +
    int width = display.width();
    +
    display.setFont(DejaVuSans9);
    +
    int msgWidth = display.textWidth(message);
    int fullScroll = msgWidth + width + 1;
    for (int x = 0; x < fullScroll; ++x) {
    -
    display.clear();
    -
    display.drawText(width - x, 3, message);
    +
    display.clear();
    +
    display.drawText(width - x, 3, message);
    delay(50);
    }
    }
diff --git a/dmd_running_figure.html b/dmd_running_figure.html index c6875c0b..755cfdc3 100644 --- a/dmd_running_figure.html +++ b/dmd_running_figure.html @@ -3,6 +3,7 @@ + ArduinoLibs: Running figure example @@ -29,7 +30,7 @@ - + @@ -82,7 +83,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

The first step is to initialize the display:

#include <DMD.h>
-
DMD display;
+
DMD display;

We will also need some bitmaps to animate the running figure. We will use static bitmaps stored in program memory. The first frame of the 10-frame animation is:

byte const run1[] PROGMEM = {
@@ -107,7 +108,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

As can be seen, the bitmap is made up of 0's and 1's; a 1 bit indicates that the corresponding LED will be lit when it is drawn to the dot matrix display. The first two bytes are the width and height of the bitmap in pixels. In this case, the first frame is 16x16 pixels. Other frames in the animation are 18x16 and 13x16.

We store pointers to all of the frames in a common array:

-
Bitmap::ProgMem frames[] = {
+
Bitmap::ProgMem frames[] = {
run1,
run2,
run3,
@@ -132,32 +133,32 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
void loop() {
if ((millis() - lastFrame) >= ADVANCE_MS) {
-
display.clear();
+
display.clear();
int x = (32 - pgm_read_byte(frames[frame])) / 2;
-
display.drawBitmap(x, 0, frames[frame]);
+
display.drawBitmap(x, 0, frames[frame]);
lastFrame += ADVANCE_MS;
frame = (frame + 1) % NUM_FRAMES;
}
-
display.loop();
+
display.loop();
}

-

Each time ADVANCE_MS milliseconds expires, we clear the display and draw a bitmap centered on the screen. To help with the centering, we read the width value from the bitmap for the current frame (the height is always 16). We must also call DMD::loop() repeatedly from the application's main loop() function to ensure that the display is kept refreshed.

-

Sometimes it can be inconvenient to arrange for DMD::loop() to be called regularly. An alternative is to use Timer1 or Timer2 and interrupt-driven display refresh:

+

Each time ADVANCE_MS milliseconds expires, we clear the display and draw a bitmap centered on the screen. To help with the centering, we read the width value from the bitmap for the current frame (the height is always 16). We must also call DMD::loop() repeatedly from the application's main loop() function to ensure that the display is kept refreshed.

+

Sometimes it can be inconvenient to arrange for DMD::loop() to be called regularly. An alternative is to use Timer1 or Timer2 and interrupt-driven display refresh:

#define ADVANCE_MS (1000 / NUM_FRAMES)
ISR(TIMER1_OVF_vect)
{
-
display.refresh();
+
display.refresh();
}
void setup() {
-
display.enableTimer1();
+
display.enableTimer1();
}
void loop() {
-
display.clear();
+
display.clear();
int x = (32 - pgm_read_byte(frames[frame])) / 2;
-
display.drawBitmap(x, 0, frames[frame]);
+
display.drawBitmap(x, 0, frames[frame]);
frame = (frame + 1) % NUM_FRAMES;
delay(ADVANCE_MS);
@@ -189,7 +190,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
#include <DMD.h>
-
DMD display;
+
DMD display;
// Running stick figure pictures are loosely based on those from this tutorial:
// http://www.fluidanims.com/FAelite/phpBB3/viewtopic.php?f=10&t=102
@@ -394,7 +395,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
B01000000, B00000000
};
-
Bitmap::ProgMem frames[] = {
+
Bitmap::ProgMem frames[] = {
run1,
run2,
run3,
@@ -418,20 +419,20 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
void loop() {
if ((millis() - lastFrame) >= ADVANCE_MS) {
-
display.clear();
+
display.clear();
int x = (32 - pgm_read_byte(frames[frame])) / 2;
-
display.drawBitmap(x, 0, frames[frame]);
+
display.drawBitmap(x, 0, frames[frame]);
lastFrame += ADVANCE_MS;
frame = (frame + 1) % NUM_FRAMES;
}
-
display.loop();
+
display.loop();
}
diff --git a/doxygen.css b/doxygen.css index 0c559a0a..f0f36f89 100644 --- a/doxygen.css +++ b/doxygen.css @@ -1,22 +1,23 @@ -/* The standard CSS for doxygen */ +/* The standard CSS for doxygen 1.8.6 */ body, table, div, p, dl { - font: 400 14px/19px Roboto,sans-serif; + font: 400 14px/22px Roboto,sans-serif; } /* @group Heading Levels */ -h1 { +h1.groupheader { font-size: 150%; } .title { + font: 400 14px/28px Roboto,sans-serif; font-size: 150%; font-weight: bold; margin: 10px 2px; } -h2 { +h2.groupheader { border-bottom: 1px solid #879ECB; color: #354C7B; font-size: 150%; @@ -27,7 +28,7 @@ h2 { width: 100%; } -h3 { +h3.groupheader { font-size: 100%; } @@ -55,10 +56,14 @@ div.multicol { -webkit-column-count: 3; } -p.startli, p.startdd, p.starttd { +p.startli, p.startdd { margin-top: 2px; } +p.starttd { + margin-top: 0px; +} + p.endli { margin-bottom: 0px; } @@ -140,11 +145,11 @@ a.el { a.elRef { } -a.code, a.code:visited { +a.code, a.code:visited, a.line, a.line:visited { color: #4665A2; } -a.codeRef, a.codeRef:visited { +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { color: #4665A2; } @@ -168,8 +173,8 @@ pre.fragment { } div.fragment { - padding: 4px; - margin: 4px; + padding: 4px 6px; + margin: 4px 8px 4px 2px; background-color: #FBFCFD; border: 1px solid #C4CFE5; } @@ -455,8 +460,11 @@ table.memberdecls { color: #555; } -.memItemLeft, .memItemRight, .memTemplParams { - border-bottom: 1px solid #DEE4F0; +.memSeparator { + border-bottom: 1px solid #DEE4F0; + line-height: 1px; + margin: 0px; + padding: 0px; } .memItemLeft, .memTemplItemLeft { @@ -470,6 +478,7 @@ table.memberdecls { .memTemplParams { color: #4665A2; white-space: nowrap; + font-size: 80%; } /* @end */ @@ -648,12 +657,13 @@ span.mlabel { border-right:1px solid #C4CFE5; border-bottom:1px solid #C4CFE5; text-shadow: none; - color: white; - margin-right: 4px; - padding: 2px 3px; - border-radius: 3px; - font-size: 7pt; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; white-space: nowrap; + vertical-align: middle; } @@ -682,6 +692,7 @@ div.directory { .directory td.entry { white-space: nowrap; padding-right: 6px; + padding-top: 3px; } .directory td.entry a { @@ -758,7 +769,7 @@ table.doxtable th { } table.fieldtable { - width: 100%; + /*width: 100%;*/ margin-bottom: 10px; border: 1px solid #A8B8D9; border-spacing: 0px; @@ -781,9 +792,21 @@ table.fieldtable { vertical-align: top; } +.fieldtable td.fieldname { + padding-top: 3px; +} + .fieldtable td.fielddoc { border-bottom: 1px solid #A8B8D9; - width: 100%; + /*width: 100%;*/ +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; } .fieldtable tr:last-child td { @@ -824,6 +847,7 @@ table.fieldtable { font-size: 11px; background-image:url('tab_b.png'); background-repeat:repeat-x; + background-position: 0 -5px; height:30px; line-height:30px; color:#8AA0CC; @@ -851,7 +875,10 @@ table.fieldtable { display:block; text-decoration: none; outline: none; + color: #283A5D; font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; } .navpath li.navelem a:hover @@ -1042,6 +1069,11 @@ dl.section dd { text-align: center; } +.diagraph +{ + text-align: center; +} + .caption { font-weight: bold; @@ -1142,6 +1174,177 @@ tr.heading h2 { margin-bottom: 4px; } +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + white-space: nowrap; + background-color: white; + border: 1px solid gray; + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 7px gray; + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: grey; + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: #006318; +} + +#powerTip div { + margin: 0px; + padding: 0px; + font: 12px/16px Roboto,sans-serif; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before { + border-top-color: #808080; + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: #808080; + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + @media print { #top { display: none; } diff --git a/dynsections.js b/dynsections.js index 116542f1..2f15470d 100644 --- a/dynsections.js +++ b/dynsections.js @@ -44,24 +44,43 @@ function toggleLevel(level) }); updateStripes(); } -function toggleFolder(id) + +function toggleFolder(id) { - var n = $('[id^=row_'+id+']'); - var i = $('[id^=img_'+id+']'); - var a = $('[id^=arr_'+id+']'); - var c = n.slice(1); - if (c.filter(':first').is(':visible')===true) { - i.attr('src','ftv2folderclosed.png'); - a.attr('src','ftv2pnode.png'); - c.hide(); - } else { - i.attr('src','ftv2folderopen.png'); - a.attr('src','ftv2mnode.png'); - c.show(); + //The clicked row + var currentRow = $('#row_'+id); + var currentRowImages = currentRow.find("img"); + + //All rows after the clicked row + var rows = currentRow.nextAll("tr"); + + //Only match elements AFTER this one (can't hide elements before) + var childRows = rows.filter(function() { + var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub + return this.id.match(re); + }); + + //First row is visible we are HIDING + if (childRows.filter(':first').is(':visible')===true) { + currentRowImages.filter("[id^=arr]").attr('src', 'ftv2pnode.png'); + currentRowImages.filter("[id^=img]").attr('src', 'ftv2folderclosed.png'); + rows.filter("[id^=row_"+id+"]").hide(); + } else { //We are SHOWING + //All sub images + var childImages = childRows.find("img"); + var childImg = childImages.filter("[id^=img]"); + var childArr = childImages.filter("[id^=arr]"); + + currentRow.find("[id^=arr]").attr('src', 'ftv2mnode.png'); //open row + currentRow.find("[id^=img]").attr('src', 'ftv2folderopen.png'); //open row + childImg.attr('src','ftv2folderclosed.png'); //children closed + childArr.attr('src','ftv2pnode.png'); //children closed + childRows.show(); //show all children } updateStripes(); } + function toggleInherit(id) { var rows = $('tr.inherit.'+id); @@ -76,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/files.html b/files.html index 905f499b..9f7a5948 100644 --- a/files.html +++ b/files.html @@ -3,6 +3,7 @@ + ArduinoLibs: File List @@ -29,7 +30,7 @@ - + @@ -85,63 +86,100 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented files with brief descriptions:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
o*Bitmap.cpp
o*Bitmap.h
o*BlinkLED.cpp
o*BlinkLED.h
o*BoolField.cpp
o*BoolField.h
o*Charlieplex.cpp
o*Charlieplex.h
o*ChaseLEDs.cpp
o*ChaseLEDs.h
o*DejaVuSans9.h
o*DejaVuSansBold9.h
o*DejaVuSansItalic9.h
o*DMD.cpp
o*DMD.h
o*DS1307RTC.cpp
o*DS1307RTC.h
o*DS3232RTC.cpp
o*DS3232RTC.h
o*EEPROM24.cpp
o*EEPROM24.h
o*Field.cpp
o*Field.h
o*Form.cpp
o*Form.h
o*I2CMaster.cpp
o*I2CMaster.h
o*IntField.cpp
o*IntField.h
o*IRreceiver.cpp
o*IRreceiver.h
o*LCD.cpp
o*LCD.h
o*ListField.cpp
o*ListField.h
o*Melody.cpp
o*Melody.h
o*Mono5x7.h
o*PowerSave.cpp
o*PowerSave.h
o*RC5.h
o*RTC.cpp
o*RTC.h
o*SoftI2C.cpp
o*SoftI2C.h
o*TextField.cpp
o*TextField.h
o*TimeField.cpp
\*TimeField.h
o*AES.h
o*AES128.cpp
o*AES192.cpp
o*AES256.cpp
o*AESCommon.cpp
o*Bitmap.cpp
o*Bitmap.h
o*BLAKE2s.cpp
o*BLAKE2s.h
o*BlinkLED.cpp
o*BlinkLED.h
o*BlockCipher.cpp
o*BlockCipher.h
o*BoolField.cpp
o*BoolField.h
o*CBC.cpp
o*CBC.h
o*CFB.cpp
o*CFB.h
o*ChaCha.cpp
o*ChaCha.h
o*Charlieplex.cpp
o*Charlieplex.h
o*ChaseLEDs.cpp
o*ChaseLEDs.h
o*Cipher.cpp
o*Cipher.h
o*Crypto.cpp
o*Crypto.h
o*CTR.cpp
o*CTR.h
o*Curve25519.cpp
o*Curve25519.h
o*DejaVuSans9.h
o*DejaVuSansBold9.h
o*DejaVuSansItalic9.h
o*DMD.cpp
o*DMD.h
o*DS1307RTC.cpp
o*DS1307RTC.h
o*DS3232RTC.cpp
o*DS3232RTC.h
o*EEPROM24.cpp
o*EEPROM24.h
o*Field.cpp
o*Field.h
o*Form.cpp
o*Form.h
o*Hash.cpp
o*Hash.h
o*I2CMaster.cpp
o*I2CMaster.h
o*IntField.cpp
o*IntField.h
o*IRreceiver.cpp
o*IRreceiver.h
o*LCD.cpp
o*LCD.h
o*ListField.cpp
o*ListField.h
o*Melody.cpp
o*Melody.h
o*Mono5x7.h
o*NoiseSource.cpp
o*NoiseSource.h
o*OFB.cpp
o*OFB.h
o*PowerSave.cpp
o*PowerSave.h
o*RC5.h
o*RNG.cpp
o*RNG.h
o*RTC.cpp
o*RTC.h
o*SHA1.cpp
o*SHA1.h
o*SHA256.cpp
o*SHA256.h
o*SoftI2C.cpp
o*SoftI2C.h
o*TextField.cpp
o*TextField.h
o*TimeField.cpp
o*TimeField.h
o*TransistorNoiseSource.cpp
\*TransistorNoiseSource.h
diff --git a/functions.html b/functions.html index 46bba22b..210feccb 100644 --- a/functions.html +++ b/functions.html @@ -3,6 +3,7 @@ + ArduinoLibs: Class Members @@ -29,7 +30,7 @@ - + @@ -79,27 +80,28 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); @@ -139,6 +141,18 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • advanceTime() : ChaseLEDs
  • +
  • AES128() +: AES128 +
  • +
  • AES192() +: AES192 +
  • +
  • AES256() +: AES256 +
  • +
  • AESCommon() +: AESCommon +
  • ALARM_COUNT : RTC
  • @@ -146,17 +160,18 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : IRreceiver
  • available() -: SoftI2C +: EEPROM24 , I2CMaster -, EEPROM24 +, RNGClass +, SoftI2C
  • diff --git a/functions_b.html b/functions_b.html new file mode 100644 index 00000000..043c3068 --- /dev/null +++ b/functions_b.html @@ -0,0 +1,181 @@ + + + + + + +ArduinoLibs: Class Members + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +
    Here is a list of all documented class members with links to the class documentation for each member:
    + +

    - b -

    +
    + + + + diff --git a/functions_c.html b/functions_c.html new file mode 100644 index 00000000..ec66b7d7 --- /dev/null +++ b/functions_c.html @@ -0,0 +1,202 @@ + + + + + + +ArduinoLibs: Class Members + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +
    Here is a list of all documented class members with links to the class documentation for each member:
    + +

    - c -

    +
    + + + + diff --git a/functions_d.html b/functions_d.html new file mode 100644 index 00000000..26514151 --- /dev/null +++ b/functions_d.html @@ -0,0 +1,242 @@ + + + + + + +ArduinoLibs: Class Members + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +
    Here is a list of all documented class members with links to the class documentation for each member:
    + +

    - d -

    +
    + + + + diff --git a/functions_e.html b/functions_e.html new file mode 100644 index 00000000..114165e2 --- /dev/null +++ b/functions_e.html @@ -0,0 +1,184 @@ + + + + + + +ArduinoLibs: Class Members + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +
    Here is a list of all documented class members with links to the class documentation for each member:
    + +

    - e -

    +
    + + + + diff --git a/functions_enum.html b/functions_enum.html index d99c1f8d..895189a5 100644 --- a/functions_enum.html +++ b/functions_enum.html @@ -3,6 +3,7 @@ + ArduinoLibs: Class Members - Enumerations @@ -29,7 +30,7 @@ - + @@ -103,9 +104,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_eval.html b/functions_eval.html index 7651fde1..b4b08535 100644 --- a/functions_eval.html +++ b/functions_eval.html @@ -3,6 +3,7 @@ + ArduinoLibs: Class Members - Enumerator @@ -29,7 +30,7 @@ - + @@ -106,9 +107,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_f.html b/functions_f.html new file mode 100644 index 00000000..d506b3de --- /dev/null +++ b/functions_f.html @@ -0,0 +1,171 @@ + + + + + + +ArduinoLibs: Class Members + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +
    Here is a list of all documented class members with links to the class documentation for each member:
    + +

    - f -

    +
    + + + + diff --git a/functions_func.html b/functions_func.html index 7c4a2e9c..e1fc55d3 100644 --- a/functions_func.html +++ b/functions_func.html @@ -3,6 +3,7 @@ + ArduinoLibs: Class Members - Functions @@ -29,7 +30,7 @@ - + @@ -79,26 +80,27 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); @@ -138,18 +140,31 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • advanceTime() : ChaseLEDs
  • +
  • AES128() +: AES128 +
  • +
  • AES192() +: AES192 +
  • +
  • AES256() +: AES256 +
  • +
  • AESCommon() +: AESCommon +
  • available() -: SoftI2C -, EEPROM24 +: EEPROM24 , I2CMaster +, RNGClass +, SoftI2C
  • diff --git a/functions_func_b.html b/functions_func_b.html new file mode 100644 index 00000000..3da3bc9a --- /dev/null +++ b/functions_func_b.html @@ -0,0 +1,171 @@ + + + + + + +ArduinoLibs: Class Members - Functions + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +  + +

    - b -

    +
    + + + + diff --git a/functions_func_c.html b/functions_func_c.html new file mode 100644 index 00000000..b7d137e1 --- /dev/null +++ b/functions_func_c.html @@ -0,0 +1,198 @@ + + + + + + +ArduinoLibs: Class Members - Functions + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +  + +

    - c -

    +
    + + + + diff --git a/functions_func_d.html b/functions_func_d.html new file mode 100644 index 00000000..b883a096 --- /dev/null +++ b/functions_func_d.html @@ -0,0 +1,229 @@ + + + + + + +ArduinoLibs: Class Members - Functions + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +  + +

    - d -

    +
    + + + + diff --git a/functions_func_e.html b/functions_func_e.html new file mode 100644 index 00000000..aae59a9d --- /dev/null +++ b/functions_func_e.html @@ -0,0 +1,183 @@ + + + + + + +ArduinoLibs: Class Members - Functions + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +  + +

    - e -

    +
    + + + + diff --git a/functions_func_f.html b/functions_func_f.html new file mode 100644 index 00000000..6a0944e3 --- /dev/null +++ b/functions_func_f.html @@ -0,0 +1,164 @@ + + + + + + +ArduinoLibs: Class Members - Functions + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +  + +

    - f -

    +
    + + + + diff --git a/functions_func_g.html b/functions_func_g.html new file mode 100644 index 00000000..3c9b7a7c --- /dev/null +++ b/functions_func_g.html @@ -0,0 +1,137 @@ + + + + + + +ArduinoLibs: Class Members - Functions + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +  + +

    - g -

      +
    • getButton() +: LCD +
    • +
    +
    + + + + diff --git a/functions_func_h.html b/functions_func_h.html new file mode 100644 index 00000000..8541e1e6 --- /dev/null +++ b/functions_func_h.html @@ -0,0 +1,160 @@ + + + + + + +ArduinoLibs: Class Members - Functions + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +  + +

    - h -

    +
    + + + + diff --git a/functions_func_i.html b/functions_func_i.html new file mode 100644 index 00000000..b28991ab --- /dev/null +++ b/functions_func_i.html @@ -0,0 +1,177 @@ + + + + + + +ArduinoLibs: Class Members - Functions + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +  + +

    - i -

    +
    + + + + diff --git a/functions_func_k.html b/functions_func_k.html new file mode 100644 index 00000000..33694697 --- /dev/null +++ b/functions_func_k.html @@ -0,0 +1,146 @@ + + + + + + +ArduinoLibs: Class Members - Functions + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +  + +

    - k -

    +
    + + + + diff --git a/functions_func_l.html b/functions_func_l.html new file mode 100644 index 00000000..877ae8cd --- /dev/null +++ b/functions_func_l.html @@ -0,0 +1,159 @@ + + + + + + +ArduinoLibs: Class Members - Functions + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +  + +

    - l -

    +
    + + + + diff --git a/functions_func_m.html b/functions_func_m.html new file mode 100644 index 00000000..a29b740f --- /dev/null +++ b/functions_func_m.html @@ -0,0 +1,150 @@ + + + + + + +ArduinoLibs: Class Members - Functions + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +  + +

    - m -

    +
    + + + + diff --git a/functions_func_n.html b/functions_func_n.html new file mode 100644 index 00000000..2e13803f --- /dev/null +++ b/functions_func_n.html @@ -0,0 +1,146 @@ + + + + + + +ArduinoLibs: Class Members - Functions + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +  + +

    - n -

    +
    + + + + diff --git a/functions_func_o.html b/functions_func_o.html new file mode 100644 index 00000000..85dab1d0 --- /dev/null +++ b/functions_func_o.html @@ -0,0 +1,149 @@ + + + + + + +ArduinoLibs: Class Members - Functions + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +  + +

    - o -

    +
    + + + + diff --git a/functions_func_p.html b/functions_func_p.html new file mode 100644 index 00000000..ae7cb777 --- /dev/null +++ b/functions_func_p.html @@ -0,0 +1,158 @@ + + + + + + +ArduinoLibs: Class Members - Functions + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +  + +

    - p -

    +
    + + + + diff --git a/functions_func_r.html b/functions_func_r.html new file mode 100644 index 00000000..0358b3c5 --- /dev/null +++ b/functions_func_r.html @@ -0,0 +1,194 @@ + + + + + + +ArduinoLibs: Class Members - Functions + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +  + +

    - r -

    +
    + + + + diff --git a/functions_func_s.html b/functions_func_s.html new file mode 100644 index 00000000..1aece7dd --- /dev/null +++ b/functions_func_s.html @@ -0,0 +1,324 @@ + + + + + + +ArduinoLibs: Class Members - Functions + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +  + +

    - s -

    +
    + + + + diff --git a/functions_func_t.html b/functions_func_t.html new file mode 100644 index 00000000..d2c43964 --- /dev/null +++ b/functions_func_t.html @@ -0,0 +1,155 @@ + + + + + + +ArduinoLibs: Class Members - Functions + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +  + +

    - t -

    +
    + + + + diff --git a/functions_func_u.html b/functions_func_u.html new file mode 100644 index 00000000..2830b36d --- /dev/null +++ b/functions_func_u.html @@ -0,0 +1,143 @@ + + + + + + +ArduinoLibs: Class Members - Functions + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +  + +

    - u -

    +
    + + + + diff --git a/functions_func_v.html b/functions_func_v.html new file mode 100644 index 00000000..a3d521bc --- /dev/null +++ b/functions_func_v.html @@ -0,0 +1,141 @@ + + + + + + +ArduinoLibs: Class Members - Functions + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +  + +

    - v -

    +
    + + + + diff --git a/functions_func_w.html b/functions_func_w.html new file mode 100644 index 00000000..f63afa4e --- /dev/null +++ b/functions_func_w.html @@ -0,0 +1,162 @@ + + + + + + +ArduinoLibs: Class Members - Functions + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +  + +

    - w -

    +
    + + + + diff --git a/functions_func_~.html b/functions_func_~.html new file mode 100644 index 00000000..340857b9 --- /dev/null +++ b/functions_func_~.html @@ -0,0 +1,185 @@ + + + + + + +ArduinoLibs: Class Members - Functions + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +  + +

    - ~ -

    +
    + + + + diff --git a/functions_g.html b/functions_g.html new file mode 100644 index 00000000..4cd4c3a0 --- /dev/null +++ b/functions_g.html @@ -0,0 +1,138 @@ + + + + + + +ArduinoLibs: Class Members + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +
    Here is a list of all documented class members with links to the class documentation for each member:
    + +

    - g -

      +
    • getButton() +: LCD +
    • +
    +
    + + + + diff --git a/functions_h.html b/functions_h.html new file mode 100644 index 00000000..f53558b5 --- /dev/null +++ b/functions_h.html @@ -0,0 +1,165 @@ + + + + + + +ArduinoLibs: Class Members + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +
    Here is a list of all documented class members with links to the class documentation for each member:
    + +

    - h -

    +
    + + + + diff --git a/functions_i.html b/functions_i.html new file mode 100644 index 00000000..b2c6da79 --- /dev/null +++ b/functions_i.html @@ -0,0 +1,181 @@ + + + + + + +ArduinoLibs: Class Members + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +
    Here is a list of all documented class members with links to the class documentation for each member:
    + +

    - i -

    +
    + + + + diff --git a/functions_k.html b/functions_k.html new file mode 100644 index 00000000..3db287c1 --- /dev/null +++ b/functions_k.html @@ -0,0 +1,147 @@ + + + + + + +ArduinoLibs: Class Members + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +
    Here is a list of all documented class members with links to the class documentation for each member:
    + +

    - k -

    +
    + + + + diff --git a/functions_l.html b/functions_l.html new file mode 100644 index 00000000..155f3753 --- /dev/null +++ b/functions_l.html @@ -0,0 +1,160 @@ + + + + + + +ArduinoLibs: Class Members + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +
    Here is a list of all documented class members with links to the class documentation for each member:
    + +

    - l -

    +
    + + + + diff --git a/functions_m.html b/functions_m.html new file mode 100644 index 00000000..65c5c0e5 --- /dev/null +++ b/functions_m.html @@ -0,0 +1,158 @@ + + + + + + +ArduinoLibs: Class Members + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +
    Here is a list of all documented class members with links to the class documentation for each member:
    + +

    - m -

    +
    + + + + diff --git a/functions_n.html b/functions_n.html new file mode 100644 index 00000000..18023c48 --- /dev/null +++ b/functions_n.html @@ -0,0 +1,153 @@ + + + + + + +ArduinoLibs: Class Members + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +
    Here is a list of all documented class members with links to the class documentation for each member:
    + +

    - n -

    +
    + + + + diff --git a/functions_o.html b/functions_o.html new file mode 100644 index 00000000..b1c8416a --- /dev/null +++ b/functions_o.html @@ -0,0 +1,150 @@ + + + + + + +ArduinoLibs: Class Members + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +
    Here is a list of all documented class members with links to the class documentation for each member:
    + +

    - o -

    +
    + + + + diff --git a/functions_p.html b/functions_p.html new file mode 100644 index 00000000..0be35f81 --- /dev/null +++ b/functions_p.html @@ -0,0 +1,162 @@ + + + + + + +ArduinoLibs: Class Members + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +
    Here is a list of all documented class members with links to the class documentation for each member:
    + +

    - p -

    +
    + + + + diff --git a/functions_r.html b/functions_r.html new file mode 100644 index 00000000..72ca2ac4 --- /dev/null +++ b/functions_r.html @@ -0,0 +1,195 @@ + + + + + + +ArduinoLibs: Class Members + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +
    Here is a list of all documented class members with links to the class documentation for each member:
    + +

    - r -

    +
    + + + + diff --git a/functions_s.html b/functions_s.html new file mode 100644 index 00000000..aa40a853 --- /dev/null +++ b/functions_s.html @@ -0,0 +1,334 @@ + + + + + + +ArduinoLibs: Class Members + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +
    Here is a list of all documented class members with links to the class documentation for each member:
    + +

    - s -

    +
    + + + + diff --git a/functions_t.html b/functions_t.html new file mode 100644 index 00000000..2cf9adda --- /dev/null +++ b/functions_t.html @@ -0,0 +1,156 @@ + + + + + + +ArduinoLibs: Class Members + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +
    Here is a list of all documented class members with links to the class documentation for each member:
    + +

    - t -

    +
    + + + + diff --git a/functions_type.html b/functions_type.html index 9d01794b..34ddf3b4 100644 --- a/functions_type.html +++ b/functions_type.html @@ -3,6 +3,7 @@ + ArduinoLibs: Class Members - Typedefs @@ -29,7 +30,7 @@ - + @@ -106,9 +107,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_u.html b/functions_u.html new file mode 100644 index 00000000..b9979299 --- /dev/null +++ b/functions_u.html @@ -0,0 +1,144 @@ + + + + + + +ArduinoLibs: Class Members + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +
    Here is a list of all documented class members with links to the class documentation for each member:
    + +

    - u -

    +
    + + + + diff --git a/functions_v.html b/functions_v.html new file mode 100644 index 00000000..c1a329c2 --- /dev/null +++ b/functions_v.html @@ -0,0 +1,142 @@ + + + + + + +ArduinoLibs: Class Members + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +
    Here is a list of all documented class members with links to the class documentation for each member:
    + +

    - v -

    +
    + + + + diff --git a/functions_vars.html b/functions_vars.html index 585ad99f..3e0640ad 100644 --- a/functions_vars.html +++ b/functions_vars.html @@ -3,6 +3,7 @@ + ArduinoLibs: Class Members - Variables @@ -29,7 +30,7 @@ - + @@ -112,15 +113,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : RTCAlarm
  • hour -: RTCTime -, RTCAlarm +: RTCAlarm +, RTCTime
  • INCREMENT : RTC
  • minute -: RTCTime -, RTCAlarm +: RTCAlarm +, RTCTime
  • month : RTCDate @@ -134,6 +135,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • second : RTCTime
  • +
  • SEED_SIZE +: RNGClass +
  • White : Bitmap
  • @@ -147,9 +151,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_w.html b/functions_w.html new file mode 100644 index 00000000..b3f09139 --- /dev/null +++ b/functions_w.html @@ -0,0 +1,169 @@ + + + + + + +ArduinoLibs: Class Members + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +
    Here is a list of all documented class members with links to the class documentation for each member:
    + +

    - w -

    +
    + + + + diff --git a/functions_y.html b/functions_y.html new file mode 100644 index 00000000..9cdad2ac --- /dev/null +++ b/functions_y.html @@ -0,0 +1,138 @@ + + + + + + +ArduinoLibs: Class Members + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +
    Here is a list of all documented class members with links to the class documentation for each member:
    + +

    - y -

    +
    + + + + diff --git a/functions_~.html b/functions_~.html new file mode 100644 index 00000000..49a22640 --- /dev/null +++ b/functions_~.html @@ -0,0 +1,186 @@ + + + + + + +ArduinoLibs: Class Members + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + + + + +
    + +
    + +
    +
    Here is a list of all documented class members with links to the class documentation for each member:
    + +

    - ~ -

    +
    + + + + diff --git a/group__power__save.html b/group__power__save.html index 987921d2..12170d1c 100644 --- a/group__power__save.html +++ b/group__power__save.html @@ -3,6 +3,7 @@ + ArduinoLibs: Power saving utility functions @@ -29,7 +30,7 @@ - + @@ -83,7 +84,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    -
    } +

    +

    Enumerations

    enum  SleepDuration {
      SLEEP_15_MS, @@ -101,18 +102,21 @@ Enumerations
     Duration to put the CPU to sleep with sleepFor(). More...
     
    - - + + +

    +

    Functions

    void sleepFor (SleepDuration duration, uint8_t mode)
     Puts the CPU to sleep for a specific duration.The analog to digital converter and the brown out detector will be disabled during sleep mode.
     Puts the CPU to sleep for a specific duration.The analog to digital converter and the brown out detector will be disabled during sleep mode. More...
     
    void unusedPin (uint8_t pin)
     Marks an I/O pin as unused.This function sets pin to be an input with pullups enabled, which will reduce power consumption compared to pins that are left floating.
     
    -

    Detailed Description

    +

    Detailed Description

    The functions in this module assist with reducing power consumption on Arduino boards by disabling features that are not used or putting the device to sleep when it is inactive.

    -

    Enumeration Type Documentation

    +

    Enumeration Type Documentation

    @@ -125,46 +129,44 @@ void sleepFor().

    See Also
    sleepFor()
    -
    Enumerator:
    -
    SLEEP_15_MS  + + - - - - - - - - -
    Enumerator
    SLEEP_15_MS 

    Sleep for 15 milliseconds.

    SLEEP_30_MS  +
    SLEEP_30_MS 

    Sleep for 30 milliseconds.

    SLEEP_60_MS  +
    SLEEP_60_MS 

    Sleep for 60 milliseconds.

    SLEEP_120_MS  +
    SLEEP_120_MS 

    Sleep for 120 milliseconds.

    SLEEP_250_MS  +
    SLEEP_250_MS 

    Sleep for 250 milliseconds.

    SLEEP_500_MS  +
    SLEEP_500_MS 

    Sleep for 500 milliseconds.

    SLEEP_1_SEC  +
    SLEEP_1_SEC 

    Sleep for 1 second.

    SLEEP_2_SEC  +
    SLEEP_2_SEC 

    Sleep for 2 seconds.

    SLEEP_4_SEC  +
    SLEEP_4_SEC 

    Sleep for 4 seconds.

    SLEEP_8_SEC  +
    SLEEP_8_SEC 

    Sleep for 8 seconds.

    - -

    Definition at line 38 of file PowerSave.h.

    -

    Function Documentation

    +

    Function Documentation

    @@ -199,9 +201,9 @@ void 
    diff --git a/hierarchy.html b/hierarchy.html index 8c5cb20a..a9487874 100644 --- a/hierarchy.html +++ b/hierarchy.html @@ -3,6 +3,7 @@ + ArduinoLibs: Class Hierarchy @@ -29,7 +30,7 @@
    - + @@ -87,39 +88,63 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    This inheritance list is sorted roughly, but not completely, alphabetically:
    -
    [detail level 12]
    - - - - - - - - - - - - - - - - - - - - - - - - +
    [detail level 123]
    oCBitmapRepresents a monochrome bitmap within main memory
    |\CDMDHandle large dot matrix displays composed of LED's
    oCBlinkLEDBlink a LED on a digital output pin
    oCCharlieplexManage an array of LED's in a charlieplexed arrangement
    oCChaseLEDsChase LED's on output pins in a defined sequence
    oCEEPROM24Reading and writing EEPROM's from the 24LCXX family
    oCFieldManages a single data input/output field within a Form
    |oCBoolFieldField that manages the input of a boolean value
    |oCIntFieldField that manages the input of an integer value
    |oCListFieldField that manages selection from a static list of items
    |oCTextFieldField that displays a read-only text value
    |\CTimeFieldField that manages the display and editing of a time value
    oCFormManager for a form containing data input/output fields
    oCI2CMasterAbstract base class for I2C master implementations
    |\CSoftI2CBit-banged implementation of an I2C master
    oCIRreceiverManages the reception of RC-5 commands from an infrared remote control
    oCLCDEnhanced library for Freetronics 16x2 LCD shields
    oCMelodyPlays a melody on a digital output pin using tone()
    oCRTCBase class for realtime clock handlers
    |oCDS1307RTCCommunicates with a DS1307 realtime clock chip via I2C
    |\CDS3232RTCCommunicates with a DS3232 realtime clock chip via I2C
    oCRTCAlarmStores alarm information from a realtime clock chip
    oCRTCDateStores date information from a realtime clock chip
    \CRTCTimeStores time information from a realtime clock chip
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    oCBitmapRepresents a monochrome bitmap within main memory
    |\CDMDHandle large dot matrix displays composed of LED's
    oCBlinkLEDBlink a LED on a digital output pin
    oCBlockCipherAbstract base class for block ciphers
    |\CAESCommonAbstract base class for AES block ciphers
    | oCAES128AES block cipher with 128-bit keys
    | oCAES192AES block cipher with 192-bit keys
    | \CAES256AES block cipher with 256-bit keys
    oCCharlieplexManage an array of LED's in a charlieplexed arrangement
    oCChaseLEDsChase LED's on output pins in a defined sequence
    oCCipherAbstract base class for stream ciphers
    |oCCBCCommonConcrete base class to assist with implementing CBC for 128-bit block ciphers
    ||\CCBC< T >Implementation of the Cipher Block Chaining (CBC) mode for 128-bit block ciphers
    |oCCFBCommonConcrete base class to assist with implementing CFB for 128-bit block ciphers
    ||\CCFB< T >Implementation of the Cipher Feedback (CFB) mode for 128-bit block ciphers
    |oCChaChaChaCha stream cipher
    |oCCTRCommonConcrete base class to assist with implementing CTR mode for 128-bit block ciphers
    ||\CCTR< T >Implementation of the Counter (CTR) mode for 128-bit block ciphers
    |\COFBCommonConcrete base class to assist with implementing OFB for 128-bit block ciphers
    | \COFB< T >Implementation of the Output Feedback (OFB) mode for 128-bit block ciphers
    oCCurve25519Diffie-Hellman key agreement based on the elliptic curve modulo 2^255 - 19
    oCEEPROM24Reading and writing EEPROM's from the 24LCXX family
    oCFieldManages a single data input/output field within a Form
    |oCBoolFieldField that manages the input of a boolean value
    |oCIntFieldField that manages the input of an integer value
    |oCListFieldField that manages selection from a static list of items
    |oCTextFieldField that displays a read-only text value
    |\CTimeFieldField that manages the display and editing of a time value
    oCFormManager for a form containing data input/output fields
    oCHashAbstract base class for cryptographic hash algorithms
    |oCBLAKE2sBLAKE2s hash algorithm
    |oCSHA1SHA-1 hash algorithm
    |\CSHA256SHA-256 hash algorithm
    oCI2CMasterAbstract base class for I2C master implementations
    |\CSoftI2CBit-banged implementation of an I2C master
    oCIRreceiverManages the reception of RC-5 commands from an infrared remote control
    oCLiquidCrystal
    |\CLCDEnhanced library for Freetronics 16x2 LCD shields
    oCMelodyPlays a melody on a digital output pin using tone()
    oCNoiseSourceAbstract base class for random noise sources
    |\CTransistorNoiseSourceProcesses the signal from a transistor-based noise source
    oCRNGClassPseudo random number generator suitable for cryptography
    oCRTCBase class for realtime clock handlers
    |oCDS1307RTCCommunicates with a DS1307 realtime clock chip via I2C
    |\CDS3232RTCCommunicates with a DS3232 realtime clock chip via I2C
    oCRTCAlarmStores alarm information from a realtime clock chip
    oCRTCDateStores date information from a realtime clock chip
    \CRTCTimeStores time information from a realtime clock chip
    diff --git a/index.html b/index.html index 2f9c5537..2728797a 100644 --- a/index.html +++ b/index.html @@ -3,6 +3,7 @@ + ArduinoLibs: Main Page @@ -29,7 +30,7 @@
    - + @@ -78,70 +79,81 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    ArduinoLibs Documentation
    -

    This distribution contains a bunch of libraries and example applications that I have made for Arduino, covering a variety of tasks from blinking LED's to LCD's and RTC-based alarm clocks. They are distributed under the terms of the MIT license, with the source code available from github.

    +

    This distribution contains a bunch of libraries and example applications that I have made for Arduino, covering a variety of tasks from blinking LED's to LCD's and RTC-based alarm clocks. They are distributed under the terms of the MIT license, with the source code available from github.

    For more information on these libraries, to report bugs, or to suggest improvements, please contact the author Rhys Weatherley via email.

    LCD Shield

      -
    • LCD class to manage the extended features of the Freetronics and DFRobot LCD shields.
    • -
    • Form and Field classes to build simple property sheet UI's on LCD displays.
    • -
    • Hello World example for the Freetronics LCD shield.
    • -
    • Form example for LCD displays.
    • +
    • LCD class to manage the extended features of the Freetronics and DFRobot LCD shields.
    • +
    • Form and Field classes to build simple property sheet UI's on LCD displays.
    • +
    • Hello World example for the Freetronics LCD shield.
    • +
    • Form example for LCD displays.

    Freetronics Large Dot Matrix Display (DMD)

      -
    • DMD class to manage the initialize of the display.
    • -
    • Bitmap class to manage drawing to in-memory bitmaps and the DMD display.
    • +
    • DMD class to manage the initialize of the display.
    • +
    • Bitmap class to manage drawing to in-memory bitmaps and the DMD display.
    • Demo that shows off various bitmap drawing features.
    • RunningFigure example that demonstrates how to draw and animate bitmaps.
    • -
    • Snake game that combines the dot matrix display with IRreceiver to make a simple video game.
    • +
    • Snake game that combines the dot matrix display with IRreceiver to make a simple video game.

    BlinkLED Utility Library

      -
    • BlinkLED class that simplifies the process of blinking a LED connected to a output pin.
    • -
    • ChaseLEDs class that simplifies the process of performing a LED chase over several output pins.
    • -
    • Charlieplex class that manages a matrix of LED's arranged in a Charlieplexing arrangement.
    • -
    • Blink example of using BlinkLED.
    • -
    • Cylon example of using ChaseLEDs to simulate the Cylon eye effect from Battlestar Galactica.
    • +
    • BlinkLED class that simplifies the process of blinking a LED connected to a output pin.
    • +
    • ChaseLEDs class that simplifies the process of performing a LED chase over several output pins.
    • +
    • Charlieplex class that manages a matrix of LED's arranged in a Charlieplexing arrangement.
    • +
    • Blink example of using BlinkLED.
    • +
    • Cylon example of using ChaseLEDs to simulate the Cylon eye effect from Battlestar Galactica.
    • StarTrek example for lighting a starship Enterprise model kit.
    • Charlieplex example.

    I2C Utility Library

      -
    • I2CMaster abstract class that provides an improved API for implementing an I2C master.
    • -
    • SoftI2C class that implements the master side of the I2C protocol in software on any arbitrary pair of pins for DATA and CLOCK. This class supports both 7-bit and 10-bit I2C addresses.
    • -
    • EEPROM24 class for reading and writing 24LCXX family EEPROM's.
    • +
    • I2CMaster abstract class that provides an improved API for implementing an I2C master.
    • +
    • SoftI2C class that implements the master side of the I2C protocol in software on any arbitrary pair of pins for DATA and CLOCK. This class supports both 7-bit and 10-bit I2C addresses.
    • +
    • EEPROM24 class for reading and writing 24LCXX family EEPROM's.

    Realtime Clock Library

      -
    • RTC class that acts as a base for all realtime clock implementations, including support for configuring alarms and storing clock settings. The default implementation simulates the time and date based on the value of millis().
    • -
    • DS1307RTC class that talks to the DS1307 realtime clock chip via I2C.
    • -
    • DS3232RTC class that talks to the DS3232 realtime clock chip via I2C.
    • -
    • Alarm Clock example that uses the DS1307 or DS3232 realtime clock and the LCD library to implement an alarm clock.
    • +
    • RTC class that acts as a base for all realtime clock implementations, including support for configuring alarms and storing clock settings. The default implementation simulates the time and date based on the value of millis().
    • +
    • DS1307RTC class that talks to the DS1307 realtime clock chip via I2C.
    • +
    • DS3232RTC class that talks to the DS3232 realtime clock chip via I2C.
    • +
    • Alarm Clock example that uses the DS1307 or DS3232 realtime clock and the LCD library to implement an alarm clock.
    +

    +Cryptographic Library

    + +

    More information can be found on the Cryptographic Library page.

    Infrared Control Library

      -
    • IRreceiver class that receives incoming RC-5 commands from an infrared remote control.
    • +
    • IRreceiver class that receives incoming RC-5 commands from an infrared remote control.
    • DumpIR example that dumps all incoming RC-5 commands.
    • -
    • Snake game that combines DMD with an infrared remote control to make a simple video game.
    • +
    • Snake game that combines DMD with an infrared remote control to make a simple video game.

    Other

    diff --git a/ir-dumpir_8dox.html b/ir-dumpir_8dox.html index d87b9281..6a489cfc 100644 --- a/ir-dumpir_8dox.html +++ b/ir-dumpir_8dox.html @@ -3,6 +3,7 @@ + ArduinoLibs: ir-dumpir.dox File Reference @@ -29,7 +30,7 @@
    - + @@ -83,15 +84,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    ir-dumpir.dox File Reference
    -

    Detailed Description

    -
    -

    Definition in file ir-dumpir.dox.

    -
    + diff --git a/ir-snake_8dox.html b/ir-snake_8dox.html index 8d16b81e..63b5d319 100644 --- a/ir-snake_8dox.html +++ b/ir-snake_8dox.html @@ -3,6 +3,7 @@ + ArduinoLibs: ir-snake.dox File Reference @@ -29,7 +30,7 @@ - + @@ -83,15 +84,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    ir-snake.dox File Reference
    -

    Detailed Description

    -
    -

    Definition in file ir-snake.dox.

    -
    + diff --git a/ir_dumpir.html b/ir_dumpir.html index 12894f77..9fda3f7f 100644 --- a/ir_dumpir.html +++ b/ir_dumpir.html @@ -3,6 +3,7 @@ + ArduinoLibs: Dumping Infrared Remote Control Codes @@ -29,7 +30,7 @@ - + @@ -78,7 +79,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    Dumping Infrared Remote Control Codes
    -

    This example uses the IRreceiver class to dump commands that are received from an infrared remote control that is compatible with the Philips RC-5 protocol. Commands are dumped to the serial port. The example needs a 3-pin infrared receiver connected to D2, GND, and 5V:

    +

    This example uses the IRreceiver class to dump commands that are received from an infrared remote control that is compatible with the Philips RC-5 protocol. Commands are dumped to the serial port. The example needs a 3-pin infrared receiver connected to D2, GND, and 5V:

    irchip.jpg
    @@ -87,7 +88,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    #include <IRreceiver.h>
    - +
    static const char *systems[32] = {
    "TV",
    @@ -262,18 +263,18 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    }
    void loop() {
    -
    int cmd = ir.command();
    +
    int cmd = ir.command();
    if (cmd >= 0) {
    Serial.print("IR system=");
    -
    Serial.print(ir.system());
    +
    Serial.print(ir.system());
    Serial.print(" (RC5_SYS_");
    -
    Serial.print(systems[ir.system()]);
    +
    Serial.print(systems[ir.system()]);
    Serial.print("), command=");
    Serial.print(cmd & 0x7F);
    Serial.print(" (RC5_");
    Serial.print(commands[cmd & 0x7F]);
    Serial.print(")");
    - +
    Serial.println(", auto-repeat");
    else
    Serial.println();
    @@ -282,9 +283,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    diff --git a/ir_snake.html b/ir_snake.html index aab2cade..c833243a 100644 --- a/ir_snake.html +++ b/ir_snake.html @@ -3,6 +3,7 @@ + ArduinoLibs: Snake Video Game Using an Infrared Remote Control @@ -29,7 +30,7 @@ - + @@ -78,7 +79,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    Snake Video Game Using an Infrared Remote Control
    -

    This example demonstrates the use of the DMD and IRreceiver classes. The full source code follows:

    +

    This example demonstrates the use of the DMD and IRreceiver classes. The full source code follows:

    /*
    * Copyright (C) 2012 Southern Storm Software, Pty Ltd.
    *
    @@ -116,8 +117,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    int x, y;
    };
    -
    DMD display;
    - +
    DMD display;
    +
    bool paused;
    bool gameOver;
    bool waitForStart;
    @@ -130,23 +131,23 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    ISR(TIMER1_OVF_vect)
    {
    -
    display.refresh();
    +
    display.refresh();
    }
    void setup() {
    -
    display.enableTimer1();
    -
    display.setFont(Mono5x7);
    +
    display.enableTimer1();
    +
    display.setFont(Mono5x7);
    startGame();
    }
    -
    void drawSnake(Bitmap::Color color) {
    +
    void drawSnake(Bitmap::Color color) {
    for (int index = 0; index < snakeLength; ++index)
    -
    display.setPixel(snakeParts[index].x, snakeParts[index].y, color);
    +
    display.setPixel(snakeParts[index].x, snakeParts[index].y, color);
    }
    void loop() {
    // Handle the "Game Over" state. Any key press starts a new game.
    -
    int cmd = ir.command();
    +
    int cmd = ir.command();
    if (gameOver) {
    if (cmd != -1 && (cmd & IRreceiver::AUTO_REPEAT) == 0)
    startGame();
    @@ -159,12 +160,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    if (cmd == -1) {
    if ((millis() - lastChange) >= SNAKE_BLINK_TIME) {
    snakeDrawn = !snakeDrawn;
    -
    drawSnake(snakeDrawn ? Bitmap::White : Bitmap::Black);
    +
    drawSnake(snakeDrawn ? Bitmap::White : Bitmap::Black);
    lastChange += SNAKE_BLINK_TIME;
    }
    return;
    }
    -
    drawSnake(Bitmap::White);
    +
    drawSnake(Bitmap::White);
    waitForStart = false;
    snakeDrawn = true;
    lastChange = millis();
    @@ -210,18 +211,18 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    void startGame() {
    randomSeed(micros() + analogRead(A0)); // Analog read adds some noise.
    -
    display.clear();
    -
    display.drawRect(0, 0, display.width() - 1, display.height() - 1);
    +
    display.clear();
    +
    display.drawRect(0, 0, display.width() - 1, display.height() - 1);
    for (int count = 0; count < 10; ++count) {
    int x, y;
    if (random(0, 2) == 0) {
    -
    x = random(1, display.width() - 5);
    -
    y = random(1, display.height() - 1);
    -
    display.drawLine(x, y, x + 4, y);
    +
    x = random(1, display.width() - 5);
    +
    y = random(1, display.height() - 1);
    +
    display.drawLine(x, y, x + 4, y);
    } else {
    -
    x = random(1, display.width() - 1);
    -
    y = random(1, display.height() - 3);
    -
    display.drawLine(x, y, x, y + 2);
    +
    x = random(1, display.width() - 1);
    +
    y = random(1, display.height() - 3);
    +
    display.drawLine(x, y, x, y + 2);
    }
    }
    paused = false;
    @@ -236,8 +237,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    for (int index = 0; index < snakeLength; ++index) {
    snakeParts[index].x = 3 + index;
    snakeParts[index].y = 4;
    -
    display.setPixel
    -
    (snakeParts[index].x, snakeParts[index].y, Bitmap::White);
    +
    display.setPixel
    +
    (snakeParts[index].x, snakeParts[index].y, Bitmap::White);
    }
    }
    @@ -249,15 +250,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    void advanceSnake(bool increase) {
    int x = snakeParts[snakeLength - 1].x + direction.x;
    int y = snakeParts[snakeLength - 1].y + direction.y;
    -
    if (display.pixel(x, y) == Bitmap::White) {
    +
    if (display.pixel(x, y) == Bitmap::White) {
    gameOver = true;
    -
    display.clear();
    -
    display.drawText(5, 0, "Game");
    -
    display.drawText(3, 8, "Over!");
    +
    display.clear();
    +
    display.drawText(5, 0, "Game");
    +
    display.drawText(3, 8, "Over!");
    return;
    }
    if (!increase || snakeLength >= SNAKE_MAX_LENGTH) {
    -
    display.setPixel(snakeParts[0].x, snakeParts[0].y, Bitmap::Black);
    +
    display.setPixel(snakeParts[0].x, snakeParts[0].y, Bitmap::Black);
    for (int index = 0; index < snakeLength - 1; ++index)
    snakeParts[index] = snakeParts[index + 1];
    } else {
    @@ -265,16 +266,16 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    }
    snakeParts[snakeLength - 1].x = x;
    snakeParts[snakeLength - 1].y = y;
    -
    display.setPixel(x, y, Bitmap::White);
    +
    display.setPixel(x, y, Bitmap::White);
    if (increase)
    incStep = 0;
    }
    diff --git a/jquery.js b/jquery.js index 63939e76..6aa2e4c2 100644 --- a/jquery.js +++ b/jquery.js @@ -1,8 +1,39 @@ -/*! jQuery v1.7.1 jquery.com | jquery.org/license */ -(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
    a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
    "+""+"
    ",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
    t
    ",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
    ",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; -f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

    ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
    ";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
    ","
    "]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")), -f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() -{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
    ").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c) -{if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); +/*! + * jQuery JavaScript Library v1.7.1 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Mon Nov 21 21:11:03 2011 -0500 + */ +(function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b40){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv
    a";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="
    ";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="
    t
    ";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="
    ";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType; +if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bCbA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}}); +/*! + * Sizzle CSS Selector Engine + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1 +},lt:function(bS,bR,e){return bRe[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="

    ";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="
    ";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT0){for(bB=bA;bB=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(C(bx[0])||C(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||a9.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aR="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ag=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/",""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},ac=a(av); +ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div
    ","
    "]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ag,""):null}else{if(typeof bx==="string"&&!ae.test(bx)&&(b.support.leadingWhitespace||!ar.test(bx))&&!ax[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(R,"<$1>");try{for(var bw=0,bv=this.length;bw1&&bw0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||!ah.test("<"+by.nodeName)?by.cloneNode(true):al(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){ai(by,bz);e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){if(bv[bx]){ai(e[bx],bv[bx])}}}if(bA){t(by,bz);if(bw){e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){t(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bw,by,bH,bA){var bF;by=by||av;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||av}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(R,"<$1>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=ax[bK]||ax._default,bD=bx[0],bv=by.createElement("div");if(by===av){ac.appendChild(bv)}else{a(by).appendChild(bv)}bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=w.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]===""&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ar.test(bz)){bv.insertBefore(by.createTextNode(ar.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return au.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,e=b.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&b.trim(bw.replace(ak,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ak.test(bw)?bw.replace(ak,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=Z(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aI=function(by,bw){var bv,bx,e;bw=bw.replace(z,"-$1").toLowerCase();if((bx=by.ownerDocument.defaultView)&&(e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(av.documentElement.currentStyle){aX=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv===null&&bx&&(by=bx[bw])){bv=by}if(!bc.test(bv)&&bn.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aI||aX;function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?an:a1,bx=0,e=bz.length; +if(bA>0){if(bv!=="border"){for(;bx)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("
    ").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"":"")+"");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b +})}})(window); +/*! + PowerTip - v1.2.0 - 2013-04-03 + http://stevenbenner.github.com/jquery-powertip/ + Copyright (c) 2013 Steven Benner (http://stevenbenner.com/). + Released under MIT license. + https://raw.github.com/stevenbenner/jquery-powertip/master/LICENSE.txt +*/ +(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{a(jQuery)}}(function(k){var A=k(document),s=k(window),w=k("body");var n="displayController",e="hasActiveHover",d="forcedOpen",u="hasMouseMove",f="mouseOnToPopup",g="originalTitle",y="powertip",o="powertipjq",l="powertiptarget",E=180/Math.PI;var c={isTipOpen:false,isFixedTipOpen:false,isClosing:false,tipOpenImminent:false,activeHover:null,currentX:0,currentY:0,previousX:0,previousY:0,desyncTimeout:null,mouseTrackingActive:false,delayInProgress:false,windowWidth:0,windowHeight:0,scrollTop:0,scrollLeft:0};var p={none:0,top:1,bottom:2,left:4,right:8};k.fn.powerTip=function(F,N){if(!this.length){return this}if(k.type(F)==="string"&&k.powerTip[F]){return k.powerTip[F].call(this,this,N)}var O=k.extend({},k.fn.powerTip.defaults,F),G=new x(O);h();this.each(function M(){var R=k(this),Q=R.data(y),P=R.data(o),T=R.data(l),S;if(R.data(n)){k.powerTip.destroy(R)}S=R.attr("title");if(!Q&&!T&&!P&&S){R.data(y,S);R.data(g,S);R.removeAttr("title")}R.data(n,new t(R,O,G))});if(!O.manual){this.on({"mouseenter.powertip":function J(P){k.powerTip.show(this,P)},"mouseleave.powertip":function L(){k.powerTip.hide(this)},"focus.powertip":function K(){k.powerTip.show(this)},"blur.powertip":function H(){k.powerTip.hide(this,true)},"keydown.powertip":function I(P){if(P.keyCode===27){k.powerTip.hide(this,true)}}})}return this};k.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false};k.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};k.powerTip={show:function z(F,G){if(G){i(G);c.previousX=G.pageX;c.previousY=G.pageY;k(F).data(n).show()}else{k(F).first().data(n).show(true,true)}return F},reposition:function r(F){k(F).first().data(n).resetPosition();return F},hide:function D(G,F){if(G){k(G).first().data(n).hide(F)}else{if(c.activeHover){c.activeHover.data(n).hide(true)}}return G},destroy:function C(G){k(G).off(".powertip").each(function F(){var I=k(this),H=[g,n,e,d];if(I.data(g)){I.attr("title",I.data(g));H.push(y)}I.removeData(H)});return G}};k.powerTip.showTip=k.powerTip.show;k.powerTip.closeTip=k.powerTip.hide;function b(){var F=this;F.top="auto";F.left="auto";F.right="auto";F.bottom="auto";F.set=function(H,G){if(k.isNumeric(G)){F[H]=Math.round(G)}}}function t(K,N,F){var J=null;function L(P,Q){M();if(!K.data(e)){if(!P){c.tipOpenImminent=true;J=setTimeout(function O(){J=null;I()},N.intentPollInterval)}else{if(Q){K.data(d,true)}F.showTip(K)}}}function G(P){M();c.tipOpenImminent=false;if(K.data(e)){K.data(d,false);if(!P){c.delayInProgress=true;J=setTimeout(function O(){J=null;F.hideTip(K);c.delayInProgress=false},N.closeDelay)}else{F.hideTip(K)}}}function I(){var Q=Math.abs(c.previousX-c.currentX),O=Math.abs(c.previousY-c.currentY),P=Q+O;if(P",{id:Q.popupId});if(w.length===0){w=k("body")}w.append(O)}if(Q.followMouse){if(!O.data(u)){A.on("mousemove",M);s.on("scroll",M);O.data(u,true)}}if(Q.mouseOnToPopup){O.on({mouseenter:function L(){if(O.data(f)){if(c.activeHover){c.activeHover.data(n).cancel()}}},mouseleave:function N(){if(c.activeHover){c.activeHover.data(n).hide()}}})}function I(S){S.data(e,true);O.queue(function R(T){H(S);T()})}function H(S){var U;if(!S.data(e)){return}if(c.isTipOpen){if(!c.isClosing){K(c.activeHover)}O.delay(100).queue(function R(V){H(S);V()});return}S.trigger("powerTipPreRender");U=B(S);if(U){O.empty().append(U)}else{return}S.trigger("powerTipRender");c.activeHover=S;c.isTipOpen=true;O.data(f,Q.mouseOnToPopup);if(!Q.followMouse){G(S);c.isFixedTipOpen=true}else{M()}O.fadeIn(Q.fadeInTime,function T(){if(!c.desyncTimeout){c.desyncTimeout=setInterval(J,500)}S.trigger("powerTipOpen")})}function K(R){c.isClosing=true;c.activeHover=null;c.isTipOpen=false;c.desyncTimeout=clearInterval(c.desyncTimeout);R.data(e,false);R.data(d,false);O.fadeOut(Q.fadeOutTime,function S(){var T=new b();c.isClosing=false;c.isFixedTipOpen=false;O.removeClass();T.set("top",c.currentY+Q.offset);T.set("left",c.currentX+Q.offset);O.css(T);R.trigger("powerTipClose")})}function M(){if(!c.isFixedTipOpen&&(c.isTipOpen||(c.tipOpenImminent&&O.data(u)))){var R=O.outerWidth(),V=O.outerHeight(),U=new b(),S,T;U.set("top",c.currentY+Q.offset);U.set("left",c.currentX+Q.offset);S=m(U,R,V);if(S!==p.none){T=a(S);if(T===1){if(S===p.right){U.set("left",c.windowWidth-R)}else{if(S===p.bottom){U.set("top",c.scrollTop+c.windowHeight-V)}}}else{U.set("left",c.currentX-R-Q.offset);U.set("top",c.currentY-V-Q.offset)}}O.css(U)}}function G(S){var R,T;if(Q.smartPlacement){R=k.fn.powerTip.smartPlacementLists[Q.placement];k.each(R,function(U,W){var V=m(F(S,W),O.outerWidth(),O.outerHeight());T=W;if(V===p.none){return false}})}else{F(S,Q.placement);T=Q.placement}O.addClass(T)}function F(U,T){var R=0,S,W,V=new b();V.set("top",0);V.set("left",0);O.css(V);do{S=O.outerWidth();W=O.outerHeight();V=P.compute(U,T,S,W,Q.offset);O.css(V)}while(++R<=5&&(S!==O.outerWidth()||W!==O.outerHeight()));return V}function J(){var R=false;if(c.isTipOpen&&!c.isClosing&&!c.delayInProgress){if(c.activeHover.data(e)===false||c.activeHover.is(":disabled")){R=true}else{if(!v(c.activeHover)&&!c.activeHover.is(":focus")&&!c.activeHover.data(d)){if(O.data(f)){if(!v(O)){R=true}}else{R=true}}}if(R){K(c.activeHover)}}}this.showTip=I;this.hideTip=K;this.resetPosition=G}function q(F){return window.SVGElement&&F[0] instanceof SVGElement}function h(){if(!c.mouseTrackingActive){c.mouseTrackingActive=true;k(function H(){c.scrollLeft=s.scrollLeft();c.scrollTop=s.scrollTop();c.windowWidth=s.width();c.windowHeight=s.height()});A.on("mousemove",i);s.on({resize:function G(){c.windowWidth=s.width();c.windowHeight=s.height()},scroll:function F(){var I=s.scrollLeft(),J=s.scrollTop();if(I!==c.scrollLeft){c.currentX+=I-c.scrollLeft;c.scrollLeft=I}if(J!==c.scrollTop){c.currentY+=J-c.scrollTop;c.scrollTop=J}}})}}function i(F){c.currentX=F.pageX;c.currentY=F.pageY}function v(F){var H=F.offset(),J=F[0].getBoundingClientRect(),I=J.right-J.left,G=J.bottom-J.top;return c.currentX>=H.left&&c.currentX<=H.left+I&&c.currentY>=H.top&&c.currentY<=H.top+G}function B(I){var G=I.data(y),F=I.data(o),K=I.data(l),H,J;if(G){if(k.isFunction(G)){G=G.call(I[0])}J=G}else{if(F){if(k.isFunction(F)){F=F.call(I[0])}if(F.length>0){J=F.clone(true,true)}}else{if(K){H=k("#"+K);if(H.length>0){J=H.html()}}}}return J}function m(M,L,K){var G=c.scrollTop,J=c.scrollLeft,I=G+c.windowHeight,F=J+c.windowWidth,H=p.none;if(M.topI||Math.abs(M.bottom-c.windowHeight)>I){H|=p.bottom}if(M.leftF){H|=p.left}if(M.left+L>F||M.right + ArduinoLibs: lcd-form.dox File Reference @@ -29,7 +30,7 @@
    - + @@ -83,15 +84,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    lcd-form.dox File Reference
    -

    Detailed Description

    -
    -

    Definition in file lcd-form.dox.

    -
    + diff --git a/lcd-helloworld_8dox.html b/lcd-helloworld_8dox.html index 2b25a247..c45b7022 100644 --- a/lcd-helloworld_8dox.html +++ b/lcd-helloworld_8dox.html @@ -3,6 +3,7 @@ + ArduinoLibs: lcd-helloworld.dox File Reference @@ -29,7 +30,7 @@ - + @@ -83,15 +84,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    lcd-helloworld.dox File Reference
    -

    Detailed Description

    -
    -

    Definition in file lcd-helloworld.dox.

    -
    + diff --git a/lcd_form.html b/lcd_form.html index 3aee8bec..60e4b4d3 100644 --- a/lcd_form.html +++ b/lcd_form.html @@ -3,6 +3,7 @@ + ArduinoLibs: Form example for LCD displays @@ -29,7 +30,7 @@ - + @@ -75,10 +76,10 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    -
    Form example for LCD displays
    +
    Form example for LCD displays
    -

    The Form and Field classes simplify the process of building user interfaces for Arduino projects that use a Freetronics LCD shield. That shield has a 16x2 LCD display and five buttons for Up, Down, Left, Right, and Select.

    +

    The Form and Field classes simplify the process of building user interfaces for Arduino projects that use a Freetronics LCD shield. That shield has a 16x2 LCD display and five buttons for Up, Down, Left, Right, and Select.

    The user interface is organised as a "form" which consists of one or more "fields" that display or modify a single program parameter. The Left and Right buttons are used to navigate between fields, and the Up and Down buttons are used to modify the value of the currently-displayed field.

    FormText.png @@ -91,21 +92,21 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    #include <IntField.h>
    #include <BoolField.h>

    -

    Next, we initialize the LCD display, create the main form, and populate it with fields:

    -
    LCD lcd;
    -
    Form mainForm(lcd);
    -
    TextField welcomeField(mainForm, "Form example", "v1.0");
    -
    TimeField timeField(mainForm, "Time since reset", 24, TIMEFIELD_READ_ONLY);
    -
    IntField volumeField(mainForm, "Volume", 0, 100, 5, 85, "%");
    -
    BoolField ledField(mainForm, "Status LED", "On", "Off", true);
    -
    TimeField durationField(mainForm, "Timer duration", 24, TIMEFIELD_READ_WRITE);
    +

    Next, we initialize the LCD display, create the main form, and populate it with fields:

    +
    LCD lcd;
    +
    Form mainForm(lcd);
    +
    TextField welcomeField(mainForm, "Form example", "v1.0");
    +
    TimeField timeField(mainForm, "Time since reset", 24, TIMEFIELD_READ_ONLY);
    +
    IntField volumeField(mainForm, "Volume", 0, 100, 5, 85, "%");
    +
    BoolField ledField(mainForm, "Status LED", "On", "Off", true);
    +
    TimeField durationField(mainForm, "Timer duration", 24, TIMEFIELD_READ_WRITE);

    Each field has a specific type, which may be one of the following classes:

      -
    • BoolField displays a boolean on/off value with the Up and Down buttons used to toggle its state.
    • -
    • IntField displays an integer value within a specified range, with the Up and Down buttons used to modify the value.
    • -
    • TextField displays a read-only value, which is typically used for status messages and program results.
    • -
    • TimeField displays a time in hours, minutes, and seconds. The field may be either read-only or writable. Writable time fields can be modified with the Up, Down, Left, and Right buttons to select a specific duration.
    • +
    • BoolField displays a boolean on/off value with the Up and Down buttons used to toggle its state.
    • +
    • IntField displays an integer value within a specified range, with the Up and Down buttons used to modify the value.
    • +
    • TextField displays a read-only value, which is typically used for status messages and program results.
    • +
    • TimeField displays a time in hours, minutes, and seconds. The field may be either read-only or writable. Writable time fields can be modified with the Up, Down, Left, and Right buttons to select a specific duration.

    Returning to our example, the above code creates the following fields:

      @@ -125,20 +126,20 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
      // Enable the screen saver, which will automatically blank the screen after 10 seconds.
      // The screen will wake up again when a button is pressed or lcd.display() is called.
      - +
      // Show the main form for the first time.
      mainForm.show();
      }

    -

    An application can have multiple forms, but only one can be shown at any given time. To switch to another form, call Form::hide() on the old form and Form::show() on the new form.

    -

    All that remains is to define our application's loop function which retrieves button events from LCD::getButton() and dispatches them to the form:

    +

    An application can have multiple forms, but only one can be shown at any given time. To switch to another form, call Form::hide() on the old form and Form::show() on the new form.

    +

    All that remains is to define our application's loop function which retrieves button events from LCD::getButton() and dispatches them to the form:

    void loop() {
    // Update the number of seconds since reset:
    timeField.setValue(millis() / 1000);
    // Dispatch button events to the main form.
    -
    int event = lcd.getButton();
    +
    int event = lcd.getButton();
    if (mainForm.dispatch(event) == FORM_CHANGED) {
    if (mainForm.isCurrent(ledField)) {
    if (ledField.value())
    @@ -166,7 +167,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    #include <BoolField.h>
    // Initialize the LCD
    -
    LCD lcd;
    +
    LCD lcd;
    // Note: if you are using the USBDroid and have reassigned pin D9 on the LCD shield to some
    // other pin (e.g. A1), then you will need to initialize the shield with something like:
    @@ -174,12 +175,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    // See also: http://www.freetronics.com/pages/combining-the-lcd-keypad-shield-and-the-usbdroid
    // Create the main form and its fields.
    -
    Form mainForm(lcd);
    -
    TextField welcomeField(mainForm, "Form example", "v1.0");
    -
    TimeField timeField(mainForm, "Time since reset", 24, TIMEFIELD_READ_ONLY);
    -
    IntField volumeField(mainForm, "Volume", 0, 100, 5, 85, "%");
    -
    BoolField ledField(mainForm, "Status LED", "On", "Off", true);
    -
    TimeField durationField(mainForm, "Timer duration", 24, TIMEFIELD_READ_WRITE);
    +
    Form mainForm(lcd);
    +
    TextField welcomeField(mainForm, "Form example", "v1.0");
    +
    TimeField timeField(mainForm, "Time since reset", 24, TIMEFIELD_READ_ONLY);
    +
    IntField volumeField(mainForm, "Volume", 0, 100, 5, 85, "%");
    +
    BoolField ledField(mainForm, "Status LED", "On", "Off", true);
    +
    TimeField durationField(mainForm, "Timer duration", 24, TIMEFIELD_READ_WRITE);
    #define STATUS_LED 13
    @@ -190,7 +191,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    // Enable the screen saver, which will automatically blank the screen after 10 seconds.
    // The screen will wake up again when a button is pressed or lcd.display() is called.
    - +
    // Show the main form for the first time.
    mainForm.show();
    @@ -201,7 +202,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    timeField.setValue(millis() / 1000);
    // Dispatch button events to the main form.
    -
    int event = lcd.getButton();
    +
    int event = lcd.getButton();
    if (mainForm.dispatch(event) == FORM_CHANGED) {
    if (mainForm.isCurrent(ledField)) {
    if (ledField.value())
    @@ -215,9 +216,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    diff --git a/lcd_hello_world.html b/lcd_hello_world.html index 1f9f1f66..355faeed 100644 --- a/lcd_hello_world.html +++ b/lcd_hello_world.html @@ -3,6 +3,7 @@ + ArduinoLibs: Hello World for Freetronics LCD @@ -29,7 +30,7 @@
    - + @@ -75,34 +76,34 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    -
    Hello World for Freetronics LCD
    +
    Hello World for Freetronics LCD
    -

    The LCD class provides an enhanced version of the standard Arduino LiquidCrystal library that supports the additional features of the Freetronics LCD shield; namely the back light and the Up, Down, Left, Right, and Select buttons. This tutorial explains how to use the LCD class to perform basic text output and to use the enhanced shield features.

    +

    The LCD class provides an enhanced version of the standard Arduino LiquidCrystal library that supports the additional features of the Freetronics LCD shield; namely the back light and the Up, Down, Left, Right, and Select buttons. This tutorial explains how to use the LCD class to perform basic text output and to use the enhanced shield features.

    HelloWorld.png

    We start by including the library and initializing it:

    #include <LCD.h>
    -
    LCD lcd;
    +
    LCD lcd;

    Unlike the LiquidCrystal library we don't normally need to specify the pin assignments for this shield. The one exception is when the shield is used with the USBDroid and the D9 pin is reassigned as described on this page. In that case, the initialization sequence would look something like this instead:

    -
    LCD lcd(A1);
    +
    LCD lcd(A1);

    The next step is to enable the screen saver and print some text in the setup function:

    void setup() {
    - +
    lcd.print("hello, world!");
    }

    -

    The screen saver is a built-in feature of the LCD class that turns off the display and the back light after a specific timeout (the default is 10 seconds). Pressing any of the keys on the shield or calling LCD::display() will wake up the screen again.

    -

    In the program's loop function we print the number of seconds since startup to the second line of the LCD display:

    +

    The screen saver is a built-in feature of the LCD class that turns off the display and the back light after a specific timeout (the default is 10 seconds). Pressing any of the keys on the shield or calling LCD::display() will wake up the screen again.

    +

    In the program's loop function we print the number of seconds since startup to the second line of the LCD display:

    void loop() {
    lcd.setCursor(0, 1);
    lcd.print(millis() / 1000);

    We then print the name of the button that is currently pressed:

    lcd.setCursor(8, 1);
    -
    int button = lcd.getButton();
    +
    int button = lcd.getButton();
    if (button == LCD_BUTTON_LEFT)
    lcd.print("LEFT");
    else if (button == LCD_BUTTON_RIGHT)
    @@ -117,7 +118,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    lcd.print(" ");
    }

    -

    The LCD::getButton() function returns the key that has been pressed or released, or LCD_BUTTON_NONE if no key has been pressed or released this time through the loop.

    +

    The LCD::getButton() function returns the key that has been pressed or released, or LCD_BUTTON_NONE if no key has been pressed or released this time through the loop.

    The full source code for the example follows:

    /*
    This example demonstrates how to use the LCD library, which extends the
    @@ -130,7 +131,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    */
    #include <LCD.h>
    -
    LCD lcd;
    +
    LCD lcd;
    // Note: if you are using the USBDroid and have reassigned pin D9 on the LCD shield to some
    // other pin (e.g. A1), then you will need to initialize the shield with something like:
    @@ -138,7 +139,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    // See also: http://www.freetronics.com/pages/combining-the-lcd-keypad-shield-and-the-usbdroid
    void setup() {
    - +
    lcd.print("hello, world!");
    }
    @@ -147,7 +148,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    lcd.print(millis() / 1000);
    lcd.setCursor(8, 1);
    -
    int button = lcd.getButton();
    +
    int button = lcd.getButton();
    if (button == LCD_BUTTON_LEFT)
    lcd.print("LEFT");
    else if (button == LCD_BUTTON_RIGHT)
    @@ -165,9 +166,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    diff --git a/mainpage_8dox.html b/mainpage_8dox.html index f76e4de0..63ba0303 100644 --- a/mainpage_8dox.html +++ b/mainpage_8dox.html @@ -3,6 +3,7 @@ + ArduinoLibs: mainpage.dox File Reference @@ -29,7 +30,7 @@
    - + @@ -83,15 +84,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    mainpage.dox File Reference
    -

    Detailed Description

    -
    -

    Definition in file mainpage.dox.

    -
    + diff --git a/modules.html b/modules.html index e0c904a9..222cba20 100644 --- a/modules.html +++ b/modules.html @@ -3,6 +3,7 @@ + ArduinoLibs: Modules @@ -29,7 +30,7 @@ - + @@ -86,9 +87,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/pages.html b/pages.html index b6b5eb51..9744cf3c 100644 --- a/pages.html +++ b/pages.html @@ -3,6 +3,7 @@ + ArduinoLibs: Related Pages @@ -29,7 +30,7 @@ - + @@ -85,20 +86,21 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); oCharlieplexing Example oCylon Eyes Example oStar Trek Example -oDot Matrix Display Demo -oRunning figure example -oDumping Infrared Remote Control Codes -oSnake Video Game Using an Infrared Remote Control -oForm example for LCD displays -\Hello World for Freetronics LCD +oCryptographic Library +oDot Matrix Display Demo +oRunning figure example +oDumping Infrared Remote Control Codes +oSnake Video Game Using an Infrared Remote Control +oForm example for LCD displays +\Hello World for Freetronics LCD diff --git a/search/all_0.html b/search/all_0.html new file mode 100644 index 00000000..17b6da85 --- /dev/null +++ b/search/all_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_0.js b/search/all_0.js new file mode 100644 index 00000000..7bd3c287 --- /dev/null +++ b/search/all_0.js @@ -0,0 +1,18 @@ +var searchData= +[ + ['addfield',['addField',['../classForm.html#a5cb056ace428e75e321610555bfecac7',1,'Form']]], + ['adjustdays',['adjustDays',['../classRTC.html#adc29d7c43efc5a192d21965da5c3ee1d',1,'RTC']]], + ['adjustmonths',['adjustMonths',['../classRTC.html#aeca597e6e37a05716e664242f9cfc5f4',1,'RTC']]], + ['adjustyears',['adjustYears',['../classRTC.html#a31d10cb2f7cac8839bd4be2d858b802d',1,'RTC']]], + ['advance',['advance',['../classChaseLEDs.html#aa0f4e0bd07dd65ee5574e894a612486b',1,'ChaseLEDs']]], + ['advancetime',['advanceTime',['../classChaseLEDs.html#aed060c51bb63dd8065be89f895989700',1,'ChaseLEDs']]], + ['aes128',['AES128',['../classAES128.html',1,'AES128'],['../classAES128.html#af826ce33301767919bb60f27ad3ff693',1,'AES128::AES128()']]], + ['aes192',['AES192',['../classAES192.html',1,'AES192'],['../classAES192.html#a6f8e457cfffdc12f7dd829e3ac4585ce',1,'AES192::AES192()']]], + ['aes256',['AES256',['../classAES256.html',1,'AES256'],['../classAES256.html#a3b2cbe56f03a87ec4260be4f8914fb02',1,'AES256::AES256()']]], + ['aescommon',['AESCommon',['../classAESCommon.html',1,'AESCommon'],['../classAESCommon.html#acf224a392659429bac80dc68c7471b21',1,'AESCommon::AESCommon()']]], + ['alarm_2dclock_2edox',['alarm-clock.dox',['../alarm-clock_8dox.html',1,'']]], + ['alarm_20clock',['Alarm Clock',['../alarm_clock.html',1,'']]], + ['alarm_5fcount',['ALARM_COUNT',['../classRTC.html#aee5ae8f600ee5296e65635c0d836fca3',1,'RTC']]], + ['auto_5frepeat',['AUTO_REPEAT',['../classIRreceiver.html#a9c37631cc1291dc47cabcfef2f631cf9',1,'IRreceiver']]], + ['available',['available',['../classEEPROM24.html#af8b70971d882b06de3fc6644a8ece3cf',1,'EEPROM24::available()'],['../classI2CMaster.html#a6458fa99cfd9e6270ae6dff993955833',1,'I2CMaster::available()'],['../classSoftI2C.html#a849af91018caedbb82e83f02c543305e',1,'SoftI2C::available()'],['../classRNGClass.html#a49e3231ba65a5e4b045bc90976e0a659',1,'RNGClass::available()']]] +]; diff --git a/search/all_1.html b/search/all_1.html new file mode 100644 index 00000000..e2906449 --- /dev/null +++ b/search/all_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_1.js b/search/all_1.js new file mode 100644 index 00000000..a3fafbef --- /dev/null +++ b/search/all_1.js @@ -0,0 +1,21 @@ +var searchData= +[ + ['backlightoff',['BacklightOff',['../classLCD.html#a264bf94308c95d8598426e13dc8cdb28a9931c078cfd1023c69f1da431f9a656c',1,'LCD']]], + ['backlightonselect',['BacklightOnSelect',['../classLCD.html#a264bf94308c95d8598426e13dc8cdb28a781f3c5e42506bf4f86ba06d69b23d35',1,'LCD']]], + ['backlightpin',['backlightPin',['../classLCD.html#a171f59ba80e7775ebd3a399f56482a9c',1,'LCD']]], + ['begin',['begin',['../classRNGClass.html#a7f1aab3c324f8e8a424d683425e0fcf8',1,'RNGClass']]], + ['bitmap',['Bitmap',['../classBitmap.html',1,'Bitmap'],['../classBitmap.html#a40526748415c8bbc58a8510d636c20f4',1,'Bitmap::Bitmap()']]], + ['bitsperpixel',['bitsPerPixel',['../classBitmap.html#ad18d3d5a1e77d541a95e93ad1f958411',1,'Bitmap']]], + ['black',['Black',['../classBitmap.html#a2c7faeeb89d3624b5bbca58871785adc',1,'Bitmap']]], + ['blake2s',['BLAKE2s',['../classBLAKE2s.html',1,'BLAKE2s'],['../classBLAKE2s.html#a7345f4e08c19d7a8c278282b46df21a2',1,'BLAKE2s::BLAKE2s()']]], + ['blink_2dblink_2edox',['blink-blink.dox',['../blink-blink_8dox.html',1,'']]], + ['blink_2dcharlieplex_2edox',['blink-charlieplex.dox',['../blink-charlieplex_8dox.html',1,'']]], + ['blink_2dcylon_2edox',['blink-cylon.dox',['../blink-cylon_8dox.html',1,'']]], + ['blink_2dstartrek_2edox',['blink-startrek.dox',['../blink-startrek_8dox.html',1,'']]], + ['blinking_20led_20example',['Blinking LED Example',['../blink_blink.html',1,'']]], + ['blinkled',['BlinkLED',['../classBlinkLED.html',1,'BlinkLED'],['../classBlinkLED.html#afc33958651e7ce6dceb428ea654c2c2f',1,'BlinkLED::BlinkLED()']]], + ['blockcipher',['BlockCipher',['../classBlockCipher.html',1,'BlockCipher'],['../classBlockCipher.html#adc3d7cba116cbea9ad017f4cded6fe2f',1,'BlockCipher::BlockCipher()']]], + ['blocksize',['blockSize',['../classAESCommon.html#ae26afdcc6d18e8888974acae16df1413',1,'AESCommon::blockSize()'],['../classBLAKE2s.html#a9b5403734c20a0591d72a98912e4a305',1,'BLAKE2s::blockSize()'],['../classBlockCipher.html#a7059a310487c128db034b0ce0ad425a0',1,'BlockCipher::blockSize()'],['../classHash.html#a4e4297812e3483410556830fe5d47bdf',1,'Hash::blockSize()'],['../classSHA1.html#a816e3fd1a02cf1ecc67866cd8c7c309a',1,'SHA1::blockSize()'],['../classSHA256.html#a71bbd9064f9d6191d0647f867953a858',1,'SHA256::blockSize()']]], + ['boolfield',['BoolField',['../classBoolField.html',1,'BoolField'],['../classBoolField.html#a5d4382cdcdc989de0179d8f3f3a59998',1,'BoolField::BoolField(const String &label)'],['../classBoolField.html#a49aad212ed18f84baa105c24e86281d9',1,'BoolField::BoolField(Form &form, const String &label, const String &trueLabel, const String &falseLabel, bool value)']]], + ['bytecount',['byteCount',['../classDS1307RTC.html#a93c25269a9b78ab3331354db26672248',1,'DS1307RTC::byteCount()'],['../classDS3232RTC.html#a1319fe936dcb7e9d6bdf200b77a94f8e',1,'DS3232RTC::byteCount()'],['../classRTC.html#acfdebfb449710e44e11f9a3675e14fd8',1,'RTC::byteCount()']]] +]; diff --git a/search/all_10.html b/search/all_10.html new file mode 100644 index 00000000..c55c8367 --- /dev/null +++ b/search/all_10.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_10.js b/search/all_10.js new file mode 100644 index 00000000..65dcbed5 --- /dev/null +++ b/search/all_10.js @@ -0,0 +1,74 @@ +var searchData= +[ + ['star_20trek_20example',['Star Trek Example',['../blink_startrek.html',1,'']]], + ['snake_20video_20game_20using_20an_20infrared_20remote_20control',['Snake Video Game Using an Infrared Remote Control',['../ir_snake.html',1,'']]], + ['save',['save',['../classRNGClass.html#a139584fb249148e2058d1d645d090db7',1,'RNGClass']]], + ['screensavermode',['ScreenSaverMode',['../classLCD.html#a264bf94308c95d8598426e13dc8cdb28',1,'LCD::ScreenSaverMode()'],['../classLCD.html#a1917fa285f81f476b4c7cc20d15456b8',1,'LCD::screenSaverMode() const ']]], + ['scroll',['scroll',['../classBitmap.html#ae08eb6f9086f9923d8dc83a469ae4c4a',1,'Bitmap::scroll(int dx, int dy, Color fillColor=Black)'],['../classBitmap.html#af79ad4432297ff453fddc55625fec485',1,'Bitmap::scroll(int x, int y, int width, int height, int dx, int dy, Color fillColor=Black)']]], + ['second',['second',['../structRTCTime.html#a87b7c02e535d808dcba04c77e34abb91',1,'RTCTime']]], + ['seed_5fsize',['SEED_SIZE',['../classRNGClass.html#ae3a013bfc73795fd26ee36e70d89f4c2',1,'RNGClass']]], + ['setadvancetime',['setAdvanceTime',['../classChaseLEDs.html#af560270f72302c19fb7f95002089c9d7',1,'ChaseLEDs']]], + ['setautosavetime',['setAutoSaveTime',['../classRNGClass.html#a5848e87a5f2f0302c88b0377f0e3366d',1,'RNGClass']]], + ['setbacklightpin',['setBacklightPin',['../classLCD.html#a0b9b3b954290e7a3d94cdc829582b0a8',1,'LCD']]], + ['setblinkrate',['setBlinkRate',['../classBlinkLED.html#a47f95624881063aa91c0066ed2c92258',1,'BlinkLED']]], + ['setblockcipher',['setBlockCipher',['../classCBCCommon.html#a0b7631244b0c2c954cfdb50eb32f7db1',1,'CBCCommon::setBlockCipher()'],['../classCFBCommon.html#a9161530f456efacb64f5008fdb1a460c',1,'CFBCommon::setBlockCipher()'],['../classCTRCommon.html#a6c409c4ec1f99e0cb751196d891dc228',1,'CTRCommon::setBlockCipher()'],['../classOFBCommon.html#a0053e2566a88859effffacbf1e4ade04',1,'OFBCommon::setBlockCipher()']]], + ['setcounter',['setCounter',['../classChaCha.html#acab9109b7189ea88d9e5417a3a209eac',1,'ChaCha']]], + ['setcountersize',['setCounterSize',['../classCTRCommon.html#ae2bc6b33a864412598b426320d853337',1,'CTRCommon']]], + ['setcurrentfield',['setCurrentField',['../classForm.html#ae6004fedfa07191ffd47d7b12370b4e5',1,'Form']]], + ['setdoublebuffer',['setDoubleBuffer',['../classDMD.html#a6fbdcf8832f91d02500cb7a9b84d2723',1,'DMD']]], + ['setfalselabel',['setFalseLabel',['../classBoolField.html#ae6a29d27139fd78f2ca96152059fb30a',1,'BoolField']]], + ['setfont',['setFont',['../classBitmap.html#a64d7a9651d5c385a044cc910a3b82837',1,'Bitmap']]], + ['setholdtime',['setHoldTime',['../classCharlieplex.html#a8502f4c752faba37023ced587695f6a4',1,'Charlieplex']]], + ['setitems',['setItems',['../classListField.html#ae6709bce9355451b651893691456704e',1,'ListField']]], + ['setiv',['setIV',['../classCBCCommon.html#ac7a586217835055b3a354bb932db160c',1,'CBCCommon::setIV()'],['../classCFBCommon.html#a597040eb7df40adbbef94b4c3975cd80',1,'CFBCommon::setIV()'],['../classChaCha.html#a734f3246b1e6810c63637b8cda26b259',1,'ChaCha::setIV()'],['../classCipher.html#a3777acd8ff776a4e945bb7c9f2d044d9',1,'Cipher::setIV()'],['../classCTRCommon.html#aad289af3eb013cb3ffda6d7e8e8b3d04',1,'CTRCommon::setIV()'],['../classOFBCommon.html#a4a35364cf30d78f1968cc00803686caf',1,'OFBCommon::setIV()']]], + ['setkey',['setKey',['../classAES128.html#a42d7548eb5084a2c3e2d5aa5f6f98ba4',1,'AES128::setKey()'],['../classAES192.html#a4ab37cff19fb05ceef1533ebc5e37cde',1,'AES192::setKey()'],['../classAES256.html#a6af085d2d6a730ff1e025f982121bbda',1,'AES256::setKey()'],['../classBlockCipher.html#a9a05307664469777592799c8f77397c4',1,'BlockCipher::setKey()'],['../classCBCCommon.html#add75ea4342a190e560cee26a8e9efc37',1,'CBCCommon::setKey()'],['../classCFBCommon.html#a45b9be25fb96f0e3ca5211b064e2baea',1,'CFBCommon::setKey()'],['../classChaCha.html#a6b2bdffbd3705e388bb458edb2f40c90',1,'ChaCha::setKey()'],['../classCipher.html#a0dfe133bda81dfa680b668f5908ccbe5',1,'Cipher::setKey()'],['../classCTRCommon.html#a79da937dc2c444a174176beab33c055a',1,'CTRCommon::setKey()'],['../classOFBCommon.html#ac3a98e81d95ebc6c883baef5f4cfbefb',1,'OFBCommon::setKey()']]], + ['setlabel',['setLabel',['../classField.html#ad4ea63599d780c35b296cf2840b69f7b',1,'Field']]], + ['setled',['setLed',['../classCharlieplex.html#ab103c9687a0890faf72e4da79e3de0a5',1,'Charlieplex']]], + ['setloopcount',['setLoopCount',['../classMelody.html#a507097a2e8ff51a5e9157e3a320ae35b',1,'Melody']]], + ['setloopduration',['setLoopDuration',['../classMelody.html#ae88ad06c2acb728f56dd213d5dad6006',1,'Melody']]], + ['setmaxhours',['setMaxHours',['../classTimeField.html#a7ac124eb9dde01c18c711c421736b5ed',1,'TimeField']]], + ['setmaxvalue',['setMaxValue',['../classIntField.html#a36cbd7c24480cc3fcf0c7634d5e22bf1',1,'IntField']]], + ['setmelody',['setMelody',['../classMelody.html#adb6ad8e8cfe8c9a137e470f4e85c7254',1,'Melody']]], + ['setminvalue',['setMinValue',['../classIntField.html#afffe7be6721a043cec7a5a85c19e0ada',1,'IntField']]], + ['setnumrounds',['setNumRounds',['../classChaCha.html#a1a0911e0be8f4590d7fb76884d98c541',1,'ChaCha']]], + ['setpixel',['setPixel',['../classBitmap.html#aac994b75418e7d37ec66829437329114',1,'Bitmap']]], + ['setpwmled',['setPwmLed',['../classCharlieplex.html#a605a302e13005a1aa3d68d0e22bc474b',1,'Charlieplex']]], + ['setreadonly',['setReadOnly',['../classTimeField.html#a3f002a0729e90e88d04025908be102fe',1,'TimeField']]], + ['setscreensavermode',['setScreenSaverMode',['../classLCD.html#a56d1f68532c779c65fbbd071fb444801',1,'LCD']]], + ['setstate',['setState',['../classBlinkLED.html#af904a345e56d49948a042ac439d0b9d4',1,'BlinkLED']]], + ['setstepvalue',['setStepValue',['../classIntField.html#a8fb6e207bd906062bb788e19dbe58bcb',1,'IntField']]], + ['setsuffix',['setSuffix',['../classIntField.html#a9324bba994389f3a4563d9c18bd2f1cd',1,'IntField']]], + ['setsystemfilter',['setSystemFilter',['../classIRreceiver.html#a920828f1411fa12d1856cd933066bd08',1,'IRreceiver']]], + ['settextcolor',['setTextColor',['../classBitmap.html#a8e225a4f188269bb18265ae4b49de0a3',1,'Bitmap']]], + ['settruelabel',['setTrueLabel',['../classBoolField.html#a803fc8c39765da4a44af01d925cd4194',1,'BoolField']]], + ['setvalue',['setValue',['../classBoolField.html#a080c575fd4a98e6afc4b9197fbab5577',1,'BoolField::setValue()'],['../classIntField.html#aed421e2c52946f2c7643534b4f6f13f7',1,'IntField::setValue()'],['../classListField.html#a266193631e897fb0b46e1270b1d0eb24',1,'ListField::setValue()'],['../classTextField.html#a24b98c5bb744331bf0a5facc8ea9c033',1,'TextField::setValue()'],['../classTimeField.html#a063b6df2bd6fa7970ee445ab4e5d1fc1',1,'TimeField::setValue()']]], + ['sha1',['SHA1',['../classSHA1.html',1,'SHA1'],['../classSHA1.html#ad49a5108ffd6996b1133bf41224ff726',1,'SHA1::SHA1()']]], + ['sha256',['SHA256',['../classSHA256.html',1,'SHA256'],['../classSHA256.html#ab672831c542df07ff03ded25760feec2',1,'SHA256::SHA256()']]], + ['show',['show',['../classForm.html#a9e8d718ab55a8034c22c606ccfa90d65',1,'Form']]], + ['size',['size',['../classEEPROM24.html#aa544875cef9bd05bf71d6c19be06cf7c',1,'EEPROM24']]], + ['sleep_5f120_5fms',['SLEEP_120_MS',['../group__power__save.html#ggabdc6266a040b28c4d79028ddb0ceae36a96fa577b54aa6f2341ea5ddd839aa8bc',1,'PowerSave.h']]], + ['sleep_5f15_5fms',['SLEEP_15_MS',['../group__power__save.html#ggabdc6266a040b28c4d79028ddb0ceae36a3d16487a7386c6348f1c1d886564e3c4',1,'PowerSave.h']]], + ['sleep_5f1_5fsec',['SLEEP_1_SEC',['../group__power__save.html#ggabdc6266a040b28c4d79028ddb0ceae36a92310daf29e5899770b80c1c4e850b9b',1,'PowerSave.h']]], + ['sleep_5f250_5fms',['SLEEP_250_MS',['../group__power__save.html#ggabdc6266a040b28c4d79028ddb0ceae36abcbf68cfdb688220da61ac98b1a2ec69',1,'PowerSave.h']]], + ['sleep_5f2_5fsec',['SLEEP_2_SEC',['../group__power__save.html#ggabdc6266a040b28c4d79028ddb0ceae36a04571aa0b801c28cd756513303b229cd',1,'PowerSave.h']]], + ['sleep_5f30_5fms',['SLEEP_30_MS',['../group__power__save.html#ggabdc6266a040b28c4d79028ddb0ceae36af31050c5ef733b3e231920143b041825',1,'PowerSave.h']]], + ['sleep_5f4_5fsec',['SLEEP_4_SEC',['../group__power__save.html#ggabdc6266a040b28c4d79028ddb0ceae36a4cba1036d7a69225110b68b372f10410',1,'PowerSave.h']]], + ['sleep_5f500_5fms',['SLEEP_500_MS',['../group__power__save.html#ggabdc6266a040b28c4d79028ddb0ceae36aa49e4d5f92a5f48070dde0babf75a9b0',1,'PowerSave.h']]], + ['sleep_5f60_5fms',['SLEEP_60_MS',['../group__power__save.html#ggabdc6266a040b28c4d79028ddb0ceae36a716f5a9f35e77a2d334ad71f05bd5fdc',1,'PowerSave.h']]], + ['sleep_5f8_5fsec',['SLEEP_8_SEC',['../group__power__save.html#ggabdc6266a040b28c4d79028ddb0ceae36a8c47dd1ef81c2f41da7525b5ee4bfc3a',1,'PowerSave.h']]], + ['sleepduration',['SleepDuration',['../group__power__save.html#gabdc6266a040b28c4d79028ddb0ceae36',1,'PowerSave.h']]], + ['sleepfor',['sleepFor',['../group__power__save.html#ga95c1666038493a7f95be6768882eebad',1,'sleepFor(SleepDuration duration, uint8_t mode): PowerSave.cpp'],['../group__power__save.html#ga95c1666038493a7f95be6768882eebad',1,'sleepFor(SleepDuration duration, uint8_t mode=0): PowerSave.cpp']]], + ['softi2c',['SoftI2C',['../classSoftI2C.html',1,'SoftI2C'],['../classSoftI2C.html#adb6e00ee3f930f1d32010a18feb5f6cc',1,'SoftI2C::SoftI2C()']]], + ['startread',['startRead',['../classI2CMaster.html#a4e5f1a1a4c2242699be5a35fc4872fde',1,'I2CMaster::startRead()'],['../classSoftI2C.html#aa0dafc067cfa374af75e060dca647ec3',1,'SoftI2C::startRead()']]], + ['startwrite',['startWrite',['../classI2CMaster.html#a01960fc821cb25e4c88c26d2c6107e35',1,'I2CMaster::startWrite()'],['../classSoftI2C.html#aa8a3219f4e6ff52306cc3c219f37d8f9',1,'SoftI2C::startWrite()']]], + ['state',['state',['../classBlinkLED.html#ab89b5b3435998ea6699d4bf94866e233',1,'BlinkLED']]], + ['stepvalue',['stepValue',['../classIntField.html#a49025ee3473fe066a6a6c546af98bfbd',1,'IntField']]], + ['stir',['stir',['../classNoiseSource.html#a7ce647815524fe84f562aca5256e12f3',1,'NoiseSource::stir()'],['../classRNGClass.html#ad99535ea23ae2fec55bdebb8c24def02',1,'RNGClass::stir(const uint8_t *data, size_t len, unsigned int credit=0)'],['../classRNGClass.html#a541e4118e2ed10617480bb9949f9c516',1,'RNGClass::stir(NoiseSource &source)'],['../classTransistorNoiseSource.html#add25c6a14b0506bc30ca781f2d923917',1,'TransistorNoiseSource::stir()']]], + ['stop',['stop',['../classMelody.html#ac0c552233c41d85f2766d2e4df376b2b',1,'Melody']]], + ['stride',['stride',['../classBitmap.html#af30df263729385ea2330effe3c80a1bc',1,'Bitmap']]], + ['suffix',['suffix',['../classIntField.html#a1a1de6a1836dfdb820c92b7f188a1b05',1,'IntField']]], + ['swapbuffers',['swapBuffers',['../classDMD.html#a80269ccd44b3ef9ee15f0a1009b7a60a',1,'DMD']]], + ['swapbuffersandcopy',['swapBuffersAndCopy',['../classDMD.html#a0b1771cf790b2b62eea55e56b02e3736',1,'DMD']]], + ['system',['system',['../classIRreceiver.html#a19e9334ae97812fa85078507d105478f',1,'IRreceiver']]], + ['systemfilter',['systemFilter',['../classIRreceiver.html#a2c6adc404f71f263ba535ec1ed9cff1a',1,'IRreceiver']]] +]; diff --git a/search/all_11.html b/search/all_11.html new file mode 100644 index 00000000..6f3943a9 --- /dev/null +++ b/search/all_11.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_11.js b/search/all_11.js new file mode 100644 index 00000000..f67bae63 --- /dev/null +++ b/search/all_11.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['textcolor',['textColor',['../classBitmap.html#ab6e5f5744fd2f18478aac428b751d848',1,'Bitmap']]], + ['textfield',['TextField',['../classTextField.html',1,'TextField'],['../classTextField.html#a5108741ab147b2cd5a399fefbe0a2382',1,'TextField::TextField(const String &label)'],['../classTextField.html#a24096a344d9161b2c99ce724ec2ee93c',1,'TextField::TextField(Form &form, const String &label, const String &value)']]], + ['textheight',['textHeight',['../classBitmap.html#a628bb694fcfe6eab619a4f1e152d41c4',1,'Bitmap']]], + ['textwidth',['textWidth',['../classBitmap.html#a0f7607b1c7867987f4500d490a666e8a',1,'Bitmap::textWidth(const char *str, int len=-1) const '],['../classBitmap.html#a8ca70aa0f8f722a228358bffe794e925',1,'Bitmap::textWidth(const String &str, int start=0, int len=-1) const ']]], + ['timefield',['TimeField',['../classTimeField.html',1,'TimeField'],['../classTimeField.html#a138e2425379705828a87eb2d8a836431',1,'TimeField::TimeField(const String &label)'],['../classTimeField.html#a87f222bc098367963ed21a7edc4624de',1,'TimeField::TimeField(Form &form, const String &label, int maxHours, bool readOnly)']]], + ['transistornoisesource',['TransistorNoiseSource',['../classTransistorNoiseSource.html',1,'TransistorNoiseSource'],['../classTransistorNoiseSource.html#a05bab61c301a5397021048c95ca3107d',1,'TransistorNoiseSource::TransistorNoiseSource()']]], + ['truelabel',['trueLabel',['../classBoolField.html#a9972030beec6e007b556c6eb652e163d',1,'BoolField']]] +]; diff --git a/search/all_12.html b/search/all_12.html new file mode 100644 index 00000000..3c7c89ef --- /dev/null +++ b/search/all_12.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_12.js b/search/all_12.js new file mode 100644 index 00000000..aaab739a --- /dev/null +++ b/search/all_12.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['unusedpin',['unusedPin',['../group__power__save.html#ga6dbe8e20a70e83cf5b068177675ec792',1,'PowerSave.h']]], + ['update',['update',['../classBLAKE2s.html#aa192da2fa044b03cccaf11e87fdf9911',1,'BLAKE2s::update()'],['../classHash.html#aec9761ee427d122e7450de8df200265c',1,'Hash::update()'],['../classSHA1.html#aec77fbc5015f82bbf7055e535085656a',1,'SHA1::update()'],['../classSHA256.html#a555bf8efb17afd4842d2e55a1f39f27b',1,'SHA256::update()']]], + ['updatecursor',['updateCursor',['../classField.html#afc612378167be0e7f8a6f8395b3537bd',1,'Field']]] +]; diff --git a/search/all_13.html b/search/all_13.html new file mode 100644 index 00000000..0bd629b8 --- /dev/null +++ b/search/all_13.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_13.js b/search/all_13.js new file mode 100644 index 00000000..46d0b7fe --- /dev/null +++ b/search/all_13.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['value',['value',['../classBoolField.html#a9147826437fbaf9b29eda9dee9e37b39',1,'BoolField::value()'],['../classIntField.html#a2fb650827ce8cb4662253bb6c32acb52',1,'IntField::value()'],['../classListField.html#aab8477757cd89bacd242c85bac2dccb1',1,'ListField::value()'],['../classTextField.html#a124764b6fc7c19aaf683f72cd42636b1',1,'TextField::value()'],['../classTimeField.html#a400aaa72a83b3b872e1de1c3af1a240f',1,'TimeField::value()']]] +]; diff --git a/search/all_14.html b/search/all_14.html new file mode 100644 index 00000000..2ad638b2 --- /dev/null +++ b/search/all_14.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_14.js b/search/all_14.js new file mode 100644 index 00000000..e0ae74d8 --- /dev/null +++ b/search/all_14.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['white',['White',['../classBitmap.html#a39b6754cfe50a457bbfdb1980fd87eb7',1,'Bitmap']]], + ['width',['width',['../classBitmap.html#a76c3b49e535761f07c553e7336daf523',1,'Bitmap']]], + ['wrap',['WRAP',['../classRTC.html#a02ace2d775063be9a99035851c9274eb',1,'RTC']]], + ['write',['write',['../classEEPROM24.html#a9e017772e3459ee4ab987e27d78937f8',1,'EEPROM24::write(unsigned long address, uint8_t value)'],['../classEEPROM24.html#a3d918ed34da7ca6d21a776c0614eebf3',1,'EEPROM24::write(unsigned long address, const void *data, size_t length)'],['../classI2CMaster.html#a0bf6b84cb1e2b3a37a4a0260d0b6f960',1,'I2CMaster::write()'],['../classSoftI2C.html#ab46f0b6363c9cfe6fb3ab907956d5d73',1,'SoftI2C::write()']]], + ['writealarm',['writeAlarm',['../classDS1307RTC.html#a7354aed91d7c94d0d7b2144b1bf32c75',1,'DS1307RTC::writeAlarm()'],['../classDS3232RTC.html#a8b0a65e0ac479aec8fad6ca3147dbe75',1,'DS3232RTC::writeAlarm()'],['../classRTC.html#a0e96c91efd9e7a6340effdae3eadf17e',1,'RTC::writeAlarm()']]], + ['writebyte',['writeByte',['../classDS1307RTC.html#a6ef435fd4aa4adf8eefdf8b1741f5ba6',1,'DS1307RTC::writeByte()'],['../classDS3232RTC.html#a9acebf12c5cecdd6d84e0ff9ed41765a',1,'DS3232RTC::writeByte()'],['../classRTC.html#a1cab6397ec04b1e2b3feea5b3cd1f749',1,'RTC::writeByte()']]], + ['writedate',['writeDate',['../classDS1307RTC.html#a4f7346be33612cf9ecd96080eb046230',1,'DS1307RTC::writeDate()'],['../classDS3232RTC.html#a31c004a90c724979d8267c31f2dbf5ed',1,'DS3232RTC::writeDate()'],['../classRTC.html#ae667600d05c8e7b06a93574dd068a4d7',1,'RTC::writeDate()']]], + ['writetime',['writeTime',['../classDS1307RTC.html#a0a5d0d86a0345420ebb289ea724b19e8',1,'DS1307RTC::writeTime()'],['../classDS3232RTC.html#ab0ca13a8b80da856b37fc53b84e27c78',1,'DS3232RTC::writeTime()'],['../classRTC.html#a102e2ec15bf0273d8f7e9ce4b6dcc96e',1,'RTC::writeTime()']]] +]; diff --git a/search/all_15.html b/search/all_15.html new file mode 100644 index 00000000..d3b5274b --- /dev/null +++ b/search/all_15.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_15.js b/search/all_15.js new file mode 100644 index 00000000..d4472111 --- /dev/null +++ b/search/all_15.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['year',['year',['../structRTCDate.html#a7d31822daff3c3fc947386abd897732f',1,'RTCDate']]] +]; diff --git a/search/all_16.html b/search/all_16.html new file mode 100644 index 00000000..b4e3666f --- /dev/null +++ b/search/all_16.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_16.js b/search/all_16.js new file mode 100644 index 00000000..836de2ab --- /dev/null +++ b/search/all_16.js @@ -0,0 +1,20 @@ +var searchData= +[ + ['_7eaescommon',['~AESCommon',['../classAESCommon.html#a8f67970c86c23affb0297fc1bb10fad8',1,'AESCommon']]], + ['_7ebitmap',['~Bitmap',['../classBitmap.html#a72d2a301ec1eb1c8d0f3d64823659a8e',1,'Bitmap']]], + ['_7eblake2s',['~BLAKE2s',['../classBLAKE2s.html#a4b3187ecaa3d3c8febfbb40c0f779aa7',1,'BLAKE2s']]], + ['_7eblockcipher',['~BlockCipher',['../classBlockCipher.html#acec1bc4faeaa6dda2d91bffd79a988f9',1,'BlockCipher']]], + ['_7ecbccommon',['~CBCCommon',['../classCBCCommon.html#a45a91367531b4692b3bb7237ab6e9015',1,'CBCCommon']]], + ['_7ecfbcommon',['~CFBCommon',['../classCFBCommon.html#ae200d7b876a1f154bcdb1cdf33d3be54',1,'CFBCommon']]], + ['_7echarlieplex',['~Charlieplex',['../classCharlieplex.html#a4dbe37ccba8ba18139f4e710afdcd103',1,'Charlieplex']]], + ['_7ecipher',['~Cipher',['../classCipher.html#a84bdea765f7e35aa5b5950dd2853a383',1,'Cipher']]], + ['_7edmd',['~DMD',['../classDMD.html#a7b37e05584d3e0308163700920df99b2',1,'DMD']]], + ['_7efield',['~Field',['../classField.html#a45d6e6d09b8f8e46de62b40119d62c60',1,'Field']]], + ['_7eform',['~Form',['../classForm.html#a9cda7cce41e81bfaca51e922d4f9b98f',1,'Form']]], + ['_7ehash',['~Hash',['../classHash.html#a4e4b4797dda8678aaed058bae155813e',1,'Hash']]], + ['_7enoisesource',['~NoiseSource',['../classNoiseSource.html#a4eca1e894a5d719fb9bf4df34a791cdb',1,'NoiseSource']]], + ['_7eofbcommon',['~OFBCommon',['../classOFBCommon.html#aae7435157e51bf977d3481e94e17ae01',1,'OFBCommon']]], + ['_7erngclass',['~RNGClass',['../classRNGClass.html#aef3ee2fb14a39caf650dc90a0226dd31',1,'RNGClass']]], + ['_7esha1',['~SHA1',['../classSHA1.html#a8485d7c14fa29286cd3c7acfe438606d',1,'SHA1']]], + ['_7esha256',['~SHA256',['../classSHA256.html#ad82f2925b612de315b289017e023a73b',1,'SHA256']]] +]; diff --git a/search/all_2.html b/search/all_2.html new file mode 100644 index 00000000..95ded122 --- /dev/null +++ b/search/all_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_2.js b/search/all_2.js new file mode 100644 index 00000000..eaafe9ca --- /dev/null +++ b/search/all_2.js @@ -0,0 +1,26 @@ +var searchData= +[ + ['charlieplexing_20example',['Charlieplexing Example',['../blink_charlieplex.html',1,'']]], + ['cylon_20eyes_20example',['Cylon Eyes Example',['../blink_cylon.html',1,'']]], + ['calibrating',['calibrating',['../classNoiseSource.html#ac8ac086f830efb5ffe3e8d506aa61c85',1,'NoiseSource::calibrating()'],['../classTransistorNoiseSource.html#a9244b327c291c737396e769da9c66af9',1,'TransistorNoiseSource::calibrating()']]], + ['cbc',['CBC',['../classCBC.html',1,'CBC< T >'],['../classCBC.html#ae22d0d9347d5f3c97328e643a9b29ecb',1,'CBC::CBC()']]], + ['cbccommon',['CBCCommon',['../classCBCCommon.html',1,'CBCCommon'],['../classCBCCommon.html#a7575b369910e05f54e76698dd04bfa05',1,'CBCCommon::CBCCommon()']]], + ['cfb',['CFB',['../classCFB.html',1,'CFB< T >'],['../classCFB.html#a26a027614d027162c67085a58b512318',1,'CFB::CFB()']]], + ['cfbcommon',['CFBCommon',['../classCFBCommon.html',1,'CFBCommon'],['../classCFBCommon.html#adad0210430c83817c993bdca30d562a6',1,'CFBCommon::CFBCommon()']]], + ['chacha',['ChaCha',['../classChaCha.html',1,'ChaCha'],['../classChaCha.html#a5831811b705d3c80e97f0242597f0c7e',1,'ChaCha::ChaCha()']]], + ['charlieplex',['Charlieplex',['../classCharlieplex.html',1,'Charlieplex'],['../classCharlieplex.html#abfb0d0456bcbadbf60c21f615adacdbd',1,'Charlieplex::Charlieplex()']]], + ['charwidth',['charWidth',['../classBitmap.html#a9b79ac13077ca865e4515510297780bd',1,'Bitmap']]], + ['chaseleds',['ChaseLEDs',['../classChaseLEDs.html',1,'ChaseLEDs'],['../classChaseLEDs.html#ab6bb3da371d3730a6552e93a9b2eab78',1,'ChaseLEDs::ChaseLEDs()']]], + ['cipher',['Cipher',['../classCipher.html',1,'Cipher'],['../classCipher.html#a6a61077eca3ccd5900f92ceac58fb09c',1,'Cipher::Cipher()']]], + ['clear',['clear',['../classBitmap.html#a839dc8fab05a5ebf7a6b2e61436b2fa1',1,'Bitmap::clear()'],['../classAESCommon.html#a83e43f7d07e31d90fd7b768a93ecfce6',1,'AESCommon::clear()'],['../classBLAKE2s.html#a0848885f52df51dc53949d32a206e72d',1,'BLAKE2s::clear()'],['../classBlockCipher.html#a6f27d46e9dfa7761d014d828ad5f955b',1,'BlockCipher::clear()'],['../classCBCCommon.html#a7befadfe7384e0e857a96a59bf3845e9',1,'CBCCommon::clear()'],['../classCFBCommon.html#a847d320b0fe7f329385f26511b42c40d',1,'CFBCommon::clear()'],['../classChaCha.html#af533905f679066c41f4d6cd76bddb4cb',1,'ChaCha::clear()'],['../classCipher.html#a4b7c3965646441a70d9ab934a7c92ab1',1,'Cipher::clear()'],['../classCTRCommon.html#ac0d6381c02fe2a8a017ad66d006a6ef2',1,'CTRCommon::clear()'],['../classHash.html#a4a959469433cd9348ab7f3ac6228bb34',1,'Hash::clear()'],['../classOFBCommon.html#a55bf2396beb91c457bfc4c20ef5c8123',1,'OFBCommon::clear()'],['../classSHA1.html#a41a159d6565b04d3f620dcd720faaf3f',1,'SHA1::clear()'],['../classSHA256.html#add0d1649d533b27005ccd8508398c689',1,'SHA256::clear()']]], + ['color',['Color',['../classBitmap.html#a88d386944a7017aa776a177b10d8b2ba',1,'Bitmap']]], + ['command',['command',['../classIRreceiver.html#a4b021592a2b089dc2f1e138a38506fda',1,'IRreceiver']]], + ['copy',['copy',['../classBitmap.html#ab22fe1f3871934987a670b559f67c67c',1,'Bitmap']]], + ['count',['count',['../classCharlieplex.html#a5008aa4143d381ce34a3aed1a3843e4e',1,'Charlieplex']]], + ['cryptographic_20library',['Cryptographic Library',['../crypto.html',1,'']]], + ['crypto_2edox',['crypto.dox',['../crypto_8dox.html',1,'']]], + ['ctr',['CTR',['../classCTR.html',1,'CTR< T >'],['../classCTR.html#a7025ab5d79f0f0763f751aeabc425ca9',1,'CTR::CTR()']]], + ['ctrcommon',['CTRCommon',['../classCTRCommon.html',1,'CTRCommon'],['../classCTRCommon.html#abeb01342f17023e99776001d397c51ff',1,'CTRCommon::CTRCommon()']]], + ['currentfield',['currentField',['../classForm.html#a85a219a73294cef1f89a2182b5c25bf8',1,'Form']]], + ['curve25519',['Curve25519',['../classCurve25519.html',1,'']]] +]; diff --git a/search/all_3.html b/search/all_3.html new file mode 100644 index 00000000..4d312d03 --- /dev/null +++ b/search/all_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_3.js b/search/all_3.js new file mode 100644 index 00000000..79eac3a1 --- /dev/null +++ b/search/all_3.js @@ -0,0 +1,38 @@ +var searchData= +[ + ['data',['data',['../classBitmap.html#a5eeed27c176eb6e4a2c39ea83444e27d',1,'Bitmap::data()'],['../classBitmap.html#a20fea2a946545aa3b5edd78245149e5f',1,'Bitmap::data() const ']]], + ['day',['day',['../structRTCDate.html#a2d68ff3fb90240df522b41222362704c',1,'RTCDate']]], + ['dayofweek',['dayOfWeek',['../classRTC.html#a525a9c1dad89613708f47a683eb316aa',1,'RTC::dayOfWeek(const RTCDate *date)'],['../classRTC.html#ab2ca0cbee608ec32d3d6e04d40298f11',1,'RTC::DayOfWeek()']]], + ['decrement',['DECREMENT',['../classRTC.html#a05b1bd1479afc80682abdd4f3e58dc6f',1,'RTC']]], + ['decrypt',['decrypt',['../classCBCCommon.html#ab46a2625cae9a654c708e1f31a0e22b6',1,'CBCCommon::decrypt()'],['../classCFBCommon.html#aaaa3d61c5743e30e355207c193c0b0ef',1,'CFBCommon::decrypt()'],['../classChaCha.html#a1f54b2b51b59428010f81a6c4dc4e42c',1,'ChaCha::decrypt()'],['../classCipher.html#ac6099d1a0d7f2ff67b0e4ccb4a17eb08',1,'Cipher::decrypt()'],['../classCTRCommon.html#a0943387cf1124258389702e0690740fe',1,'CTRCommon::decrypt()'],['../classOFBCommon.html#aeb3636d7175b150e2bf16367e51c2e36',1,'OFBCommon::decrypt()']]], + ['decryptblock',['decryptBlock',['../classAESCommon.html#a95a806adf42f975765ff62907efdc639',1,'AESCommon::decryptBlock()'],['../classBlockCipher.html#ac3ba2450222aa1ea804ae4881ab6440c',1,'BlockCipher::decryptBlock()']]], + ['defaultfield',['defaultField',['../classForm.html#aba75b59f68b31dd77dbbac9ab5c3124b',1,'Form']]], + ['destroy',['destroy',['../classRNGClass.html#a9901367d86f2303a59bbc12fe91cad00',1,'RNGClass']]], + ['dh1',['dh1',['../classCurve25519.html#a2b6911583d17ea9a36bbbb40d58b3d89',1,'Curve25519']]], + ['dh2',['dh2',['../classCurve25519.html#a14022d6ac68ec691ffb0247275078ab9',1,'Curve25519']]], + ['disable32khzoutput',['disable32kHzOutput',['../classDS3232RTC.html#ada732bae42fc2833e59ae293aa27ddcb',1,'DS3232RTC']]], + ['disablealarminterrupts',['disableAlarmInterrupts',['../classDS3232RTC.html#a225b8c62d617aa1b7be7d20e8a033be9',1,'DS3232RTC']]], + ['disablescreensaver',['disableScreenSaver',['../classLCD.html#a85c3a4694b105731404df36e35e5b26e',1,'LCD']]], + ['disabletimer1',['disableTimer1',['../classDMD.html#a39af27e216f654ecc7e60b0614cb6b33',1,'DMD']]], + ['disabletimer2',['disableTimer2',['../classDMD.html#a52fe885bfb380b74df54c96221811cff',1,'DMD']]], + ['dispatch',['dispatch',['../classBoolField.html#af793bafc1193d79b495c2ede711bca57',1,'BoolField::dispatch()'],['../classField.html#a061bd1ed4d8b079df86465df8facd3b3',1,'Field::dispatch()'],['../classForm.html#a89bd3850e87caa2ca7b2e946f923d0ee',1,'Form::dispatch()'],['../classIntField.html#a01a17d5a89c76c42c4f0516984ce653f',1,'IntField::dispatch()'],['../classListField.html#a5d752bd561cde735b175bcdfda55832a',1,'ListField::dispatch()'],['../classTimeField.html#a9b953d9abdbe960a3fa34938462832e5',1,'TimeField::dispatch()']]], + ['display',['display',['../classLCD.html#a5b07cf05e8e5e7c53654f5ca0cf58b89',1,'LCD']]], + ['displayoff',['DisplayOff',['../classLCD.html#a264bf94308c95d8598426e13dc8cdb28a3f1e62d5fcd314d6ff067d3e74c4bf5f',1,'LCD']]], + ['dmd',['DMD',['../classDMD.html',1,'DMD'],['../classDMD.html#affd37accffe951c8878434dfa1245809',1,'DMD::DMD()']]], + ['dmd_2ddemo_2edox',['dmd-demo.dox',['../dmd-demo_8dox.html',1,'']]], + ['dmd_2drunning_2dfigure_2edox',['dmd-running-figure.dox',['../dmd-running-figure_8dox.html',1,'']]], + ['dot_20matrix_20display_20demo',['Dot Matrix Display Demo',['../dmd_demo.html',1,'']]], + ['doublebuffer',['doubleBuffer',['../classDMD.html#aab1f3ba29c053d630ae12865d22166ec',1,'DMD']]], + ['drawbitmap',['drawBitmap',['../classBitmap.html#a491e9c0bb20ddf5a5eb4933077c8ed72',1,'Bitmap::drawBitmap(int x, int y, const Bitmap &bitmap, Color color=White)'],['../classBitmap.html#a5e4f23e8f14e193410b5f071149401e4',1,'Bitmap::drawBitmap(int x, int y, Bitmap::ProgMem bitmap, Color color=White)']]], + ['drawchar',['drawChar',['../classBitmap.html#a1a11f29863ee7f36a3b15c91963102bd',1,'Bitmap']]], + ['drawcircle',['drawCircle',['../classBitmap.html#a933763a4f3cba79fbcf97ae6d0a864aa',1,'Bitmap']]], + ['drawfilledcircle',['drawFilledCircle',['../classBitmap.html#a757291b9a39bcb0d64ac98d3a2fa061b',1,'Bitmap']]], + ['drawfilledrect',['drawFilledRect',['../classBitmap.html#a568acbca3818dd85dd62fff6d0b36ffb',1,'Bitmap']]], + ['drawinvertedbitmap',['drawInvertedBitmap',['../classBitmap.html#a4321640464bc08b60348c09bff01b86a',1,'Bitmap::drawInvertedBitmap(int x, int y, const Bitmap &bitmap)'],['../classBitmap.html#a2e862b72c2d6471af737fac320472d69',1,'Bitmap::drawInvertedBitmap(int x, int y, Bitmap::ProgMem bitmap)']]], + ['drawline',['drawLine',['../classBitmap.html#aa0a84f3694e343d68e7021552c69f767',1,'Bitmap']]], + ['drawrect',['drawRect',['../classBitmap.html#aac61e3f7f625db568e37d88b52b3b2fc',1,'Bitmap']]], + ['drawtext',['drawText',['../classBitmap.html#a3e9bcbfb584d5020bd6f0a313ee275f0',1,'Bitmap::drawText(int x, int y, const char *str, int len=-1)'],['../classBitmap.html#a802f5d6bd19a3727670e61e7a88a0cac',1,'Bitmap::drawText(int x, int y, const String &str, int start=0, int len=-1)']]], + ['ds1307rtc',['DS1307RTC',['../classDS1307RTC.html',1,'DS1307RTC'],['../classDS1307RTC.html#a092805d75bea323dc4be062638bff866',1,'DS1307RTC::DS1307RTC()']]], + ['ds3232rtc',['DS3232RTC',['../classDS3232RTC.html',1,'DS3232RTC'],['../classDS3232RTC.html#aa959454ae01b11c48d6ec7ec192b4ccb',1,'DS3232RTC::DS3232RTC()']]], + ['dumping_20infrared_20remote_20control_20codes',['Dumping Infrared Remote Control Codes',['../ir_dumpir.html',1,'']]] +]; diff --git a/search/all_4.html b/search/all_4.html new file mode 100644 index 00000000..d72a9104 --- /dev/null +++ b/search/all_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_4.js b/search/all_4.js new file mode 100644 index 00000000..d39b6d33 --- /dev/null +++ b/search/all_4.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['eeprom24',['EEPROM24',['../classEEPROM24.html',1,'EEPROM24'],['../classEEPROM24.html#ae8547f6ff7711496e1959ee24a142995',1,'EEPROM24::EEPROM24()']]], + ['enable32khzoutput',['enable32kHzOutput',['../classDS3232RTC.html#a3966de6f4241d86f198a8b9dd5e7e59a',1,'DS3232RTC']]], + ['enablealarminterrupts',['enableAlarmInterrupts',['../classDS3232RTC.html#ab91e79271a1f8e75b07bddbb04445dc9',1,'DS3232RTC']]], + ['enablescreensaver',['enableScreenSaver',['../classLCD.html#af9a2326d034fa159d384ec16223c924f',1,'LCD']]], + ['enabletimer1',['enableTimer1',['../classDMD.html#a4c3b04b384f3d656a9b59690836775e2',1,'DMD']]], + ['enabletimer2',['enableTimer2',['../classDMD.html#a5469775db7fafebca2cdbc6a6372fb97',1,'DMD']]], + ['encrypt',['encrypt',['../classCBCCommon.html#a41d2f655a7df13cfcd009b2882e13147',1,'CBCCommon::encrypt()'],['../classCFBCommon.html#a57af3692389bed300d3cfdf351351c51',1,'CFBCommon::encrypt()'],['../classChaCha.html#acd4fff140b8871c233d9a31abf753ed8',1,'ChaCha::encrypt()'],['../classCipher.html#ad2832bd61039d61560e34ea3382ca562',1,'Cipher::encrypt()'],['../classCTRCommon.html#a201bda584d111552ce8ec09fac759963',1,'CTRCommon::encrypt()'],['../classOFBCommon.html#a984d81a460e0799895b19dc48c3b5cf8',1,'OFBCommon::encrypt()']]], + ['encryptblock',['encryptBlock',['../classAESCommon.html#a2d95f6159abfcd92b5841f9018e44296',1,'AESCommon::encryptBlock()'],['../classBlockCipher.html#aed0788b25f6bb2f1bd47d5a5f0c5db33',1,'BlockCipher::encryptBlock()']]], + ['endwrite',['endWrite',['../classI2CMaster.html#ab29f63551ddeb032a91505d1c0b8ac41',1,'I2CMaster::endWrite()'],['../classSoftI2C.html#aa12ae82813598b2e9ea70463c23c5bf3',1,'SoftI2C::endWrite()']]], + ['enterfield',['enterField',['../classBoolField.html#ab3f1e610b52caed7e41016f6ae3d7d09',1,'BoolField::enterField()'],['../classField.html#aa032bbeacb405c56546cb56fbbee94f5',1,'Field::enterField()'],['../classIntField.html#a51d9127b660e8dd7f87718acd230202a',1,'IntField::enterField()'],['../classListField.html#a191b79b460e45cf48e04b04eface2888',1,'ListField::enterField()'],['../classTextField.html#aa78f1354f9240b64fabd6f996e312f32',1,'TextField::enterField()'],['../classTimeField.html#ae914d6b870283a334d2d669460f7646b',1,'TimeField::enterField()']]], + ['eval',['eval',['../classCurve25519.html#a2e4b7dd83a019b32c76584c99bfda21a',1,'Curve25519']]], + ['exitfield',['exitField',['../classField.html#ad6805c75ee1e62f8cd8bd550c4530c07',1,'Field::exitField()'],['../classTimeField.html#a5a6b7db2e3fda7745e0ff9c3d8d9a541',1,'TimeField::exitField()']]] +]; diff --git a/search/all_5.html b/search/all_5.html new file mode 100644 index 00000000..99ef7267 --- /dev/null +++ b/search/all_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_5.js b/search/all_5.js new file mode 100644 index 00000000..37f6f918 --- /dev/null +++ b/search/all_5.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['falselabel',['falseLabel',['../classBoolField.html#a59ad7a8a33290bda0d9fbb3df4f09b01',1,'BoolField']]], + ['field',['Field',['../classField.html',1,'Field'],['../classField.html#ac4ea0d104376233c3f0bfc080ec8564e',1,'Field::Field(const String &label)'],['../classField.html#a7e2bdb203ddfd9219696f263c1731fe7',1,'Field::Field(Form &form, const String &label)']]], + ['fill',['fill',['../classBitmap.html#a99da820f9280aace6b512801d5a5e2b2',1,'Bitmap::fill(int x, int y, int width, int height, Color color)'],['../classBitmap.html#ac661adab340858b541a2fe44e6303f56',1,'Bitmap::fill(int x, int y, int width, int height, Bitmap::ProgMem pattern, Color color=White)']]], + ['finalize',['finalize',['../classBLAKE2s.html#a751a3d772cbe1cd1dad83dbd09853b1b',1,'BLAKE2s::finalize()'],['../classHash.html#a09b3ccec22763fc86b1415695862977c',1,'Hash::finalize()'],['../classSHA1.html#a5a6a8a6169aa48e0bccadb22a149ab7c',1,'SHA1::finalize()'],['../classSHA256.html#a695157bcdf5495ba892ebac309f3abd6',1,'SHA256::finalize()']]], + ['firedalarm',['firedAlarm',['../classDS3232RTC.html#a79649f100a4562b9c1ba7c69e85cbca3',1,'DS3232RTC']]], + ['flags',['flags',['../structRTCAlarm.html#a0f2ef7363cb60a26642d5295b77ca19e',1,'RTCAlarm']]], + ['font',['Font',['../classBitmap.html#a456f7d6da03189c1e7148563a891b3cf',1,'Bitmap::Font()'],['../classBitmap.html#a7bf0a232b4bd12573cc570cc0edef47c',1,'Bitmap::font() const ']]], + ['form',['Form',['../classForm.html',1,'Form'],['../classForm.html#ad30836b22edde707a52d94090b716996',1,'Form::Form()'],['../classField.html#a27427319be1cc92db3128637d8884ee5',1,'Field::form()']]], + ['fromrgb',['fromRGB',['../classDMD.html#a557412f734fc4596e1102bf71e110ea0',1,'DMD']]], + ['form_20example_20for_20lcd_20displays',['Form example for LCD displays',['../lcd_form.html',1,'']]] +]; diff --git a/search/all_6.html b/search/all_6.html new file mode 100644 index 00000000..6133ab3a --- /dev/null +++ b/search/all_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_6.js b/search/all_6.js new file mode 100644 index 00000000..9269d5d2 --- /dev/null +++ b/search/all_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['getbutton',['getButton',['../classLCD.html#ac1e80e2603bd1cf0276c36092c416292',1,'LCD']]] +]; diff --git a/search/all_7.html b/search/all_7.html new file mode 100644 index 00000000..57481259 --- /dev/null +++ b/search/all_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_7.js b/search/all_7.js new file mode 100644 index 00000000..20f184ad --- /dev/null +++ b/search/all_7.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['hash',['Hash',['../classHash.html',1,'Hash'],['../classHash.html#af482880ad75b67a09d2dcb5e86244d80',1,'Hash::Hash()']]], + ['hashcore',['hashCore',['../classChaCha.html#a41ac3262e52ff49dcd916d0b3b2e2038',1,'ChaCha']]], + ['hashsize',['hashSize',['../classBLAKE2s.html#af9f50aac096f92ba27b1b2dd48df4c52',1,'BLAKE2s::hashSize()'],['../classHash.html#adcdd30de3e5ecaa2f798c0c5644d9ef8',1,'Hash::hashSize()'],['../classSHA1.html#ab8cdb7233a8b81be07877049960ddfdd',1,'SHA1::hashSize()'],['../classSHA256.html#a103d5bc5ced792464a82cb1d7986de94',1,'SHA256::hashSize()']]], + ['hasupdates',['hasUpdates',['../classDS1307RTC.html#a6fec8ff71f33cc1a129eb0bd009600b0',1,'DS1307RTC::hasUpdates()'],['../classDS3232RTC.html#a619ffee1bc013c9ddf4ae415115798bc',1,'DS3232RTC::hasUpdates()'],['../classRTC.html#a3690761f29654a2c9e676fcbfa32dd30',1,'RTC::hasUpdates()']]], + ['height',['height',['../classBitmap.html#adcd4e3dc7594421e647b0f52da9a41a3',1,'Bitmap']]], + ['hide',['hide',['../classForm.html#a88b9146a3f68e837c5e831203096f9e9',1,'Form']]], + ['holdtime',['holdTime',['../classCharlieplex.html#abb429659a7b1ee4c7306ea659050cb30',1,'Charlieplex']]], + ['hour',['hour',['../structRTCTime.html#a98ba717092ef856dd2b773ba02fcb1a4',1,'RTCTime::hour()'],['../structRTCAlarm.html#a75bdc42acd3ab3ad495680c6b6a34692',1,'RTCAlarm::hour()']]], + ['hello_20world_20for_20freetronics_20lcd',['Hello World for Freetronics LCD',['../lcd_hello_world.html',1,'']]] +]; diff --git a/search/all_8.html b/search/all_8.html new file mode 100644 index 00000000..0179bdd4 --- /dev/null +++ b/search/all_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_8.js b/search/all_8.js new file mode 100644 index 00000000..1e5e8834 --- /dev/null +++ b/search/all_8.js @@ -0,0 +1,19 @@ +var searchData= +[ + ['i2cmaster',['I2CMaster',['../classI2CMaster.html',1,'']]], + ['increment',['INCREMENT',['../classRTC.html#aacbe3ebbf893685950b05327c11d5c37',1,'RTC']]], + ['intfield',['IntField',['../classIntField.html',1,'IntField'],['../classIntField.html#a9df274c4100ed37d2d78738f09fc53b6',1,'IntField::IntField(const String &label)'],['../classIntField.html#a10c9c958bcde276698f1f1f9bff949dd',1,'IntField::IntField(Form &form, const String &label, int minValue, int maxValue, int stepValue, int value)'],['../classIntField.html#a2b99fa19be6a0ed01ddc4939352b372e',1,'IntField::IntField(Form &form, const String &label, int minValue, int maxValue, int stepValue, int value, const String &suffix)']]], + ['invert',['invert',['../classBitmap.html#a6d85556bcc9fac91d33f0f6f7a6430dd',1,'Bitmap']]], + ['ir_2ddumpir_2edox',['ir-dumpir.dox',['../ir-dumpir_8dox.html',1,'']]], + ['ir_2dsnake_2edox',['ir-snake.dox',['../ir-snake_8dox.html',1,'']]], + ['irreceiver',['IRreceiver',['../classIRreceiver.html',1,'IRreceiver'],['../classIRreceiver.html#a06eccb8b8311eac395e4b20c4e0163e3',1,'IRreceiver::IRreceiver()']]], + ['iscurrent',['isCurrent',['../classField.html#a25d86a67b321e8c642edf75a10a35f72',1,'Field::isCurrent()'],['../classForm.html#a48fb77f93e77b28b0397b59e1e9bf789',1,'Form::isCurrent()']]], + ['ispaused',['isPaused',['../classBlinkLED.html#aa0ee318b886b84fb71d5831fa456ecc8',1,'BlinkLED']]], + ['isplaying',['isPlaying',['../classMelody.html#ad38db3338ed87d72238c0ea9440c633c',1,'Melody']]], + ['isrealtime',['isRealTime',['../classDS1307RTC.html#aba01ca4c2f7863b610e5dfe9146886bd',1,'DS1307RTC::isRealTime()'],['../classDS3232RTC.html#acc5908a3743afb4c26bd75e22cad87a4',1,'DS3232RTC::isRealTime()']]], + ['isscreensaved',['isScreenSaved',['../classLCD.html#af5d5ca618a3161aa352027b58fe09d0e',1,'LCD']]], + ['isvalid',['isValid',['../classBitmap.html#a3846a240722e847d3cf11f701da1ce7b',1,'Bitmap']]], + ['isvisible',['isVisible',['../classForm.html#a3101f288e3e5aa8307c57f35861ad587',1,'Form']]], + ['items',['items',['../classListField.html#a4dbbdeebd386551eb8f245b42b45ccf0',1,'ListField']]], + ['ivsize',['ivSize',['../classCBCCommon.html#a016277533730284a38bb6ad8cd6f91ce',1,'CBCCommon::ivSize()'],['../classCFBCommon.html#a55db1be69de87aafe5601d31be918ebb',1,'CFBCommon::ivSize()'],['../classChaCha.html#afaa3df343a7d07976bd7e03a0c1bf43c',1,'ChaCha::ivSize()'],['../classCipher.html#ab8b53ddc4ce431f03c2a1903d70ace9c',1,'Cipher::ivSize()'],['../classCTRCommon.html#a98c1717d11d8da8e1fa108607358774a',1,'CTRCommon::ivSize()'],['../classOFBCommon.html#a67b4639aaece17a796fcba3a2ce8b43c',1,'OFBCommon::ivSize()']]] +]; diff --git a/search/all_9.html b/search/all_9.html new file mode 100644 index 00000000..cd46d440 --- /dev/null +++ b/search/all_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_9.js b/search/all_9.js new file mode 100644 index 00000000..73611e16 --- /dev/null +++ b/search/all_9.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['keysize',['keySize',['../classAES128.html#aa871832a156f0ea61b964e489670ae9d',1,'AES128::keySize()'],['../classAES192.html#ade28843e51e262b30eb55791c83fd791',1,'AES192::keySize()'],['../classAES256.html#af8ed6412bae6fc78274f60344899366a',1,'AES256::keySize()'],['../classBlockCipher.html#afde6004a859e015d877eab3c37042a0f',1,'BlockCipher::keySize()'],['../classCBCCommon.html#adb7daacfe2a4fca3d13b62b75372fe4e',1,'CBCCommon::keySize()'],['../classCFBCommon.html#a82899da983bc70bc8152ee67f424552e',1,'CFBCommon::keySize()'],['../classChaCha.html#af286083291fab2bd36dc7ad1f54d5cd7',1,'ChaCha::keySize()'],['../classCipher.html#a4cea432ea0278c865441f17cbb88b1ab',1,'Cipher::keySize()'],['../classCTRCommon.html#a29ce8e13a302350397fc6790a686bea2',1,'CTRCommon::keySize()'],['../classOFBCommon.html#a76ea9f9ea9dd137778338813e534a8ce',1,'OFBCommon::keySize()']]] +]; diff --git a/search/all_a.html b/search/all_a.html new file mode 100644 index 00000000..eab65530 --- /dev/null +++ b/search/all_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_a.js b/search/all_a.js new file mode 100644 index 00000000..1d61b596 --- /dev/null +++ b/search/all_a.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['label',['label',['../classField.html#aaa861ef917130c989a955bc75c683afe',1,'Field']]], + ['lcd',['LCD',['../classLCD.html',1,'LCD'],['../classField.html#a5cf21bf958a71e51feac9e1bf9f599d1',1,'Field::lcd()'],['../classLCD.html#a00bb2db1390721abc7b24ac4b8c276c8',1,'LCD::LCD()'],['../classLCD.html#a067bc741cf27f143aba5d9f147908401',1,'LCD::LCD(uint8_t pin9)']]], + ['lcd_2dform_2edox',['lcd-form.dox',['../lcd-form_8dox.html',1,'']]], + ['lcd_2dhelloworld_2edox',['lcd-helloworld.dox',['../lcd-helloworld_8dox.html',1,'']]], + ['led',['led',['../classCharlieplex.html#a90fd09f24b62424b0b7b8bcdb0140b9d',1,'Charlieplex']]], + ['listfield',['ListField',['../classListField.html',1,'ListField'],['../classListField.html#a118501da7edb0b0bc6b493734975b4e9',1,'ListField::ListField(const String &label)'],['../classListField.html#aa303898a1f74b52c1c4982653de488b7',1,'ListField::ListField(Form &form, const String &label, ListItems items, int value=0)']]], + ['loop',['loop',['../classBlinkLED.html#aeeaf42b94c5392935f00f0f12a58c75e',1,'BlinkLED::loop()'],['../classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a',1,'Charlieplex::loop()'],['../classChaseLEDs.html#a8745fa6b9f33b6c6274a563dd4dea786',1,'ChaseLEDs::loop()'],['../classDMD.html#a2c74a0845ef6080056b972d490648114',1,'DMD::loop()'],['../classRNGClass.html#a8cb91e39f0c4591de5bf98b1e2880b13',1,'RNGClass::loop()']]], + ['loopcount',['loopCount',['../classMelody.html#ab78253ae9abc8478b05f415f5d878a60',1,'Melody']]] +]; diff --git a/search/all_b.html b/search/all_b.html new file mode 100644 index 00000000..a2c161e0 --- /dev/null +++ b/search/all_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_b.js b/search/all_b.js new file mode 100644 index 00000000..8bf258d3 --- /dev/null +++ b/search/all_b.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['mainpage_2edox',['mainpage.dox',['../mainpage_8dox.html',1,'']]], + ['maxhours',['maxHours',['../classTimeField.html#aa73f5a62c330ac7d2f647dfe27d026b7',1,'TimeField']]], + ['maxtransfersize',['maxTransferSize',['../classI2CMaster.html#a3cd0cea8169ac4e6dd6f39fd6cfb1926',1,'I2CMaster::maxTransferSize()'],['../classSoftI2C.html#aad488669f28f6a5a4ceaae3de61d38f4',1,'SoftI2C::maxTransferSize()']]], + ['maxvalue',['maxValue',['../classIntField.html#aaa0adcb0d16e822e5f176be5cb9ca8ad',1,'IntField']]], + ['melody',['Melody',['../classMelody.html',1,'Melody'],['../classMelody.html#a9edc4165a49368dd5d78eedf982c38b9',1,'Melody::Melody()']]], + ['minute',['minute',['../structRTCTime.html#acf2161ca037080dc4b767e636ad8db84',1,'RTCTime::minute()'],['../structRTCAlarm.html#ad9a75ceb4b4b3474baa66dd5466e62fe',1,'RTCAlarm::minute()']]], + ['minvalue',['minValue',['../classIntField.html#af3dab3f2b46d29136d7a93ce46b0b8fb',1,'IntField']]], + ['month',['month',['../structRTCDate.html#a6e6196059b36186041a5312400ea9202',1,'RTCDate']]] +]; diff --git a/search/all_c.html b/search/all_c.html new file mode 100644 index 00000000..bdd3ee2c --- /dev/null +++ b/search/all_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_c.js b/search/all_c.js new file mode 100644 index 00000000..82456dfc --- /dev/null +++ b/search/all_c.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['nextfield',['nextField',['../classForm.html#a788a186ea4a7ebd75283a948ca45f4d1',1,'Form']]], + ['no_5ftemperature',['NO_TEMPERATURE',['../classRTC.html#a9ed5480b362a83f1f45c4d3bcf7c3bf8',1,'RTC']]], + ['nodisplay',['noDisplay',['../classLCD.html#af3974da6d988ba2d21c25135ada12108',1,'LCD']]], + ['nofill',['NoFill',['../classBitmap.html#aa89170263dc1f51f6366c1907119715e',1,'Bitmap']]], + ['noisesource',['NoiseSource',['../classNoiseSource.html',1,'NoiseSource'],['../classNoiseSource.html#a601479b7d8cc215f97f2f8a18d3ef4c2',1,'NoiseSource::NoiseSource()']]], + ['numrounds',['numRounds',['../classChaCha.html#a0a73d3623da377bc593876156768dd72',1,'ChaCha']]] +]; diff --git a/search/all_d.html b/search/all_d.html new file mode 100644 index 00000000..d5109336 --- /dev/null +++ b/search/all_d.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_d.js b/search/all_d.js new file mode 100644 index 00000000..ba80b033 --- /dev/null +++ b/search/all_d.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['ofb',['OFB',['../classOFB.html',1,'OFB< T >'],['../classOFB.html#a0b71b5cbcf01254799cd5eb37074a8cb',1,'OFB::OFB()']]], + ['ofbcommon',['OFBCommon',['../classOFBCommon.html',1,'OFBCommon'],['../classOFBCommon.html#a7f7e0cffcd7e2d7e06b7b1ae978a8f7d',1,'OFBCommon::OFBCommon()']]], + ['offtime',['offTime',['../classBlinkLED.html#a74c640edf1a9f6e8bea1e139462908bc',1,'BlinkLED']]], + ['ontime',['onTime',['../classBlinkLED.html#a8475f78f41d1a2d5d719bec8cbbb3ebb',1,'BlinkLED']]], + ['output',['output',['../classNoiseSource.html#a1af7449a5ae4a8acd34ac218c9eec6c1',1,'NoiseSource']]] +]; diff --git a/search/all_e.html b/search/all_e.html new file mode 100644 index 00000000..3cda0172 --- /dev/null +++ b/search/all_e.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_e.js b/search/all_e.js new file mode 100644 index 00000000..53d79781 --- /dev/null +++ b/search/all_e.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['pagesize',['pageSize',['../classEEPROM24.html#af33b23e2614f3966bbaf2554890c032a',1,'EEPROM24']]], + ['pause',['pause',['../classBlinkLED.html#a2760a0223cd6a0598b961f681ffb5c0a',1,'BlinkLED']]], + ['pixel',['pixel',['../classBitmap.html#a35aa38b377d509d6c4f061a0b988d203',1,'Bitmap']]], + ['play',['play',['../classMelody.html#a9fd8e0d48833d8da3cd3b3b58408b0b5',1,'Melody']]], + ['playonce',['playOnce',['../classMelody.html#aecc9185c9cb1246e8a55521b17d72932',1,'Melody']]], + ['power_20saving_20utility_20functions',['Power saving utility functions',['../group__power__save.html',1,'']]], + ['prevfield',['prevField',['../classForm.html#acb080fe4f4631e9060e6efab8eaa0a90',1,'Form']]], + ['previouspin',['previousPin',['../classChaseLEDs.html#a27c460fcb341c2dc2fcf9341616eb525',1,'ChaseLEDs']]], + ['progmem',['ProgMem',['../classBitmap.html#a2fcc98fd7580932b218134126a29ce43',1,'Bitmap']]], + ['pwmled',['pwmLed',['../classCharlieplex.html#a89312f2fd1d27c4e56346ed9cccfb9f6',1,'Charlieplex']]] +]; diff --git a/search/all_f.html b/search/all_f.html new file mode 100644 index 00000000..7419b029 --- /dev/null +++ b/search/all_f.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_f.js b/search/all_f.js new file mode 100644 index 00000000..a1a470b1 --- /dev/null +++ b/search/all_f.js @@ -0,0 +1,22 @@ +var searchData= +[ + ['running_20figure_20example',['Running figure example',['../dmd_running_figure.html',1,'']]], + ['rand',['rand',['../classRNGClass.html#a418a833cf18198fd7e5d6dbd78c99c29',1,'RNGClass']]], + ['read',['read',['../classEEPROM24.html#a960971377d4decb122ff38d12603e586',1,'EEPROM24::read(unsigned long address)'],['../classEEPROM24.html#a63e23dc014415f947975359ac09f627e',1,'EEPROM24::read(unsigned long address, void *data, size_t length)'],['../classI2CMaster.html#a49eeebb57f6bc06de39973fe836369cd',1,'I2CMaster::read()'],['../classSoftI2C.html#a330dbba5b726fa161a6b01a9ca49e1bc',1,'SoftI2C::read()']]], + ['readalarm',['readAlarm',['../classDS1307RTC.html#aab608eb1630520ee122306b721fdc47a',1,'DS1307RTC::readAlarm()'],['../classDS3232RTC.html#a09c7073c687dcbbc423baf48074c7873',1,'DS3232RTC::readAlarm()'],['../classRTC.html#ade282d7a60147c3f0269f1fcd59c8d66',1,'RTC::readAlarm()']]], + ['readbyte',['readByte',['../classDS1307RTC.html#a7364609a201022688778ab116c3e4f4a',1,'DS1307RTC::readByte()'],['../classDS3232RTC.html#a5ba83a3ef7d65d45c2f3241afdd8fef7',1,'DS3232RTC::readByte()'],['../classRTC.html#a0f47b10b436e3f9d36e04ec907579431',1,'RTC::readByte()']]], + ['readdate',['readDate',['../classDS1307RTC.html#a6fb56d1690bc30e7995961a5b5e5fdc4',1,'DS1307RTC::readDate()'],['../classDS3232RTC.html#ab03358e3b5996e38d766e2f9f6ab62ca',1,'DS3232RTC::readDate()'],['../classRTC.html#aa1e21bf42ebd4456919744ae0f4f631e',1,'RTC::readDate()']]], + ['readonly',['readOnly',['../classTimeField.html#aa0795c873ba9941c8a1a3bf8c06668f1',1,'TimeField']]], + ['readtemperature',['readTemperature',['../classDS3232RTC.html#a0faf40c25ab019a326a60f301c2bb41b',1,'DS3232RTC::readTemperature()'],['../classRTC.html#aeca3c8387332e8cabfd09c1806276e5a',1,'RTC::readTemperature()']]], + ['readtime',['readTime',['../classDS1307RTC.html#acd9800d6df2244b8e4e790480a1d62a6',1,'DS1307RTC::readTime()'],['../classDS3232RTC.html#af89e68c68f1c4b7e94286f800b5b2747',1,'DS3232RTC::readTime()'],['../classRTC.html#aaf0a5c1f32f210a49718d148620b5bec',1,'RTC::readTime()']]], + ['refresh',['refresh',['../classCharlieplex.html#a3c961bfff866e400dad371f0376f096b',1,'Charlieplex::refresh()'],['../classDMD.html#a9e4bf2a9d247312d35c1401ff61261c8',1,'DMD::refresh()']]], + ['removefield',['removeField',['../classForm.html#a7abd717029f9b19ee7318470072cd697',1,'Form']]], + ['reset',['reset',['../classBLAKE2s.html#a778776d15316c182fdb2df5a89b3ca02',1,'BLAKE2s::reset()'],['../classBLAKE2s.html#a91ba6bc39e42002ac61114ced1d0af6d',1,'BLAKE2s::reset(uint8_t outputLength)'],['../classHash.html#a7b94309acaa5f52386785fb780e5be61',1,'Hash::reset()'],['../classSHA1.html#ab71aaf39ed956320054861a2fbfa454f',1,'SHA1::reset()'],['../classSHA256.html#ad9d80d8fdccffb15497bd36285afce65',1,'SHA256::reset()']]], + ['resume',['resume',['../classBlinkLED.html#a380241e4dfd20e8a558487227f2f4252',1,'BlinkLED']]], + ['rngclass',['RNGClass',['../classRNGClass.html',1,'RNGClass'],['../classRNGClass.html#acbcf327242f51ae2d9209aeaa45e30e9',1,'RNGClass::RNGClass()']]], + ['rtc',['RTC',['../classRTC.html',1,'RTC'],['../classRTC.html#ada31c5120d18d2dd2863b3d440308da2',1,'RTC::RTC()']]], + ['rtcalarm',['RTCAlarm',['../structRTCAlarm.html',1,'']]], + ['rtcdate',['RTCDate',['../structRTCDate.html',1,'']]], + ['rtctime',['RTCTime',['../structRTCTime.html',1,'']]], + ['run',['run',['../classMelody.html#ad1103b970be1f59058cc7d927be68955',1,'Melody']]] +]; diff --git a/search/classes_0.html b/search/classes_0.html new file mode 100644 index 00000000..fabdc036 --- /dev/null +++ b/search/classes_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_0.js b/search/classes_0.js new file mode 100644 index 00000000..7a28eaaf --- /dev/null +++ b/search/classes_0.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['aes128',['AES128',['../classAES128.html',1,'']]], + ['aes192',['AES192',['../classAES192.html',1,'']]], + ['aes256',['AES256',['../classAES256.html',1,'']]], + ['aescommon',['AESCommon',['../classAESCommon.html',1,'']]] +]; diff --git a/search/classes_1.html b/search/classes_1.html new file mode 100644 index 00000000..800b6ae1 --- /dev/null +++ b/search/classes_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_1.js b/search/classes_1.js new file mode 100644 index 00000000..24fb87df --- /dev/null +++ b/search/classes_1.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['bitmap',['Bitmap',['../classBitmap.html',1,'']]], + ['blake2s',['BLAKE2s',['../classBLAKE2s.html',1,'']]], + ['blinkled',['BlinkLED',['../classBlinkLED.html',1,'']]], + ['blockcipher',['BlockCipher',['../classBlockCipher.html',1,'']]], + ['boolfield',['BoolField',['../classBoolField.html',1,'']]] +]; diff --git a/search/classes_2.html b/search/classes_2.html new file mode 100644 index 00000000..f65d263c --- /dev/null +++ b/search/classes_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_2.js b/search/classes_2.js new file mode 100644 index 00000000..44cdfad4 --- /dev/null +++ b/search/classes_2.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['cbc',['CBC',['../classCBC.html',1,'']]], + ['cbccommon',['CBCCommon',['../classCBCCommon.html',1,'']]], + ['cfb',['CFB',['../classCFB.html',1,'']]], + ['cfbcommon',['CFBCommon',['../classCFBCommon.html',1,'']]], + ['chacha',['ChaCha',['../classChaCha.html',1,'']]], + ['charlieplex',['Charlieplex',['../classCharlieplex.html',1,'']]], + ['chaseleds',['ChaseLEDs',['../classChaseLEDs.html',1,'']]], + ['cipher',['Cipher',['../classCipher.html',1,'']]], + ['ctr',['CTR',['../classCTR.html',1,'']]], + ['ctrcommon',['CTRCommon',['../classCTRCommon.html',1,'']]], + ['curve25519',['Curve25519',['../classCurve25519.html',1,'']]] +]; diff --git a/search/classes_3.html b/search/classes_3.html new file mode 100644 index 00000000..927e837f --- /dev/null +++ b/search/classes_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_3.js b/search/classes_3.js new file mode 100644 index 00000000..58dd740f --- /dev/null +++ b/search/classes_3.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['dmd',['DMD',['../classDMD.html',1,'']]], + ['ds1307rtc',['DS1307RTC',['../classDS1307RTC.html',1,'']]], + ['ds3232rtc',['DS3232RTC',['../classDS3232RTC.html',1,'']]] +]; diff --git a/search/classes_4.html b/search/classes_4.html new file mode 100644 index 00000000..a447290e --- /dev/null +++ b/search/classes_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_4.js b/search/classes_4.js new file mode 100644 index 00000000..10123575 --- /dev/null +++ b/search/classes_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['eeprom24',['EEPROM24',['../classEEPROM24.html',1,'']]] +]; diff --git a/search/classes_5.html b/search/classes_5.html new file mode 100644 index 00000000..63484c45 --- /dev/null +++ b/search/classes_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_5.js b/search/classes_5.js new file mode 100644 index 00000000..048263d1 --- /dev/null +++ b/search/classes_5.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['field',['Field',['../classField.html',1,'']]], + ['form',['Form',['../classForm.html',1,'']]] +]; diff --git a/search/classes_6.html b/search/classes_6.html new file mode 100644 index 00000000..f3d70354 --- /dev/null +++ b/search/classes_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_6.js b/search/classes_6.js new file mode 100644 index 00000000..779a6d47 --- /dev/null +++ b/search/classes_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['hash',['Hash',['../classHash.html',1,'']]] +]; diff --git a/search/classes_7.html b/search/classes_7.html new file mode 100644 index 00000000..9e5f5c98 --- /dev/null +++ b/search/classes_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_7.js b/search/classes_7.js new file mode 100644 index 00000000..1639feb3 --- /dev/null +++ b/search/classes_7.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['i2cmaster',['I2CMaster',['../classI2CMaster.html',1,'']]], + ['intfield',['IntField',['../classIntField.html',1,'']]], + ['irreceiver',['IRreceiver',['../classIRreceiver.html',1,'']]] +]; diff --git a/search/classes_8.html b/search/classes_8.html new file mode 100644 index 00000000..82c35b32 --- /dev/null +++ b/search/classes_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_8.js b/search/classes_8.js new file mode 100644 index 00000000..cfd886c9 --- /dev/null +++ b/search/classes_8.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['lcd',['LCD',['../classLCD.html',1,'']]], + ['listfield',['ListField',['../classListField.html',1,'']]] +]; diff --git a/search/classes_9.html b/search/classes_9.html new file mode 100644 index 00000000..4e83ac82 --- /dev/null +++ b/search/classes_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_9.js b/search/classes_9.js new file mode 100644 index 00000000..a6451ed5 --- /dev/null +++ b/search/classes_9.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['melody',['Melody',['../classMelody.html',1,'']]] +]; diff --git a/search/classes_a.html b/search/classes_a.html new file mode 100644 index 00000000..616feb69 --- /dev/null +++ b/search/classes_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_a.js b/search/classes_a.js new file mode 100644 index 00000000..d53a9846 --- /dev/null +++ b/search/classes_a.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['noisesource',['NoiseSource',['../classNoiseSource.html',1,'']]] +]; diff --git a/search/classes_b.html b/search/classes_b.html new file mode 100644 index 00000000..44611522 --- /dev/null +++ b/search/classes_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_b.js b/search/classes_b.js new file mode 100644 index 00000000..8f9a8c0f --- /dev/null +++ b/search/classes_b.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['ofb',['OFB',['../classOFB.html',1,'']]], + ['ofbcommon',['OFBCommon',['../classOFBCommon.html',1,'']]] +]; diff --git a/search/classes_c.html b/search/classes_c.html new file mode 100644 index 00000000..8f92c863 --- /dev/null +++ b/search/classes_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_c.js b/search/classes_c.js new file mode 100644 index 00000000..1c19d004 --- /dev/null +++ b/search/classes_c.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['rngclass',['RNGClass',['../classRNGClass.html',1,'']]], + ['rtc',['RTC',['../classRTC.html',1,'']]], + ['rtcalarm',['RTCAlarm',['../structRTCAlarm.html',1,'']]], + ['rtcdate',['RTCDate',['../structRTCDate.html',1,'']]], + ['rtctime',['RTCTime',['../structRTCTime.html',1,'']]] +]; diff --git a/search/classes_d.html b/search/classes_d.html new file mode 100644 index 00000000..9690cf0b --- /dev/null +++ b/search/classes_d.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_d.js b/search/classes_d.js new file mode 100644 index 00000000..f4a6ece1 --- /dev/null +++ b/search/classes_d.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['sha1',['SHA1',['../classSHA1.html',1,'']]], + ['sha256',['SHA256',['../classSHA256.html',1,'']]], + ['softi2c',['SoftI2C',['../classSoftI2C.html',1,'']]] +]; diff --git a/search/classes_e.html b/search/classes_e.html new file mode 100644 index 00000000..24a3ef3a --- /dev/null +++ b/search/classes_e.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_e.js b/search/classes_e.js new file mode 100644 index 00000000..57d4c0cb --- /dev/null +++ b/search/classes_e.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['textfield',['TextField',['../classTextField.html',1,'']]], + ['timefield',['TimeField',['../classTimeField.html',1,'']]], + ['transistornoisesource',['TransistorNoiseSource',['../classTransistorNoiseSource.html',1,'']]] +]; diff --git a/search/enums_0.html b/search/enums_0.html new file mode 100644 index 00000000..b4cbe1e3 --- /dev/null +++ b/search/enums_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/enums_0.js b/search/enums_0.js new file mode 100644 index 00000000..d73fdcec --- /dev/null +++ b/search/enums_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['dayofweek',['DayOfWeek',['../classRTC.html#ab2ca0cbee608ec32d3d6e04d40298f11',1,'RTC']]] +]; diff --git a/search/enums_1.html b/search/enums_1.html new file mode 100644 index 00000000..2af2a03e --- /dev/null +++ b/search/enums_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/enums_1.js b/search/enums_1.js new file mode 100644 index 00000000..cd712f20 --- /dev/null +++ b/search/enums_1.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['screensavermode',['ScreenSaverMode',['../classLCD.html#a264bf94308c95d8598426e13dc8cdb28',1,'LCD']]], + ['sleepduration',['SleepDuration',['../group__power__save.html#gabdc6266a040b28c4d79028ddb0ceae36',1,'PowerSave.h']]] +]; diff --git a/search/enumvalues_0.html b/search/enumvalues_0.html new file mode 100644 index 00000000..3e00fcf6 --- /dev/null +++ b/search/enumvalues_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/enumvalues_0.js b/search/enumvalues_0.js new file mode 100644 index 00000000..6512fd4b --- /dev/null +++ b/search/enumvalues_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['backlightoff',['BacklightOff',['../classLCD.html#a264bf94308c95d8598426e13dc8cdb28a9931c078cfd1023c69f1da431f9a656c',1,'LCD']]], + ['backlightonselect',['BacklightOnSelect',['../classLCD.html#a264bf94308c95d8598426e13dc8cdb28a781f3c5e42506bf4f86ba06d69b23d35',1,'LCD']]] +]; diff --git a/search/enumvalues_1.html b/search/enumvalues_1.html new file mode 100644 index 00000000..0e575c96 --- /dev/null +++ b/search/enumvalues_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/enumvalues_1.js b/search/enumvalues_1.js new file mode 100644 index 00000000..ed2e276d --- /dev/null +++ b/search/enumvalues_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['displayoff',['DisplayOff',['../classLCD.html#a264bf94308c95d8598426e13dc8cdb28a3f1e62d5fcd314d6ff067d3e74c4bf5f',1,'LCD']]] +]; diff --git a/search/enumvalues_2.html b/search/enumvalues_2.html new file mode 100644 index 00000000..e59f4acb --- /dev/null +++ b/search/enumvalues_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/enumvalues_2.js b/search/enumvalues_2.js new file mode 100644 index 00000000..8a0737e6 --- /dev/null +++ b/search/enumvalues_2.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['sleep_5f120_5fms',['SLEEP_120_MS',['../group__power__save.html#ggabdc6266a040b28c4d79028ddb0ceae36a96fa577b54aa6f2341ea5ddd839aa8bc',1,'PowerSave.h']]], + ['sleep_5f15_5fms',['SLEEP_15_MS',['../group__power__save.html#ggabdc6266a040b28c4d79028ddb0ceae36a3d16487a7386c6348f1c1d886564e3c4',1,'PowerSave.h']]], + ['sleep_5f1_5fsec',['SLEEP_1_SEC',['../group__power__save.html#ggabdc6266a040b28c4d79028ddb0ceae36a92310daf29e5899770b80c1c4e850b9b',1,'PowerSave.h']]], + ['sleep_5f250_5fms',['SLEEP_250_MS',['../group__power__save.html#ggabdc6266a040b28c4d79028ddb0ceae36abcbf68cfdb688220da61ac98b1a2ec69',1,'PowerSave.h']]], + ['sleep_5f2_5fsec',['SLEEP_2_SEC',['../group__power__save.html#ggabdc6266a040b28c4d79028ddb0ceae36a04571aa0b801c28cd756513303b229cd',1,'PowerSave.h']]], + ['sleep_5f30_5fms',['SLEEP_30_MS',['../group__power__save.html#ggabdc6266a040b28c4d79028ddb0ceae36af31050c5ef733b3e231920143b041825',1,'PowerSave.h']]], + ['sleep_5f4_5fsec',['SLEEP_4_SEC',['../group__power__save.html#ggabdc6266a040b28c4d79028ddb0ceae36a4cba1036d7a69225110b68b372f10410',1,'PowerSave.h']]], + ['sleep_5f500_5fms',['SLEEP_500_MS',['../group__power__save.html#ggabdc6266a040b28c4d79028ddb0ceae36aa49e4d5f92a5f48070dde0babf75a9b0',1,'PowerSave.h']]], + ['sleep_5f60_5fms',['SLEEP_60_MS',['../group__power__save.html#ggabdc6266a040b28c4d79028ddb0ceae36a716f5a9f35e77a2d334ad71f05bd5fdc',1,'PowerSave.h']]], + ['sleep_5f8_5fsec',['SLEEP_8_SEC',['../group__power__save.html#ggabdc6266a040b28c4d79028ddb0ceae36a8c47dd1ef81c2f41da7525b5ee4bfc3a',1,'PowerSave.h']]] +]; diff --git a/search/files_0.html b/search/files_0.html new file mode 100644 index 00000000..c7aa36c9 --- /dev/null +++ b/search/files_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/files_0.js b/search/files_0.js new file mode 100644 index 00000000..6d45db61 --- /dev/null +++ b/search/files_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['alarm_2dclock_2edox',['alarm-clock.dox',['../alarm-clock_8dox.html',1,'']]] +]; diff --git a/search/files_1.html b/search/files_1.html new file mode 100644 index 00000000..eca1c805 --- /dev/null +++ b/search/files_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/files_1.js b/search/files_1.js new file mode 100644 index 00000000..d3fac326 --- /dev/null +++ b/search/files_1.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['blink_2dblink_2edox',['blink-blink.dox',['../blink-blink_8dox.html',1,'']]], + ['blink_2dcharlieplex_2edox',['blink-charlieplex.dox',['../blink-charlieplex_8dox.html',1,'']]], + ['blink_2dcylon_2edox',['blink-cylon.dox',['../blink-cylon_8dox.html',1,'']]], + ['blink_2dstartrek_2edox',['blink-startrek.dox',['../blink-startrek_8dox.html',1,'']]] +]; diff --git a/search/files_2.html b/search/files_2.html new file mode 100644 index 00000000..04a8a463 --- /dev/null +++ b/search/files_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/files_2.js b/search/files_2.js new file mode 100644 index 00000000..473da681 --- /dev/null +++ b/search/files_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['crypto_2edox',['crypto.dox',['../crypto_8dox.html',1,'']]] +]; diff --git a/search/files_3.html b/search/files_3.html new file mode 100644 index 00000000..0dc9a561 --- /dev/null +++ b/search/files_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/files_3.js b/search/files_3.js new file mode 100644 index 00000000..ea29379f --- /dev/null +++ b/search/files_3.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['dmd_2ddemo_2edox',['dmd-demo.dox',['../dmd-demo_8dox.html',1,'']]], + ['dmd_2drunning_2dfigure_2edox',['dmd-running-figure.dox',['../dmd-running-figure_8dox.html',1,'']]] +]; diff --git a/search/files_4.html b/search/files_4.html new file mode 100644 index 00000000..891b5da3 --- /dev/null +++ b/search/files_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/files_4.js b/search/files_4.js new file mode 100644 index 00000000..6dc9646a --- /dev/null +++ b/search/files_4.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['ir_2ddumpir_2edox',['ir-dumpir.dox',['../ir-dumpir_8dox.html',1,'']]], + ['ir_2dsnake_2edox',['ir-snake.dox',['../ir-snake_8dox.html',1,'']]] +]; diff --git a/search/files_5.html b/search/files_5.html new file mode 100644 index 00000000..1741195c --- /dev/null +++ b/search/files_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/files_5.js b/search/files_5.js new file mode 100644 index 00000000..23e81c68 --- /dev/null +++ b/search/files_5.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['lcd_2dform_2edox',['lcd-form.dox',['../lcd-form_8dox.html',1,'']]], + ['lcd_2dhelloworld_2edox',['lcd-helloworld.dox',['../lcd-helloworld_8dox.html',1,'']]] +]; diff --git a/search/files_6.html b/search/files_6.html new file mode 100644 index 00000000..262d3da2 --- /dev/null +++ b/search/files_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/files_6.js b/search/files_6.js new file mode 100644 index 00000000..a490ea9e --- /dev/null +++ b/search/files_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['mainpage_2edox',['mainpage.dox',['../mainpage_8dox.html',1,'']]] +]; diff --git a/search/functions_0.html b/search/functions_0.html new file mode 100644 index 00000000..16a5a527 --- /dev/null +++ b/search/functions_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_0.js b/search/functions_0.js new file mode 100644 index 00000000..86c3fcfa --- /dev/null +++ b/search/functions_0.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['addfield',['addField',['../classForm.html#a5cb056ace428e75e321610555bfecac7',1,'Form']]], + ['adjustdays',['adjustDays',['../classRTC.html#adc29d7c43efc5a192d21965da5c3ee1d',1,'RTC']]], + ['adjustmonths',['adjustMonths',['../classRTC.html#aeca597e6e37a05716e664242f9cfc5f4',1,'RTC']]], + ['adjustyears',['adjustYears',['../classRTC.html#a31d10cb2f7cac8839bd4be2d858b802d',1,'RTC']]], + ['advance',['advance',['../classChaseLEDs.html#aa0f4e0bd07dd65ee5574e894a612486b',1,'ChaseLEDs']]], + ['advancetime',['advanceTime',['../classChaseLEDs.html#aed060c51bb63dd8065be89f895989700',1,'ChaseLEDs']]], + ['aes128',['AES128',['../classAES128.html#af826ce33301767919bb60f27ad3ff693',1,'AES128']]], + ['aes192',['AES192',['../classAES192.html#a6f8e457cfffdc12f7dd829e3ac4585ce',1,'AES192']]], + ['aes256',['AES256',['../classAES256.html#a3b2cbe56f03a87ec4260be4f8914fb02',1,'AES256']]], + ['aescommon',['AESCommon',['../classAESCommon.html#acf224a392659429bac80dc68c7471b21',1,'AESCommon']]], + ['available',['available',['../classEEPROM24.html#af8b70971d882b06de3fc6644a8ece3cf',1,'EEPROM24::available()'],['../classI2CMaster.html#a6458fa99cfd9e6270ae6dff993955833',1,'I2CMaster::available()'],['../classSoftI2C.html#a849af91018caedbb82e83f02c543305e',1,'SoftI2C::available()'],['../classRNGClass.html#a49e3231ba65a5e4b045bc90976e0a659',1,'RNGClass::available()']]] +]; diff --git a/search/functions_1.html b/search/functions_1.html new file mode 100644 index 00000000..3b4eacfe --- /dev/null +++ b/search/functions_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_1.js b/search/functions_1.js new file mode 100644 index 00000000..930c6700 --- /dev/null +++ b/search/functions_1.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['backlightpin',['backlightPin',['../classLCD.html#a171f59ba80e7775ebd3a399f56482a9c',1,'LCD']]], + ['begin',['begin',['../classRNGClass.html#a7f1aab3c324f8e8a424d683425e0fcf8',1,'RNGClass']]], + ['bitmap',['Bitmap',['../classBitmap.html#a40526748415c8bbc58a8510d636c20f4',1,'Bitmap']]], + ['bitsperpixel',['bitsPerPixel',['../classBitmap.html#ad18d3d5a1e77d541a95e93ad1f958411',1,'Bitmap']]], + ['blake2s',['BLAKE2s',['../classBLAKE2s.html#a7345f4e08c19d7a8c278282b46df21a2',1,'BLAKE2s']]], + ['blinkled',['BlinkLED',['../classBlinkLED.html#afc33958651e7ce6dceb428ea654c2c2f',1,'BlinkLED']]], + ['blockcipher',['BlockCipher',['../classBlockCipher.html#adc3d7cba116cbea9ad017f4cded6fe2f',1,'BlockCipher']]], + ['blocksize',['blockSize',['../classAESCommon.html#ae26afdcc6d18e8888974acae16df1413',1,'AESCommon::blockSize()'],['../classBLAKE2s.html#a9b5403734c20a0591d72a98912e4a305',1,'BLAKE2s::blockSize()'],['../classBlockCipher.html#a7059a310487c128db034b0ce0ad425a0',1,'BlockCipher::blockSize()'],['../classHash.html#a4e4297812e3483410556830fe5d47bdf',1,'Hash::blockSize()'],['../classSHA1.html#a816e3fd1a02cf1ecc67866cd8c7c309a',1,'SHA1::blockSize()'],['../classSHA256.html#a71bbd9064f9d6191d0647f867953a858',1,'SHA256::blockSize()']]], + ['boolfield',['BoolField',['../classBoolField.html#a5d4382cdcdc989de0179d8f3f3a59998',1,'BoolField::BoolField(const String &label)'],['../classBoolField.html#a49aad212ed18f84baa105c24e86281d9',1,'BoolField::BoolField(Form &form, const String &label, const String &trueLabel, const String &falseLabel, bool value)']]], + ['bytecount',['byteCount',['../classDS1307RTC.html#a93c25269a9b78ab3331354db26672248',1,'DS1307RTC::byteCount()'],['../classDS3232RTC.html#a1319fe936dcb7e9d6bdf200b77a94f8e',1,'DS3232RTC::byteCount()'],['../classRTC.html#acfdebfb449710e44e11f9a3675e14fd8',1,'RTC::byteCount()']]] +]; diff --git a/search/functions_10.html b/search/functions_10.html new file mode 100644 index 00000000..52cb0d3c --- /dev/null +++ b/search/functions_10.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_10.js b/search/functions_10.js new file mode 100644 index 00000000..a3af584f --- /dev/null +++ b/search/functions_10.js @@ -0,0 +1,59 @@ +var searchData= +[ + ['save',['save',['../classRNGClass.html#a139584fb249148e2058d1d645d090db7',1,'RNGClass']]], + ['screensavermode',['screenSaverMode',['../classLCD.html#a1917fa285f81f476b4c7cc20d15456b8',1,'LCD']]], + ['scroll',['scroll',['../classBitmap.html#ae08eb6f9086f9923d8dc83a469ae4c4a',1,'Bitmap::scroll(int dx, int dy, Color fillColor=Black)'],['../classBitmap.html#af79ad4432297ff453fddc55625fec485',1,'Bitmap::scroll(int x, int y, int width, int height, int dx, int dy, Color fillColor=Black)']]], + ['setadvancetime',['setAdvanceTime',['../classChaseLEDs.html#af560270f72302c19fb7f95002089c9d7',1,'ChaseLEDs']]], + ['setautosavetime',['setAutoSaveTime',['../classRNGClass.html#a5848e87a5f2f0302c88b0377f0e3366d',1,'RNGClass']]], + ['setbacklightpin',['setBacklightPin',['../classLCD.html#a0b9b3b954290e7a3d94cdc829582b0a8',1,'LCD']]], + ['setblinkrate',['setBlinkRate',['../classBlinkLED.html#a47f95624881063aa91c0066ed2c92258',1,'BlinkLED']]], + ['setblockcipher',['setBlockCipher',['../classCBCCommon.html#a0b7631244b0c2c954cfdb50eb32f7db1',1,'CBCCommon::setBlockCipher()'],['../classCFBCommon.html#a9161530f456efacb64f5008fdb1a460c',1,'CFBCommon::setBlockCipher()'],['../classCTRCommon.html#a6c409c4ec1f99e0cb751196d891dc228',1,'CTRCommon::setBlockCipher()'],['../classOFBCommon.html#a0053e2566a88859effffacbf1e4ade04',1,'OFBCommon::setBlockCipher()']]], + ['setcounter',['setCounter',['../classChaCha.html#acab9109b7189ea88d9e5417a3a209eac',1,'ChaCha']]], + ['setcountersize',['setCounterSize',['../classCTRCommon.html#ae2bc6b33a864412598b426320d853337',1,'CTRCommon']]], + ['setcurrentfield',['setCurrentField',['../classForm.html#ae6004fedfa07191ffd47d7b12370b4e5',1,'Form']]], + ['setdoublebuffer',['setDoubleBuffer',['../classDMD.html#a6fbdcf8832f91d02500cb7a9b84d2723',1,'DMD']]], + ['setfalselabel',['setFalseLabel',['../classBoolField.html#ae6a29d27139fd78f2ca96152059fb30a',1,'BoolField']]], + ['setfont',['setFont',['../classBitmap.html#a64d7a9651d5c385a044cc910a3b82837',1,'Bitmap']]], + ['setholdtime',['setHoldTime',['../classCharlieplex.html#a8502f4c752faba37023ced587695f6a4',1,'Charlieplex']]], + ['setitems',['setItems',['../classListField.html#ae6709bce9355451b651893691456704e',1,'ListField']]], + ['setiv',['setIV',['../classCBCCommon.html#ac7a586217835055b3a354bb932db160c',1,'CBCCommon::setIV()'],['../classCFBCommon.html#a597040eb7df40adbbef94b4c3975cd80',1,'CFBCommon::setIV()'],['../classChaCha.html#a734f3246b1e6810c63637b8cda26b259',1,'ChaCha::setIV()'],['../classCipher.html#a3777acd8ff776a4e945bb7c9f2d044d9',1,'Cipher::setIV()'],['../classCTRCommon.html#aad289af3eb013cb3ffda6d7e8e8b3d04',1,'CTRCommon::setIV()'],['../classOFBCommon.html#a4a35364cf30d78f1968cc00803686caf',1,'OFBCommon::setIV()']]], + ['setkey',['setKey',['../classAES128.html#a42d7548eb5084a2c3e2d5aa5f6f98ba4',1,'AES128::setKey()'],['../classAES192.html#a4ab37cff19fb05ceef1533ebc5e37cde',1,'AES192::setKey()'],['../classAES256.html#a6af085d2d6a730ff1e025f982121bbda',1,'AES256::setKey()'],['../classBlockCipher.html#a9a05307664469777592799c8f77397c4',1,'BlockCipher::setKey()'],['../classCBCCommon.html#add75ea4342a190e560cee26a8e9efc37',1,'CBCCommon::setKey()'],['../classCFBCommon.html#a45b9be25fb96f0e3ca5211b064e2baea',1,'CFBCommon::setKey()'],['../classChaCha.html#a6b2bdffbd3705e388bb458edb2f40c90',1,'ChaCha::setKey()'],['../classCipher.html#a0dfe133bda81dfa680b668f5908ccbe5',1,'Cipher::setKey()'],['../classCTRCommon.html#a79da937dc2c444a174176beab33c055a',1,'CTRCommon::setKey()'],['../classOFBCommon.html#ac3a98e81d95ebc6c883baef5f4cfbefb',1,'OFBCommon::setKey()']]], + ['setlabel',['setLabel',['../classField.html#ad4ea63599d780c35b296cf2840b69f7b',1,'Field']]], + ['setled',['setLed',['../classCharlieplex.html#ab103c9687a0890faf72e4da79e3de0a5',1,'Charlieplex']]], + ['setloopcount',['setLoopCount',['../classMelody.html#a507097a2e8ff51a5e9157e3a320ae35b',1,'Melody']]], + ['setloopduration',['setLoopDuration',['../classMelody.html#ae88ad06c2acb728f56dd213d5dad6006',1,'Melody']]], + ['setmaxhours',['setMaxHours',['../classTimeField.html#a7ac124eb9dde01c18c711c421736b5ed',1,'TimeField']]], + ['setmaxvalue',['setMaxValue',['../classIntField.html#a36cbd7c24480cc3fcf0c7634d5e22bf1',1,'IntField']]], + ['setmelody',['setMelody',['../classMelody.html#adb6ad8e8cfe8c9a137e470f4e85c7254',1,'Melody']]], + ['setminvalue',['setMinValue',['../classIntField.html#afffe7be6721a043cec7a5a85c19e0ada',1,'IntField']]], + ['setnumrounds',['setNumRounds',['../classChaCha.html#a1a0911e0be8f4590d7fb76884d98c541',1,'ChaCha']]], + ['setpixel',['setPixel',['../classBitmap.html#aac994b75418e7d37ec66829437329114',1,'Bitmap']]], + ['setpwmled',['setPwmLed',['../classCharlieplex.html#a605a302e13005a1aa3d68d0e22bc474b',1,'Charlieplex']]], + ['setreadonly',['setReadOnly',['../classTimeField.html#a3f002a0729e90e88d04025908be102fe',1,'TimeField']]], + ['setscreensavermode',['setScreenSaverMode',['../classLCD.html#a56d1f68532c779c65fbbd071fb444801',1,'LCD']]], + ['setstate',['setState',['../classBlinkLED.html#af904a345e56d49948a042ac439d0b9d4',1,'BlinkLED']]], + ['setstepvalue',['setStepValue',['../classIntField.html#a8fb6e207bd906062bb788e19dbe58bcb',1,'IntField']]], + ['setsuffix',['setSuffix',['../classIntField.html#a9324bba994389f3a4563d9c18bd2f1cd',1,'IntField']]], + ['setsystemfilter',['setSystemFilter',['../classIRreceiver.html#a920828f1411fa12d1856cd933066bd08',1,'IRreceiver']]], + ['settextcolor',['setTextColor',['../classBitmap.html#a8e225a4f188269bb18265ae4b49de0a3',1,'Bitmap']]], + ['settruelabel',['setTrueLabel',['../classBoolField.html#a803fc8c39765da4a44af01d925cd4194',1,'BoolField']]], + ['setvalue',['setValue',['../classBoolField.html#a080c575fd4a98e6afc4b9197fbab5577',1,'BoolField::setValue()'],['../classIntField.html#aed421e2c52946f2c7643534b4f6f13f7',1,'IntField::setValue()'],['../classListField.html#a266193631e897fb0b46e1270b1d0eb24',1,'ListField::setValue()'],['../classTextField.html#a24b98c5bb744331bf0a5facc8ea9c033',1,'TextField::setValue()'],['../classTimeField.html#a063b6df2bd6fa7970ee445ab4e5d1fc1',1,'TimeField::setValue()']]], + ['sha1',['SHA1',['../classSHA1.html#ad49a5108ffd6996b1133bf41224ff726',1,'SHA1']]], + ['sha256',['SHA256',['../classSHA256.html#ab672831c542df07ff03ded25760feec2',1,'SHA256']]], + ['show',['show',['../classForm.html#a9e8d718ab55a8034c22c606ccfa90d65',1,'Form']]], + ['size',['size',['../classEEPROM24.html#aa544875cef9bd05bf71d6c19be06cf7c',1,'EEPROM24']]], + ['sleepfor',['sleepFor',['../group__power__save.html#ga95c1666038493a7f95be6768882eebad',1,'sleepFor(SleepDuration duration, uint8_t mode): PowerSave.cpp'],['../group__power__save.html#ga95c1666038493a7f95be6768882eebad',1,'sleepFor(SleepDuration duration, uint8_t mode=0): PowerSave.cpp']]], + ['softi2c',['SoftI2C',['../classSoftI2C.html#adb6e00ee3f930f1d32010a18feb5f6cc',1,'SoftI2C']]], + ['startread',['startRead',['../classI2CMaster.html#a4e5f1a1a4c2242699be5a35fc4872fde',1,'I2CMaster::startRead()'],['../classSoftI2C.html#aa0dafc067cfa374af75e060dca647ec3',1,'SoftI2C::startRead()']]], + ['startwrite',['startWrite',['../classI2CMaster.html#a01960fc821cb25e4c88c26d2c6107e35',1,'I2CMaster::startWrite()'],['../classSoftI2C.html#aa8a3219f4e6ff52306cc3c219f37d8f9',1,'SoftI2C::startWrite()']]], + ['state',['state',['../classBlinkLED.html#ab89b5b3435998ea6699d4bf94866e233',1,'BlinkLED']]], + ['stepvalue',['stepValue',['../classIntField.html#a49025ee3473fe066a6a6c546af98bfbd',1,'IntField']]], + ['stir',['stir',['../classNoiseSource.html#a7ce647815524fe84f562aca5256e12f3',1,'NoiseSource::stir()'],['../classRNGClass.html#ad99535ea23ae2fec55bdebb8c24def02',1,'RNGClass::stir(const uint8_t *data, size_t len, unsigned int credit=0)'],['../classRNGClass.html#a541e4118e2ed10617480bb9949f9c516',1,'RNGClass::stir(NoiseSource &source)'],['../classTransistorNoiseSource.html#add25c6a14b0506bc30ca781f2d923917',1,'TransistorNoiseSource::stir()']]], + ['stop',['stop',['../classMelody.html#ac0c552233c41d85f2766d2e4df376b2b',1,'Melody']]], + ['stride',['stride',['../classBitmap.html#af30df263729385ea2330effe3c80a1bc',1,'Bitmap']]], + ['suffix',['suffix',['../classIntField.html#a1a1de6a1836dfdb820c92b7f188a1b05',1,'IntField']]], + ['swapbuffers',['swapBuffers',['../classDMD.html#a80269ccd44b3ef9ee15f0a1009b7a60a',1,'DMD']]], + ['swapbuffersandcopy',['swapBuffersAndCopy',['../classDMD.html#a0b1771cf790b2b62eea55e56b02e3736',1,'DMD']]], + ['system',['system',['../classIRreceiver.html#a19e9334ae97812fa85078507d105478f',1,'IRreceiver']]], + ['systemfilter',['systemFilter',['../classIRreceiver.html#a2c6adc404f71f263ba535ec1ed9cff1a',1,'IRreceiver']]] +]; diff --git a/search/functions_11.html b/search/functions_11.html new file mode 100644 index 00000000..5e91b098 --- /dev/null +++ b/search/functions_11.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_11.js b/search/functions_11.js new file mode 100644 index 00000000..db96fc6d --- /dev/null +++ b/search/functions_11.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['textcolor',['textColor',['../classBitmap.html#ab6e5f5744fd2f18478aac428b751d848',1,'Bitmap']]], + ['textfield',['TextField',['../classTextField.html#a5108741ab147b2cd5a399fefbe0a2382',1,'TextField::TextField(const String &label)'],['../classTextField.html#a24096a344d9161b2c99ce724ec2ee93c',1,'TextField::TextField(Form &form, const String &label, const String &value)']]], + ['textheight',['textHeight',['../classBitmap.html#a628bb694fcfe6eab619a4f1e152d41c4',1,'Bitmap']]], + ['textwidth',['textWidth',['../classBitmap.html#a0f7607b1c7867987f4500d490a666e8a',1,'Bitmap::textWidth(const char *str, int len=-1) const '],['../classBitmap.html#a8ca70aa0f8f722a228358bffe794e925',1,'Bitmap::textWidth(const String &str, int start=0, int len=-1) const ']]], + ['timefield',['TimeField',['../classTimeField.html#a138e2425379705828a87eb2d8a836431',1,'TimeField::TimeField(const String &label)'],['../classTimeField.html#a87f222bc098367963ed21a7edc4624de',1,'TimeField::TimeField(Form &form, const String &label, int maxHours, bool readOnly)']]], + ['transistornoisesource',['TransistorNoiseSource',['../classTransistorNoiseSource.html#a05bab61c301a5397021048c95ca3107d',1,'TransistorNoiseSource']]], + ['truelabel',['trueLabel',['../classBoolField.html#a9972030beec6e007b556c6eb652e163d',1,'BoolField']]] +]; diff --git a/search/functions_12.html b/search/functions_12.html new file mode 100644 index 00000000..1ab0742b --- /dev/null +++ b/search/functions_12.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_12.js b/search/functions_12.js new file mode 100644 index 00000000..aaab739a --- /dev/null +++ b/search/functions_12.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['unusedpin',['unusedPin',['../group__power__save.html#ga6dbe8e20a70e83cf5b068177675ec792',1,'PowerSave.h']]], + ['update',['update',['../classBLAKE2s.html#aa192da2fa044b03cccaf11e87fdf9911',1,'BLAKE2s::update()'],['../classHash.html#aec9761ee427d122e7450de8df200265c',1,'Hash::update()'],['../classSHA1.html#aec77fbc5015f82bbf7055e535085656a',1,'SHA1::update()'],['../classSHA256.html#a555bf8efb17afd4842d2e55a1f39f27b',1,'SHA256::update()']]], + ['updatecursor',['updateCursor',['../classField.html#afc612378167be0e7f8a6f8395b3537bd',1,'Field']]] +]; diff --git a/search/functions_13.html b/search/functions_13.html new file mode 100644 index 00000000..724f5c10 --- /dev/null +++ b/search/functions_13.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_13.js b/search/functions_13.js new file mode 100644 index 00000000..46d0b7fe --- /dev/null +++ b/search/functions_13.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['value',['value',['../classBoolField.html#a9147826437fbaf9b29eda9dee9e37b39',1,'BoolField::value()'],['../classIntField.html#a2fb650827ce8cb4662253bb6c32acb52',1,'IntField::value()'],['../classListField.html#aab8477757cd89bacd242c85bac2dccb1',1,'ListField::value()'],['../classTextField.html#a124764b6fc7c19aaf683f72cd42636b1',1,'TextField::value()'],['../classTimeField.html#a400aaa72a83b3b872e1de1c3af1a240f',1,'TimeField::value()']]] +]; diff --git a/search/functions_14.html b/search/functions_14.html new file mode 100644 index 00000000..396906bd --- /dev/null +++ b/search/functions_14.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_14.js b/search/functions_14.js new file mode 100644 index 00000000..9ba65149 --- /dev/null +++ b/search/functions_14.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['width',['width',['../classBitmap.html#a76c3b49e535761f07c553e7336daf523',1,'Bitmap']]], + ['write',['write',['../classEEPROM24.html#a9e017772e3459ee4ab987e27d78937f8',1,'EEPROM24::write(unsigned long address, uint8_t value)'],['../classEEPROM24.html#a3d918ed34da7ca6d21a776c0614eebf3',1,'EEPROM24::write(unsigned long address, const void *data, size_t length)'],['../classI2CMaster.html#a0bf6b84cb1e2b3a37a4a0260d0b6f960',1,'I2CMaster::write()'],['../classSoftI2C.html#ab46f0b6363c9cfe6fb3ab907956d5d73',1,'SoftI2C::write()']]], + ['writealarm',['writeAlarm',['../classDS1307RTC.html#a7354aed91d7c94d0d7b2144b1bf32c75',1,'DS1307RTC::writeAlarm()'],['../classDS3232RTC.html#a8b0a65e0ac479aec8fad6ca3147dbe75',1,'DS3232RTC::writeAlarm()'],['../classRTC.html#a0e96c91efd9e7a6340effdae3eadf17e',1,'RTC::writeAlarm()']]], + ['writebyte',['writeByte',['../classDS1307RTC.html#a6ef435fd4aa4adf8eefdf8b1741f5ba6',1,'DS1307RTC::writeByte()'],['../classDS3232RTC.html#a9acebf12c5cecdd6d84e0ff9ed41765a',1,'DS3232RTC::writeByte()'],['../classRTC.html#a1cab6397ec04b1e2b3feea5b3cd1f749',1,'RTC::writeByte()']]], + ['writedate',['writeDate',['../classDS1307RTC.html#a4f7346be33612cf9ecd96080eb046230',1,'DS1307RTC::writeDate()'],['../classDS3232RTC.html#a31c004a90c724979d8267c31f2dbf5ed',1,'DS3232RTC::writeDate()'],['../classRTC.html#ae667600d05c8e7b06a93574dd068a4d7',1,'RTC::writeDate()']]], + ['writetime',['writeTime',['../classDS1307RTC.html#a0a5d0d86a0345420ebb289ea724b19e8',1,'DS1307RTC::writeTime()'],['../classDS3232RTC.html#ab0ca13a8b80da856b37fc53b84e27c78',1,'DS3232RTC::writeTime()'],['../classRTC.html#a102e2ec15bf0273d8f7e9ce4b6dcc96e',1,'RTC::writeTime()']]] +]; diff --git a/search/functions_15.html b/search/functions_15.html new file mode 100644 index 00000000..2dee32be --- /dev/null +++ b/search/functions_15.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_15.js b/search/functions_15.js new file mode 100644 index 00000000..836de2ab --- /dev/null +++ b/search/functions_15.js @@ -0,0 +1,20 @@ +var searchData= +[ + ['_7eaescommon',['~AESCommon',['../classAESCommon.html#a8f67970c86c23affb0297fc1bb10fad8',1,'AESCommon']]], + ['_7ebitmap',['~Bitmap',['../classBitmap.html#a72d2a301ec1eb1c8d0f3d64823659a8e',1,'Bitmap']]], + ['_7eblake2s',['~BLAKE2s',['../classBLAKE2s.html#a4b3187ecaa3d3c8febfbb40c0f779aa7',1,'BLAKE2s']]], + ['_7eblockcipher',['~BlockCipher',['../classBlockCipher.html#acec1bc4faeaa6dda2d91bffd79a988f9',1,'BlockCipher']]], + ['_7ecbccommon',['~CBCCommon',['../classCBCCommon.html#a45a91367531b4692b3bb7237ab6e9015',1,'CBCCommon']]], + ['_7ecfbcommon',['~CFBCommon',['../classCFBCommon.html#ae200d7b876a1f154bcdb1cdf33d3be54',1,'CFBCommon']]], + ['_7echarlieplex',['~Charlieplex',['../classCharlieplex.html#a4dbe37ccba8ba18139f4e710afdcd103',1,'Charlieplex']]], + ['_7ecipher',['~Cipher',['../classCipher.html#a84bdea765f7e35aa5b5950dd2853a383',1,'Cipher']]], + ['_7edmd',['~DMD',['../classDMD.html#a7b37e05584d3e0308163700920df99b2',1,'DMD']]], + ['_7efield',['~Field',['../classField.html#a45d6e6d09b8f8e46de62b40119d62c60',1,'Field']]], + ['_7eform',['~Form',['../classForm.html#a9cda7cce41e81bfaca51e922d4f9b98f',1,'Form']]], + ['_7ehash',['~Hash',['../classHash.html#a4e4b4797dda8678aaed058bae155813e',1,'Hash']]], + ['_7enoisesource',['~NoiseSource',['../classNoiseSource.html#a4eca1e894a5d719fb9bf4df34a791cdb',1,'NoiseSource']]], + ['_7eofbcommon',['~OFBCommon',['../classOFBCommon.html#aae7435157e51bf977d3481e94e17ae01',1,'OFBCommon']]], + ['_7erngclass',['~RNGClass',['../classRNGClass.html#aef3ee2fb14a39caf650dc90a0226dd31',1,'RNGClass']]], + ['_7esha1',['~SHA1',['../classSHA1.html#a8485d7c14fa29286cd3c7acfe438606d',1,'SHA1']]], + ['_7esha256',['~SHA256',['../classSHA256.html#ad82f2925b612de315b289017e023a73b',1,'SHA256']]] +]; diff --git a/search/functions_2.html b/search/functions_2.html new file mode 100644 index 00000000..78be8b41 --- /dev/null +++ b/search/functions_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_2.js b/search/functions_2.js new file mode 100644 index 00000000..1860bb73 --- /dev/null +++ b/search/functions_2.js @@ -0,0 +1,20 @@ +var searchData= +[ + ['calibrating',['calibrating',['../classNoiseSource.html#ac8ac086f830efb5ffe3e8d506aa61c85',1,'NoiseSource::calibrating()'],['../classTransistorNoiseSource.html#a9244b327c291c737396e769da9c66af9',1,'TransistorNoiseSource::calibrating()']]], + ['cbc',['CBC',['../classCBC.html#ae22d0d9347d5f3c97328e643a9b29ecb',1,'CBC']]], + ['cbccommon',['CBCCommon',['../classCBCCommon.html#a7575b369910e05f54e76698dd04bfa05',1,'CBCCommon']]], + ['cfb',['CFB',['../classCFB.html#a26a027614d027162c67085a58b512318',1,'CFB']]], + ['cfbcommon',['CFBCommon',['../classCFBCommon.html#adad0210430c83817c993bdca30d562a6',1,'CFBCommon']]], + ['chacha',['ChaCha',['../classChaCha.html#a5831811b705d3c80e97f0242597f0c7e',1,'ChaCha']]], + ['charlieplex',['Charlieplex',['../classCharlieplex.html#abfb0d0456bcbadbf60c21f615adacdbd',1,'Charlieplex']]], + ['charwidth',['charWidth',['../classBitmap.html#a9b79ac13077ca865e4515510297780bd',1,'Bitmap']]], + ['chaseleds',['ChaseLEDs',['../classChaseLEDs.html#ab6bb3da371d3730a6552e93a9b2eab78',1,'ChaseLEDs']]], + ['cipher',['Cipher',['../classCipher.html#a6a61077eca3ccd5900f92ceac58fb09c',1,'Cipher']]], + ['clear',['clear',['../classBitmap.html#a839dc8fab05a5ebf7a6b2e61436b2fa1',1,'Bitmap::clear()'],['../classAESCommon.html#a83e43f7d07e31d90fd7b768a93ecfce6',1,'AESCommon::clear()'],['../classBLAKE2s.html#a0848885f52df51dc53949d32a206e72d',1,'BLAKE2s::clear()'],['../classBlockCipher.html#a6f27d46e9dfa7761d014d828ad5f955b',1,'BlockCipher::clear()'],['../classCBCCommon.html#a7befadfe7384e0e857a96a59bf3845e9',1,'CBCCommon::clear()'],['../classCFBCommon.html#a847d320b0fe7f329385f26511b42c40d',1,'CFBCommon::clear()'],['../classChaCha.html#af533905f679066c41f4d6cd76bddb4cb',1,'ChaCha::clear()'],['../classCipher.html#a4b7c3965646441a70d9ab934a7c92ab1',1,'Cipher::clear()'],['../classCTRCommon.html#ac0d6381c02fe2a8a017ad66d006a6ef2',1,'CTRCommon::clear()'],['../classHash.html#a4a959469433cd9348ab7f3ac6228bb34',1,'Hash::clear()'],['../classOFBCommon.html#a55bf2396beb91c457bfc4c20ef5c8123',1,'OFBCommon::clear()'],['../classSHA1.html#a41a159d6565b04d3f620dcd720faaf3f',1,'SHA1::clear()'],['../classSHA256.html#add0d1649d533b27005ccd8508398c689',1,'SHA256::clear()']]], + ['command',['command',['../classIRreceiver.html#a4b021592a2b089dc2f1e138a38506fda',1,'IRreceiver']]], + ['copy',['copy',['../classBitmap.html#ab22fe1f3871934987a670b559f67c67c',1,'Bitmap']]], + ['count',['count',['../classCharlieplex.html#a5008aa4143d381ce34a3aed1a3843e4e',1,'Charlieplex']]], + ['ctr',['CTR',['../classCTR.html#a7025ab5d79f0f0763f751aeabc425ca9',1,'CTR']]], + ['ctrcommon',['CTRCommon',['../classCTRCommon.html#abeb01342f17023e99776001d397c51ff',1,'CTRCommon']]], + ['currentfield',['currentField',['../classForm.html#a85a219a73294cef1f89a2182b5c25bf8',1,'Form']]] +]; diff --git a/search/functions_3.html b/search/functions_3.html new file mode 100644 index 00000000..ebf2eebd --- /dev/null +++ b/search/functions_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_3.js b/search/functions_3.js new file mode 100644 index 00000000..3b5c030a --- /dev/null +++ b/search/functions_3.js @@ -0,0 +1,31 @@ +var searchData= +[ + ['data',['data',['../classBitmap.html#a5eeed27c176eb6e4a2c39ea83444e27d',1,'Bitmap::data()'],['../classBitmap.html#a20fea2a946545aa3b5edd78245149e5f',1,'Bitmap::data() const ']]], + ['dayofweek',['dayOfWeek',['../classRTC.html#a525a9c1dad89613708f47a683eb316aa',1,'RTC']]], + ['decrypt',['decrypt',['../classCBCCommon.html#ab46a2625cae9a654c708e1f31a0e22b6',1,'CBCCommon::decrypt()'],['../classCFBCommon.html#aaaa3d61c5743e30e355207c193c0b0ef',1,'CFBCommon::decrypt()'],['../classChaCha.html#a1f54b2b51b59428010f81a6c4dc4e42c',1,'ChaCha::decrypt()'],['../classCipher.html#ac6099d1a0d7f2ff67b0e4ccb4a17eb08',1,'Cipher::decrypt()'],['../classCTRCommon.html#a0943387cf1124258389702e0690740fe',1,'CTRCommon::decrypt()'],['../classOFBCommon.html#aeb3636d7175b150e2bf16367e51c2e36',1,'OFBCommon::decrypt()']]], + ['decryptblock',['decryptBlock',['../classAESCommon.html#a95a806adf42f975765ff62907efdc639',1,'AESCommon::decryptBlock()'],['../classBlockCipher.html#ac3ba2450222aa1ea804ae4881ab6440c',1,'BlockCipher::decryptBlock()']]], + ['defaultfield',['defaultField',['../classForm.html#aba75b59f68b31dd77dbbac9ab5c3124b',1,'Form']]], + ['destroy',['destroy',['../classRNGClass.html#a9901367d86f2303a59bbc12fe91cad00',1,'RNGClass']]], + ['dh1',['dh1',['../classCurve25519.html#a2b6911583d17ea9a36bbbb40d58b3d89',1,'Curve25519']]], + ['dh2',['dh2',['../classCurve25519.html#a14022d6ac68ec691ffb0247275078ab9',1,'Curve25519']]], + ['disable32khzoutput',['disable32kHzOutput',['../classDS3232RTC.html#ada732bae42fc2833e59ae293aa27ddcb',1,'DS3232RTC']]], + ['disablealarminterrupts',['disableAlarmInterrupts',['../classDS3232RTC.html#a225b8c62d617aa1b7be7d20e8a033be9',1,'DS3232RTC']]], + ['disablescreensaver',['disableScreenSaver',['../classLCD.html#a85c3a4694b105731404df36e35e5b26e',1,'LCD']]], + ['disabletimer1',['disableTimer1',['../classDMD.html#a39af27e216f654ecc7e60b0614cb6b33',1,'DMD']]], + ['disabletimer2',['disableTimer2',['../classDMD.html#a52fe885bfb380b74df54c96221811cff',1,'DMD']]], + ['dispatch',['dispatch',['../classBoolField.html#af793bafc1193d79b495c2ede711bca57',1,'BoolField::dispatch()'],['../classField.html#a061bd1ed4d8b079df86465df8facd3b3',1,'Field::dispatch()'],['../classForm.html#a89bd3850e87caa2ca7b2e946f923d0ee',1,'Form::dispatch()'],['../classIntField.html#a01a17d5a89c76c42c4f0516984ce653f',1,'IntField::dispatch()'],['../classListField.html#a5d752bd561cde735b175bcdfda55832a',1,'ListField::dispatch()'],['../classTimeField.html#a9b953d9abdbe960a3fa34938462832e5',1,'TimeField::dispatch()']]], + ['display',['display',['../classLCD.html#a5b07cf05e8e5e7c53654f5ca0cf58b89',1,'LCD']]], + ['dmd',['DMD',['../classDMD.html#affd37accffe951c8878434dfa1245809',1,'DMD']]], + ['doublebuffer',['doubleBuffer',['../classDMD.html#aab1f3ba29c053d630ae12865d22166ec',1,'DMD']]], + ['drawbitmap',['drawBitmap',['../classBitmap.html#a491e9c0bb20ddf5a5eb4933077c8ed72',1,'Bitmap::drawBitmap(int x, int y, const Bitmap &bitmap, Color color=White)'],['../classBitmap.html#a5e4f23e8f14e193410b5f071149401e4',1,'Bitmap::drawBitmap(int x, int y, Bitmap::ProgMem bitmap, Color color=White)']]], + ['drawchar',['drawChar',['../classBitmap.html#a1a11f29863ee7f36a3b15c91963102bd',1,'Bitmap']]], + ['drawcircle',['drawCircle',['../classBitmap.html#a933763a4f3cba79fbcf97ae6d0a864aa',1,'Bitmap']]], + ['drawfilledcircle',['drawFilledCircle',['../classBitmap.html#a757291b9a39bcb0d64ac98d3a2fa061b',1,'Bitmap']]], + ['drawfilledrect',['drawFilledRect',['../classBitmap.html#a568acbca3818dd85dd62fff6d0b36ffb',1,'Bitmap']]], + ['drawinvertedbitmap',['drawInvertedBitmap',['../classBitmap.html#a4321640464bc08b60348c09bff01b86a',1,'Bitmap::drawInvertedBitmap(int x, int y, const Bitmap &bitmap)'],['../classBitmap.html#a2e862b72c2d6471af737fac320472d69',1,'Bitmap::drawInvertedBitmap(int x, int y, Bitmap::ProgMem bitmap)']]], + ['drawline',['drawLine',['../classBitmap.html#aa0a84f3694e343d68e7021552c69f767',1,'Bitmap']]], + ['drawrect',['drawRect',['../classBitmap.html#aac61e3f7f625db568e37d88b52b3b2fc',1,'Bitmap']]], + ['drawtext',['drawText',['../classBitmap.html#a3e9bcbfb584d5020bd6f0a313ee275f0',1,'Bitmap::drawText(int x, int y, const char *str, int len=-1)'],['../classBitmap.html#a802f5d6bd19a3727670e61e7a88a0cac',1,'Bitmap::drawText(int x, int y, const String &str, int start=0, int len=-1)']]], + ['ds1307rtc',['DS1307RTC',['../classDS1307RTC.html#a092805d75bea323dc4be062638bff866',1,'DS1307RTC']]], + ['ds3232rtc',['DS3232RTC',['../classDS3232RTC.html#aa959454ae01b11c48d6ec7ec192b4ccb',1,'DS3232RTC']]] +]; diff --git a/search/functions_4.html b/search/functions_4.html new file mode 100644 index 00000000..7317ea91 --- /dev/null +++ b/search/functions_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_4.js b/search/functions_4.js new file mode 100644 index 00000000..5c5eab57 --- /dev/null +++ b/search/functions_4.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['eeprom24',['EEPROM24',['../classEEPROM24.html#ae8547f6ff7711496e1959ee24a142995',1,'EEPROM24']]], + ['enable32khzoutput',['enable32kHzOutput',['../classDS3232RTC.html#a3966de6f4241d86f198a8b9dd5e7e59a',1,'DS3232RTC']]], + ['enablealarminterrupts',['enableAlarmInterrupts',['../classDS3232RTC.html#ab91e79271a1f8e75b07bddbb04445dc9',1,'DS3232RTC']]], + ['enablescreensaver',['enableScreenSaver',['../classLCD.html#af9a2326d034fa159d384ec16223c924f',1,'LCD']]], + ['enabletimer1',['enableTimer1',['../classDMD.html#a4c3b04b384f3d656a9b59690836775e2',1,'DMD']]], + ['enabletimer2',['enableTimer2',['../classDMD.html#a5469775db7fafebca2cdbc6a6372fb97',1,'DMD']]], + ['encrypt',['encrypt',['../classCBCCommon.html#a41d2f655a7df13cfcd009b2882e13147',1,'CBCCommon::encrypt()'],['../classCFBCommon.html#a57af3692389bed300d3cfdf351351c51',1,'CFBCommon::encrypt()'],['../classChaCha.html#acd4fff140b8871c233d9a31abf753ed8',1,'ChaCha::encrypt()'],['../classCipher.html#ad2832bd61039d61560e34ea3382ca562',1,'Cipher::encrypt()'],['../classCTRCommon.html#a201bda584d111552ce8ec09fac759963',1,'CTRCommon::encrypt()'],['../classOFBCommon.html#a984d81a460e0799895b19dc48c3b5cf8',1,'OFBCommon::encrypt()']]], + ['encryptblock',['encryptBlock',['../classAESCommon.html#a2d95f6159abfcd92b5841f9018e44296',1,'AESCommon::encryptBlock()'],['../classBlockCipher.html#aed0788b25f6bb2f1bd47d5a5f0c5db33',1,'BlockCipher::encryptBlock()']]], + ['endwrite',['endWrite',['../classI2CMaster.html#ab29f63551ddeb032a91505d1c0b8ac41',1,'I2CMaster::endWrite()'],['../classSoftI2C.html#aa12ae82813598b2e9ea70463c23c5bf3',1,'SoftI2C::endWrite()']]], + ['enterfield',['enterField',['../classBoolField.html#ab3f1e610b52caed7e41016f6ae3d7d09',1,'BoolField::enterField()'],['../classField.html#aa032bbeacb405c56546cb56fbbee94f5',1,'Field::enterField()'],['../classIntField.html#a51d9127b660e8dd7f87718acd230202a',1,'IntField::enterField()'],['../classListField.html#a191b79b460e45cf48e04b04eface2888',1,'ListField::enterField()'],['../classTextField.html#aa78f1354f9240b64fabd6f996e312f32',1,'TextField::enterField()'],['../classTimeField.html#ae914d6b870283a334d2d669460f7646b',1,'TimeField::enterField()']]], + ['eval',['eval',['../classCurve25519.html#a2e4b7dd83a019b32c76584c99bfda21a',1,'Curve25519']]], + ['exitfield',['exitField',['../classField.html#ad6805c75ee1e62f8cd8bd550c4530c07',1,'Field::exitField()'],['../classTimeField.html#a5a6b7db2e3fda7745e0ff9c3d8d9a541',1,'TimeField::exitField()']]] +]; diff --git a/search/functions_5.html b/search/functions_5.html new file mode 100644 index 00000000..1f1d9ce1 --- /dev/null +++ b/search/functions_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_5.js b/search/functions_5.js new file mode 100644 index 00000000..d47c0737 --- /dev/null +++ b/search/functions_5.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['falselabel',['falseLabel',['../classBoolField.html#a59ad7a8a33290bda0d9fbb3df4f09b01',1,'BoolField']]], + ['field',['Field',['../classField.html#ac4ea0d104376233c3f0bfc080ec8564e',1,'Field::Field(const String &label)'],['../classField.html#a7e2bdb203ddfd9219696f263c1731fe7',1,'Field::Field(Form &form, const String &label)']]], + ['fill',['fill',['../classBitmap.html#a99da820f9280aace6b512801d5a5e2b2',1,'Bitmap::fill(int x, int y, int width, int height, Color color)'],['../classBitmap.html#ac661adab340858b541a2fe44e6303f56',1,'Bitmap::fill(int x, int y, int width, int height, Bitmap::ProgMem pattern, Color color=White)']]], + ['finalize',['finalize',['../classBLAKE2s.html#a751a3d772cbe1cd1dad83dbd09853b1b',1,'BLAKE2s::finalize()'],['../classHash.html#a09b3ccec22763fc86b1415695862977c',1,'Hash::finalize()'],['../classSHA1.html#a5a6a8a6169aa48e0bccadb22a149ab7c',1,'SHA1::finalize()'],['../classSHA256.html#a695157bcdf5495ba892ebac309f3abd6',1,'SHA256::finalize()']]], + ['firedalarm',['firedAlarm',['../classDS3232RTC.html#a79649f100a4562b9c1ba7c69e85cbca3',1,'DS3232RTC']]], + ['font',['font',['../classBitmap.html#a7bf0a232b4bd12573cc570cc0edef47c',1,'Bitmap']]], + ['form',['Form',['../classForm.html#ad30836b22edde707a52d94090b716996',1,'Form::Form()'],['../classField.html#a27427319be1cc92db3128637d8884ee5',1,'Field::form()']]], + ['fromrgb',['fromRGB',['../classDMD.html#a557412f734fc4596e1102bf71e110ea0',1,'DMD']]] +]; diff --git a/search/functions_6.html b/search/functions_6.html new file mode 100644 index 00000000..c9faaa6a --- /dev/null +++ b/search/functions_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_6.js b/search/functions_6.js new file mode 100644 index 00000000..9269d5d2 --- /dev/null +++ b/search/functions_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['getbutton',['getButton',['../classLCD.html#ac1e80e2603bd1cf0276c36092c416292',1,'LCD']]] +]; diff --git a/search/functions_7.html b/search/functions_7.html new file mode 100644 index 00000000..ec330da8 --- /dev/null +++ b/search/functions_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_7.js b/search/functions_7.js new file mode 100644 index 00000000..306758f1 --- /dev/null +++ b/search/functions_7.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['hash',['Hash',['../classHash.html#af482880ad75b67a09d2dcb5e86244d80',1,'Hash']]], + ['hashcore',['hashCore',['../classChaCha.html#a41ac3262e52ff49dcd916d0b3b2e2038',1,'ChaCha']]], + ['hashsize',['hashSize',['../classBLAKE2s.html#af9f50aac096f92ba27b1b2dd48df4c52',1,'BLAKE2s::hashSize()'],['../classHash.html#adcdd30de3e5ecaa2f798c0c5644d9ef8',1,'Hash::hashSize()'],['../classSHA1.html#ab8cdb7233a8b81be07877049960ddfdd',1,'SHA1::hashSize()'],['../classSHA256.html#a103d5bc5ced792464a82cb1d7986de94',1,'SHA256::hashSize()']]], + ['hasupdates',['hasUpdates',['../classDS1307RTC.html#a6fec8ff71f33cc1a129eb0bd009600b0',1,'DS1307RTC::hasUpdates()'],['../classDS3232RTC.html#a619ffee1bc013c9ddf4ae415115798bc',1,'DS3232RTC::hasUpdates()'],['../classRTC.html#a3690761f29654a2c9e676fcbfa32dd30',1,'RTC::hasUpdates()']]], + ['height',['height',['../classBitmap.html#adcd4e3dc7594421e647b0f52da9a41a3',1,'Bitmap']]], + ['hide',['hide',['../classForm.html#a88b9146a3f68e837c5e831203096f9e9',1,'Form']]], + ['holdtime',['holdTime',['../classCharlieplex.html#abb429659a7b1ee4c7306ea659050cb30',1,'Charlieplex']]] +]; diff --git a/search/functions_8.html b/search/functions_8.html new file mode 100644 index 00000000..afd4facf --- /dev/null +++ b/search/functions_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_8.js b/search/functions_8.js new file mode 100644 index 00000000..82d2ce8b --- /dev/null +++ b/search/functions_8.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['intfield',['IntField',['../classIntField.html#a9df274c4100ed37d2d78738f09fc53b6',1,'IntField::IntField(const String &label)'],['../classIntField.html#a10c9c958bcde276698f1f1f9bff949dd',1,'IntField::IntField(Form &form, const String &label, int minValue, int maxValue, int stepValue, int value)'],['../classIntField.html#a2b99fa19be6a0ed01ddc4939352b372e',1,'IntField::IntField(Form &form, const String &label, int minValue, int maxValue, int stepValue, int value, const String &suffix)']]], + ['invert',['invert',['../classBitmap.html#a6d85556bcc9fac91d33f0f6f7a6430dd',1,'Bitmap']]], + ['irreceiver',['IRreceiver',['../classIRreceiver.html#a06eccb8b8311eac395e4b20c4e0163e3',1,'IRreceiver']]], + ['iscurrent',['isCurrent',['../classField.html#a25d86a67b321e8c642edf75a10a35f72',1,'Field::isCurrent()'],['../classForm.html#a48fb77f93e77b28b0397b59e1e9bf789',1,'Form::isCurrent()']]], + ['ispaused',['isPaused',['../classBlinkLED.html#aa0ee318b886b84fb71d5831fa456ecc8',1,'BlinkLED']]], + ['isplaying',['isPlaying',['../classMelody.html#ad38db3338ed87d72238c0ea9440c633c',1,'Melody']]], + ['isrealtime',['isRealTime',['../classDS1307RTC.html#aba01ca4c2f7863b610e5dfe9146886bd',1,'DS1307RTC::isRealTime()'],['../classDS3232RTC.html#acc5908a3743afb4c26bd75e22cad87a4',1,'DS3232RTC::isRealTime()']]], + ['isscreensaved',['isScreenSaved',['../classLCD.html#af5d5ca618a3161aa352027b58fe09d0e',1,'LCD']]], + ['isvalid',['isValid',['../classBitmap.html#a3846a240722e847d3cf11f701da1ce7b',1,'Bitmap']]], + ['isvisible',['isVisible',['../classForm.html#a3101f288e3e5aa8307c57f35861ad587',1,'Form']]], + ['items',['items',['../classListField.html#a4dbbdeebd386551eb8f245b42b45ccf0',1,'ListField']]], + ['ivsize',['ivSize',['../classCBCCommon.html#a016277533730284a38bb6ad8cd6f91ce',1,'CBCCommon::ivSize()'],['../classCFBCommon.html#a55db1be69de87aafe5601d31be918ebb',1,'CFBCommon::ivSize()'],['../classChaCha.html#afaa3df343a7d07976bd7e03a0c1bf43c',1,'ChaCha::ivSize()'],['../classCipher.html#ab8b53ddc4ce431f03c2a1903d70ace9c',1,'Cipher::ivSize()'],['../classCTRCommon.html#a98c1717d11d8da8e1fa108607358774a',1,'CTRCommon::ivSize()'],['../classOFBCommon.html#a67b4639aaece17a796fcba3a2ce8b43c',1,'OFBCommon::ivSize()']]] +]; diff --git a/search/functions_9.html b/search/functions_9.html new file mode 100644 index 00000000..542b9e0a --- /dev/null +++ b/search/functions_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_9.js b/search/functions_9.js new file mode 100644 index 00000000..73611e16 --- /dev/null +++ b/search/functions_9.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['keysize',['keySize',['../classAES128.html#aa871832a156f0ea61b964e489670ae9d',1,'AES128::keySize()'],['../classAES192.html#ade28843e51e262b30eb55791c83fd791',1,'AES192::keySize()'],['../classAES256.html#af8ed6412bae6fc78274f60344899366a',1,'AES256::keySize()'],['../classBlockCipher.html#afde6004a859e015d877eab3c37042a0f',1,'BlockCipher::keySize()'],['../classCBCCommon.html#adb7daacfe2a4fca3d13b62b75372fe4e',1,'CBCCommon::keySize()'],['../classCFBCommon.html#a82899da983bc70bc8152ee67f424552e',1,'CFBCommon::keySize()'],['../classChaCha.html#af286083291fab2bd36dc7ad1f54d5cd7',1,'ChaCha::keySize()'],['../classCipher.html#a4cea432ea0278c865441f17cbb88b1ab',1,'Cipher::keySize()'],['../classCTRCommon.html#a29ce8e13a302350397fc6790a686bea2',1,'CTRCommon::keySize()'],['../classOFBCommon.html#a76ea9f9ea9dd137778338813e534a8ce',1,'OFBCommon::keySize()']]] +]; diff --git a/search/functions_a.html b/search/functions_a.html new file mode 100644 index 00000000..94fd395d --- /dev/null +++ b/search/functions_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_a.js b/search/functions_a.js new file mode 100644 index 00000000..fa77f5db --- /dev/null +++ b/search/functions_a.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['label',['label',['../classField.html#aaa861ef917130c989a955bc75c683afe',1,'Field']]], + ['lcd',['lcd',['../classField.html#a5cf21bf958a71e51feac9e1bf9f599d1',1,'Field::lcd()'],['../classLCD.html#a00bb2db1390721abc7b24ac4b8c276c8',1,'LCD::LCD()'],['../classLCD.html#a067bc741cf27f143aba5d9f147908401',1,'LCD::LCD(uint8_t pin9)']]], + ['led',['led',['../classCharlieplex.html#a90fd09f24b62424b0b7b8bcdb0140b9d',1,'Charlieplex']]], + ['listfield',['ListField',['../classListField.html#a118501da7edb0b0bc6b493734975b4e9',1,'ListField::ListField(const String &label)'],['../classListField.html#aa303898a1f74b52c1c4982653de488b7',1,'ListField::ListField(Form &form, const String &label, ListItems items, int value=0)']]], + ['loop',['loop',['../classBlinkLED.html#aeeaf42b94c5392935f00f0f12a58c75e',1,'BlinkLED::loop()'],['../classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a',1,'Charlieplex::loop()'],['../classChaseLEDs.html#a8745fa6b9f33b6c6274a563dd4dea786',1,'ChaseLEDs::loop()'],['../classDMD.html#a2c74a0845ef6080056b972d490648114',1,'DMD::loop()'],['../classRNGClass.html#a8cb91e39f0c4591de5bf98b1e2880b13',1,'RNGClass::loop()']]], + ['loopcount',['loopCount',['../classMelody.html#ab78253ae9abc8478b05f415f5d878a60',1,'Melody']]] +]; diff --git a/search/functions_b.html b/search/functions_b.html new file mode 100644 index 00000000..1a03617d --- /dev/null +++ b/search/functions_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_b.js b/search/functions_b.js new file mode 100644 index 00000000..797abeb7 --- /dev/null +++ b/search/functions_b.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['maxhours',['maxHours',['../classTimeField.html#aa73f5a62c330ac7d2f647dfe27d026b7',1,'TimeField']]], + ['maxtransfersize',['maxTransferSize',['../classI2CMaster.html#a3cd0cea8169ac4e6dd6f39fd6cfb1926',1,'I2CMaster::maxTransferSize()'],['../classSoftI2C.html#aad488669f28f6a5a4ceaae3de61d38f4',1,'SoftI2C::maxTransferSize()']]], + ['maxvalue',['maxValue',['../classIntField.html#aaa0adcb0d16e822e5f176be5cb9ca8ad',1,'IntField']]], + ['melody',['Melody',['../classMelody.html#a9edc4165a49368dd5d78eedf982c38b9',1,'Melody']]], + ['minvalue',['minValue',['../classIntField.html#af3dab3f2b46d29136d7a93ce46b0b8fb',1,'IntField']]] +]; diff --git a/search/functions_c.html b/search/functions_c.html new file mode 100644 index 00000000..a6536e94 --- /dev/null +++ b/search/functions_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_c.js b/search/functions_c.js new file mode 100644 index 00000000..ba3908ff --- /dev/null +++ b/search/functions_c.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['nextfield',['nextField',['../classForm.html#a788a186ea4a7ebd75283a948ca45f4d1',1,'Form']]], + ['nodisplay',['noDisplay',['../classLCD.html#af3974da6d988ba2d21c25135ada12108',1,'LCD']]], + ['noisesource',['NoiseSource',['../classNoiseSource.html#a601479b7d8cc215f97f2f8a18d3ef4c2',1,'NoiseSource']]], + ['numrounds',['numRounds',['../classChaCha.html#a0a73d3623da377bc593876156768dd72',1,'ChaCha']]] +]; diff --git a/search/functions_d.html b/search/functions_d.html new file mode 100644 index 00000000..8cdcc06f --- /dev/null +++ b/search/functions_d.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_d.js b/search/functions_d.js new file mode 100644 index 00000000..714f5915 --- /dev/null +++ b/search/functions_d.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['ofb',['OFB',['../classOFB.html#a0b71b5cbcf01254799cd5eb37074a8cb',1,'OFB']]], + ['ofbcommon',['OFBCommon',['../classOFBCommon.html#a7f7e0cffcd7e2d7e06b7b1ae978a8f7d',1,'OFBCommon']]], + ['offtime',['offTime',['../classBlinkLED.html#a74c640edf1a9f6e8bea1e139462908bc',1,'BlinkLED']]], + ['ontime',['onTime',['../classBlinkLED.html#a8475f78f41d1a2d5d719bec8cbbb3ebb',1,'BlinkLED']]], + ['output',['output',['../classNoiseSource.html#a1af7449a5ae4a8acd34ac218c9eec6c1',1,'NoiseSource']]] +]; diff --git a/search/functions_e.html b/search/functions_e.html new file mode 100644 index 00000000..649b2c9a --- /dev/null +++ b/search/functions_e.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_e.js b/search/functions_e.js new file mode 100644 index 00000000..7b395f0a --- /dev/null +++ b/search/functions_e.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['pagesize',['pageSize',['../classEEPROM24.html#af33b23e2614f3966bbaf2554890c032a',1,'EEPROM24']]], + ['pause',['pause',['../classBlinkLED.html#a2760a0223cd6a0598b961f681ffb5c0a',1,'BlinkLED']]], + ['pixel',['pixel',['../classBitmap.html#a35aa38b377d509d6c4f061a0b988d203',1,'Bitmap']]], + ['play',['play',['../classMelody.html#a9fd8e0d48833d8da3cd3b3b58408b0b5',1,'Melody']]], + ['playonce',['playOnce',['../classMelody.html#aecc9185c9cb1246e8a55521b17d72932',1,'Melody']]], + ['prevfield',['prevField',['../classForm.html#acb080fe4f4631e9060e6efab8eaa0a90',1,'Form']]], + ['previouspin',['previousPin',['../classChaseLEDs.html#a27c460fcb341c2dc2fcf9341616eb525',1,'ChaseLEDs']]], + ['pwmled',['pwmLed',['../classCharlieplex.html#a89312f2fd1d27c4e56346ed9cccfb9f6',1,'Charlieplex']]] +]; diff --git a/search/functions_f.html b/search/functions_f.html new file mode 100644 index 00000000..386c7d46 --- /dev/null +++ b/search/functions_f.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_f.js b/search/functions_f.js new file mode 100644 index 00000000..02ed01e5 --- /dev/null +++ b/search/functions_f.js @@ -0,0 +1,18 @@ +var searchData= +[ + ['rand',['rand',['../classRNGClass.html#a418a833cf18198fd7e5d6dbd78c99c29',1,'RNGClass']]], + ['read',['read',['../classEEPROM24.html#a960971377d4decb122ff38d12603e586',1,'EEPROM24::read(unsigned long address)'],['../classEEPROM24.html#a63e23dc014415f947975359ac09f627e',1,'EEPROM24::read(unsigned long address, void *data, size_t length)'],['../classI2CMaster.html#a49eeebb57f6bc06de39973fe836369cd',1,'I2CMaster::read()'],['../classSoftI2C.html#a330dbba5b726fa161a6b01a9ca49e1bc',1,'SoftI2C::read()']]], + ['readalarm',['readAlarm',['../classDS1307RTC.html#aab608eb1630520ee122306b721fdc47a',1,'DS1307RTC::readAlarm()'],['../classDS3232RTC.html#a09c7073c687dcbbc423baf48074c7873',1,'DS3232RTC::readAlarm()'],['../classRTC.html#ade282d7a60147c3f0269f1fcd59c8d66',1,'RTC::readAlarm()']]], + ['readbyte',['readByte',['../classDS1307RTC.html#a7364609a201022688778ab116c3e4f4a',1,'DS1307RTC::readByte()'],['../classDS3232RTC.html#a5ba83a3ef7d65d45c2f3241afdd8fef7',1,'DS3232RTC::readByte()'],['../classRTC.html#a0f47b10b436e3f9d36e04ec907579431',1,'RTC::readByte()']]], + ['readdate',['readDate',['../classDS1307RTC.html#a6fb56d1690bc30e7995961a5b5e5fdc4',1,'DS1307RTC::readDate()'],['../classDS3232RTC.html#ab03358e3b5996e38d766e2f9f6ab62ca',1,'DS3232RTC::readDate()'],['../classRTC.html#aa1e21bf42ebd4456919744ae0f4f631e',1,'RTC::readDate()']]], + ['readonly',['readOnly',['../classTimeField.html#aa0795c873ba9941c8a1a3bf8c06668f1',1,'TimeField']]], + ['readtemperature',['readTemperature',['../classDS3232RTC.html#a0faf40c25ab019a326a60f301c2bb41b',1,'DS3232RTC::readTemperature()'],['../classRTC.html#aeca3c8387332e8cabfd09c1806276e5a',1,'RTC::readTemperature()']]], + ['readtime',['readTime',['../classDS1307RTC.html#acd9800d6df2244b8e4e790480a1d62a6',1,'DS1307RTC::readTime()'],['../classDS3232RTC.html#af89e68c68f1c4b7e94286f800b5b2747',1,'DS3232RTC::readTime()'],['../classRTC.html#aaf0a5c1f32f210a49718d148620b5bec',1,'RTC::readTime()']]], + ['refresh',['refresh',['../classCharlieplex.html#a3c961bfff866e400dad371f0376f096b',1,'Charlieplex::refresh()'],['../classDMD.html#a9e4bf2a9d247312d35c1401ff61261c8',1,'DMD::refresh()']]], + ['removefield',['removeField',['../classForm.html#a7abd717029f9b19ee7318470072cd697',1,'Form']]], + ['reset',['reset',['../classBLAKE2s.html#a778776d15316c182fdb2df5a89b3ca02',1,'BLAKE2s::reset()'],['../classBLAKE2s.html#a91ba6bc39e42002ac61114ced1d0af6d',1,'BLAKE2s::reset(uint8_t outputLength)'],['../classHash.html#a7b94309acaa5f52386785fb780e5be61',1,'Hash::reset()'],['../classSHA1.html#ab71aaf39ed956320054861a2fbfa454f',1,'SHA1::reset()'],['../classSHA256.html#ad9d80d8fdccffb15497bd36285afce65',1,'SHA256::reset()']]], + ['resume',['resume',['../classBlinkLED.html#a380241e4dfd20e8a558487227f2f4252',1,'BlinkLED']]], + ['rngclass',['RNGClass',['../classRNGClass.html#acbcf327242f51ae2d9209aeaa45e30e9',1,'RNGClass']]], + ['rtc',['RTC',['../classRTC.html#ada31c5120d18d2dd2863b3d440308da2',1,'RTC']]], + ['run',['run',['../classMelody.html#ad1103b970be1f59058cc7d927be68955',1,'Melody']]] +]; diff --git a/search/groups_0.html b/search/groups_0.html new file mode 100644 index 00000000..2090afa2 --- /dev/null +++ b/search/groups_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/groups_0.js b/search/groups_0.js new file mode 100644 index 00000000..ba9cdad3 --- /dev/null +++ b/search/groups_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['power_20saving_20utility_20functions',['Power saving utility functions',['../group__power__save.html',1,'']]] +]; diff --git a/search/pages_0.html b/search/pages_0.html new file mode 100644 index 00000000..c51c8345 --- /dev/null +++ b/search/pages_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/pages_0.js b/search/pages_0.js new file mode 100644 index 00000000..0a4d8fa1 --- /dev/null +++ b/search/pages_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['alarm_20clock',['Alarm Clock',['../alarm_clock.html',1,'']]] +]; diff --git a/search/pages_1.html b/search/pages_1.html new file mode 100644 index 00000000..2a98fce1 --- /dev/null +++ b/search/pages_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/pages_1.js b/search/pages_1.js new file mode 100644 index 00000000..f952a477 --- /dev/null +++ b/search/pages_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['blinking_20led_20example',['Blinking LED Example',['../blink_blink.html',1,'']]] +]; diff --git a/search/pages_2.html b/search/pages_2.html new file mode 100644 index 00000000..0711a0b4 --- /dev/null +++ b/search/pages_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/pages_2.js b/search/pages_2.js new file mode 100644 index 00000000..917aadd3 --- /dev/null +++ b/search/pages_2.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['charlieplexing_20example',['Charlieplexing Example',['../blink_charlieplex.html',1,'']]], + ['cylon_20eyes_20example',['Cylon Eyes Example',['../blink_cylon.html',1,'']]], + ['cryptographic_20library',['Cryptographic Library',['../crypto.html',1,'']]] +]; diff --git a/search/pages_3.html b/search/pages_3.html new file mode 100644 index 00000000..4310311a --- /dev/null +++ b/search/pages_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/pages_3.js b/search/pages_3.js new file mode 100644 index 00000000..5c3709d4 --- /dev/null +++ b/search/pages_3.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['dot_20matrix_20display_20demo',['Dot Matrix Display Demo',['../dmd_demo.html',1,'']]], + ['dumping_20infrared_20remote_20control_20codes',['Dumping Infrared Remote Control Codes',['../ir_dumpir.html',1,'']]] +]; diff --git a/search/pages_4.html b/search/pages_4.html new file mode 100644 index 00000000..ae5ce181 --- /dev/null +++ b/search/pages_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/pages_4.js b/search/pages_4.js new file mode 100644 index 00000000..e10a92e8 --- /dev/null +++ b/search/pages_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['form_20example_20for_20lcd_20displays',['Form example for LCD displays',['../lcd_form.html',1,'']]] +]; diff --git a/search/pages_5.html b/search/pages_5.html new file mode 100644 index 00000000..02c11148 --- /dev/null +++ b/search/pages_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/pages_5.js b/search/pages_5.js new file mode 100644 index 00000000..31dd37a2 --- /dev/null +++ b/search/pages_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['hello_20world_20for_20freetronics_20lcd',['Hello World for Freetronics LCD',['../lcd_hello_world.html',1,'']]] +]; diff --git a/search/pages_6.html b/search/pages_6.html new file mode 100644 index 00000000..afb70afd --- /dev/null +++ b/search/pages_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/pages_6.js b/search/pages_6.js new file mode 100644 index 00000000..623f2317 --- /dev/null +++ b/search/pages_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['running_20figure_20example',['Running figure example',['../dmd_running_figure.html',1,'']]] +]; diff --git a/search/pages_7.html b/search/pages_7.html new file mode 100644 index 00000000..9d7ba25f --- /dev/null +++ b/search/pages_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/pages_7.js b/search/pages_7.js new file mode 100644 index 00000000..c70dda2c --- /dev/null +++ b/search/pages_7.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['star_20trek_20example',['Star Trek Example',['../blink_startrek.html',1,'']]], + ['snake_20video_20game_20using_20an_20infrared_20remote_20control',['Snake Video Game Using an Infrared Remote Control',['../ir_snake.html',1,'']]] +]; diff --git a/search/search.css b/search/search.css index d18c1da8..4d7612ff 100644 --- a/search/search.css +++ b/search/search.css @@ -48,7 +48,7 @@ height:19px; background:url('search_m.png') repeat-x; border:none; - width:116px; + width:111px; margin-left:20px; padding-left:4px; color: #909090; @@ -236,3 +236,36 @@ DIV.searchresults { margin-left: 10px; margin-right: 10px; } + +/*---------------- External search page results */ + +.searchresult { + background-color: #F0F3F8; +} + +.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/search/search.js b/search/search.js index 140627b2..c4bdabff 100644 --- a/search/search.js +++ b/search/search.js @@ -7,16 +7,16 @@ var indexSectionsWithContent = { - 0: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111001111101111110100001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - 1: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111001001100001110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - 2: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110100001001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - 3: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111001111101111110000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - 4: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110101011000110000100010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - 5: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001001000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - 6: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - 7: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - 8: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - 9: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111101010000000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + 0: "abcdefghiklmnoprstuvwy~", + 1: "abcdefhilmnorst", + 2: "abcdilm", + 3: "abcdefghiklmnoprstuvw~", + 4: "abdfhimnswy", + 5: "cfp", + 6: "ds", + 7: "bds", + 8: "p", + 9: "abcdfhrs" }; var indexSectionNames = @@ -40,7 +40,7 @@ function convertToId(search) { var c = search.charAt(i); var cn = c.charCodeAt(0); - if (c.match(/[a-z0-9]/)) + if (c.match(/[a-z0-9\u0080-\uFFFF]/)) { result+=c; } @@ -345,22 +345,20 @@ function SearchBox(name, resultsPath, inFrame, label) var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); var code = searchValue.toLowerCase().charCodeAt(0); - var hexCode; - if (code<16) + var idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair { - hexCode="0"+code.toString(16); - } - else - { - hexCode=code.toString(16); + idxChar = searchValue.substr(0, 2); } var resultsPage; var resultsPageWithSearch; var hasResultsPage; - if (indexSectionsWithContent[this.searchIndex].charAt(code) == '1') + var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) { + var hexCode=idx.toString(16); resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; resultsPageWithSearch = resultsPage+'?'+escape(searchValue); hasResultsPage = true; diff --git a/search/typedefs_0.html b/search/typedefs_0.html new file mode 100644 index 00000000..8d6b78fe --- /dev/null +++ b/search/typedefs_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/typedefs_0.js b/search/typedefs_0.js new file mode 100644 index 00000000..32f26340 --- /dev/null +++ b/search/typedefs_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['color',['Color',['../classBitmap.html#a88d386944a7017aa776a177b10d8b2ba',1,'Bitmap']]] +]; diff --git a/search/typedefs_1.html b/search/typedefs_1.html new file mode 100644 index 00000000..455fe2b2 --- /dev/null +++ b/search/typedefs_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/typedefs_1.js b/search/typedefs_1.js new file mode 100644 index 00000000..58dd39bd --- /dev/null +++ b/search/typedefs_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['font',['Font',['../classBitmap.html#a456f7d6da03189c1e7148563a891b3cf',1,'Bitmap']]] +]; diff --git a/search/typedefs_2.html b/search/typedefs_2.html new file mode 100644 index 00000000..fac5dbac --- /dev/null +++ b/search/typedefs_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/typedefs_2.js b/search/typedefs_2.js new file mode 100644 index 00000000..e0c3fb61 --- /dev/null +++ b/search/typedefs_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['progmem',['ProgMem',['../classBitmap.html#a2fcc98fd7580932b218134126a29ce43',1,'Bitmap']]] +]; diff --git a/search/variables_0.html b/search/variables_0.html new file mode 100644 index 00000000..1b8adc9b --- /dev/null +++ b/search/variables_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_0.js b/search/variables_0.js new file mode 100644 index 00000000..5bfa9056 --- /dev/null +++ b/search/variables_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['alarm_5fcount',['ALARM_COUNT',['../classRTC.html#aee5ae8f600ee5296e65635c0d836fca3',1,'RTC']]], + ['auto_5frepeat',['AUTO_REPEAT',['../classIRreceiver.html#a9c37631cc1291dc47cabcfef2f631cf9',1,'IRreceiver']]] +]; diff --git a/search/variables_1.html b/search/variables_1.html new file mode 100644 index 00000000..78f63cd1 --- /dev/null +++ b/search/variables_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_1.js b/search/variables_1.js new file mode 100644 index 00000000..36e542f3 --- /dev/null +++ b/search/variables_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['black',['Black',['../classBitmap.html#a2c7faeeb89d3624b5bbca58871785adc',1,'Bitmap']]] +]; diff --git a/search/variables_2.html b/search/variables_2.html new file mode 100644 index 00000000..ea80d201 --- /dev/null +++ b/search/variables_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_2.js b/search/variables_2.js new file mode 100644 index 00000000..03f85a62 --- /dev/null +++ b/search/variables_2.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['day',['day',['../structRTCDate.html#a2d68ff3fb90240df522b41222362704c',1,'RTCDate']]], + ['decrement',['DECREMENT',['../classRTC.html#a05b1bd1479afc80682abdd4f3e58dc6f',1,'RTC']]] +]; diff --git a/search/variables_3.html b/search/variables_3.html new file mode 100644 index 00000000..0dca26f4 --- /dev/null +++ b/search/variables_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_3.js b/search/variables_3.js new file mode 100644 index 00000000..91827dd7 --- /dev/null +++ b/search/variables_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['flags',['flags',['../structRTCAlarm.html#a0f2ef7363cb60a26642d5295b77ca19e',1,'RTCAlarm']]] +]; diff --git a/search/variables_4.html b/search/variables_4.html new file mode 100644 index 00000000..400e8e9b --- /dev/null +++ b/search/variables_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_4.js b/search/variables_4.js new file mode 100644 index 00000000..5a04152a --- /dev/null +++ b/search/variables_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['hour',['hour',['../structRTCTime.html#a98ba717092ef856dd2b773ba02fcb1a4',1,'RTCTime::hour()'],['../structRTCAlarm.html#a75bdc42acd3ab3ad495680c6b6a34692',1,'RTCAlarm::hour()']]] +]; diff --git a/search/variables_5.html b/search/variables_5.html new file mode 100644 index 00000000..7f1241f9 --- /dev/null +++ b/search/variables_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_5.js b/search/variables_5.js new file mode 100644 index 00000000..c655f03c --- /dev/null +++ b/search/variables_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['increment',['INCREMENT',['../classRTC.html#aacbe3ebbf893685950b05327c11d5c37',1,'RTC']]] +]; diff --git a/search/variables_6.html b/search/variables_6.html new file mode 100644 index 00000000..7536df8d --- /dev/null +++ b/search/variables_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_6.js b/search/variables_6.js new file mode 100644 index 00000000..68579f17 --- /dev/null +++ b/search/variables_6.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['minute',['minute',['../structRTCTime.html#acf2161ca037080dc4b767e636ad8db84',1,'RTCTime::minute()'],['../structRTCAlarm.html#ad9a75ceb4b4b3474baa66dd5466e62fe',1,'RTCAlarm::minute()']]], + ['month',['month',['../structRTCDate.html#a6e6196059b36186041a5312400ea9202',1,'RTCDate']]] +]; diff --git a/search/variables_7.html b/search/variables_7.html new file mode 100644 index 00000000..66186a69 --- /dev/null +++ b/search/variables_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_7.js b/search/variables_7.js new file mode 100644 index 00000000..6ec22ad2 --- /dev/null +++ b/search/variables_7.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['no_5ftemperature',['NO_TEMPERATURE',['../classRTC.html#a9ed5480b362a83f1f45c4d3bcf7c3bf8',1,'RTC']]], + ['nofill',['NoFill',['../classBitmap.html#aa89170263dc1f51f6366c1907119715e',1,'Bitmap']]] +]; diff --git a/search/variables_8.html b/search/variables_8.html new file mode 100644 index 00000000..aa13bf24 --- /dev/null +++ b/search/variables_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_8.js b/search/variables_8.js new file mode 100644 index 00000000..93597922 --- /dev/null +++ b/search/variables_8.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['second',['second',['../structRTCTime.html#a87b7c02e535d808dcba04c77e34abb91',1,'RTCTime']]], + ['seed_5fsize',['SEED_SIZE',['../classRNGClass.html#ae3a013bfc73795fd26ee36e70d89f4c2',1,'RNGClass']]] +]; diff --git a/search/variables_9.html b/search/variables_9.html new file mode 100644 index 00000000..78cc249f --- /dev/null +++ b/search/variables_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_9.js b/search/variables_9.js new file mode 100644 index 00000000..5423c8ca --- /dev/null +++ b/search/variables_9.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['white',['White',['../classBitmap.html#a39b6754cfe50a457bbfdb1980fd87eb7',1,'Bitmap']]], + ['wrap',['WRAP',['../classRTC.html#a02ace2d775063be9a99035851c9274eb',1,'RTC']]] +]; diff --git a/search/variables_a.html b/search/variables_a.html new file mode 100644 index 00000000..592abaa3 --- /dev/null +++ b/search/variables_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_a.js b/search/variables_a.js new file mode 100644 index 00000000..d4472111 --- /dev/null +++ b/search/variables_a.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['year',['year',['../structRTCDate.html#a7d31822daff3c3fc947386abd897732f',1,'RTCDate']]] +]; diff --git a/structRTCAlarm.html b/structRTCAlarm.html index 7ae48e80..f7697b77 100644 --- a/structRTCAlarm.html +++ b/structRTCAlarm.html @@ -3,6 +3,7 @@ + ArduinoLibs: RTCAlarm Class Reference @@ -29,7 +30,7 @@ - + @@ -95,23 +96,26 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

    #include <RTC.h>

    - + + - + +

    +

    Public Attributes

    uint8_t hour
     Hour of the day for the alarm (0-23).
     
    uint8_t minute
     Minute of the hour for the alarm (0-59).
     
    uint8_t flags
     Additional flags for the alarm.
     Additional flags for the alarm. More...
     
    -

    Detailed Description

    +

    Detailed Description

    Stores alarm information from a realtime clock chip.

    -
    See Also
    RTCTime, RTCDate, RTC
    +
    See Also
    RTCTime, RTCDate, RTC

    Definition at line 42 of file RTC.h.

    -

    Member Data Documentation

    +

    Member Data Documentation

    @@ -136,9 +140,9 @@ uint8_t  diff --git a/structRTCDate.html b/structRTCDate.html index 9386955c..5433caf8 100644 --- a/structRTCDate.html +++ b/structRTCDate.html @@ -3,6 +3,7 @@ + ArduinoLibs: RTCDate Class Reference @@ -29,7 +30,7 @@
    - + @@ -95,21 +96,24 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

    #include <RTC.h>

    - + + +

    +

    Public Attributes

    unsigned int year
     Year (4-digit)
     
    uint8_t month
     Month of the year (1-12)
     
    uint8_t day
     Day of the month (1-31)
     
    -

    Detailed Description

    +

    Detailed Description

    Stores date information from a realtime clock chip.

    -
    See Also
    RTCTime, RTCAlarm, RTC
    +
    See Also
    RTCTime, RTCAlarm, RTC

    Definition at line 35 of file RTC.h.


    The documentation for this class was generated from the following files:
    - + @@ -95,21 +96,24 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

    #include <RTC.h>

    - + + +

    +

    Public Attributes

    uint8_t hour
     Hour of the day (0-23)
     
    uint8_t minute
     Minute within the hour (0-59)
     
    uint8_t second
     Second within the minute (0-59)
     
    -

    Detailed Description

    +

    Detailed Description

    Stores time information from a realtime clock chip.

    -
    See Also
    RTCDate, RTCAlarm, RTC
    +
    See Also
    RTCDate, RTCAlarm, RTC

    Definition at line 28 of file RTC.h.


    The documentation for this class was generated from the following files: