Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
at24cxxx_defines.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2019 Otto-von-Guericke-Universität Magdeburg
3
*
4
* This file is subject to the terms and conditions of the GNU Lesser
5
* General Public License v2.1. See the file LICENSE in the top level
6
* directory for more details.
7
*/
8
19
#ifndef AT24CXXX_DEFINES_H
20
#define AT24CXXX_DEFINES_H
21
22
#include "
kernel_defines.h
"
23
24
#ifdef __cplusplus
25
extern
"C"
{
26
#endif
27
31
#define AT24CXXX_POLL_DELAY_US (1000UL)
32
35
#define AT24CXXX_CLEAR_BYTE (0x00)
36
46
#define AT24CXXX_DEF_DEV_ADDR (0x50)
47
55
#define AT24C01A_EEPROM_SIZE (128U)
56
59
#define AT24C01A_PAGE_SIZE (8U)
60
63
#define AT24C01A_PAGE_WRITE_DELAY_US (5000U)
64
67
#define AT24C01A_MAX_POLLS (1 + (AT24C01A_PAGE_WRITE_DELAY_US \
68
/ AT24CXXX_POLL_DELAY_US))
69
78
#define AT24C02_EEPROM_SIZE (256U)
79
82
#define AT24C02_PAGE_SIZE (8U)
83
86
#define AT24C02_PAGE_WRITE_DELAY_US (5000U)
87
90
#define AT24C02_MAX_POLLS (1 + (AT24C02_PAGE_WRITE_DELAY_US \
91
/ AT24CXXX_POLL_DELAY_US))
92
101
#define AT24C04_EEPROM_SIZE (512U)
102
105
#define AT24C04_PAGE_SIZE (16U)
106
109
#define AT24C04_PAGE_WRITE_DELAY_US (5000U)
110
113
#define AT24C04_MAX_POLLS (1 + (AT24C04_PAGE_WRITE_DELAY_US \
114
/ AT24CXXX_POLL_DELAY_US))
115
124
#define AT24C08A_EEPROM_SIZE (1024U)
125
128
#define AT24C08A_PAGE_SIZE (16U)
129
132
#define AT24C08A_PAGE_WRITE_DELAY_US (5000U)
133
136
#define AT24C08A_MAX_POLLS (1 + (AT24C08A_PAGE_WRITE_DELAY_US \
137
/ AT24CXXX_POLL_DELAY_US))
138
147
#define AT24C16A_EEPROM_SIZE (2048U)
148
151
#define AT24C16A_PAGE_SIZE (16U)
152
155
#define AT24C16A_PAGE_WRITE_DELAY_US (5000U)
156
159
#define AT24C16A_MAX_POLLS (1 + (AT24C16A_PAGE_WRITE_DELAY_US \
160
/ AT24CXXX_POLL_DELAY_US))
161
170
#define AT24C32_EEPROM_SIZE (4096U)
171
174
#define AT24C32_PAGE_SIZE (32U)
175
178
#define AT24C32_PAGE_WRITE_DELAY_US (10000U)
179
182
#define AT24C32_MAX_POLLS (1 + (AT24C32_PAGE_WRITE_DELAY_US \
183
/ AT24CXXX_POLL_DELAY_US))
184
193
#define AT24C64_EEPROM_SIZE (8192U)
194
197
#define AT24C64_PAGE_SIZE (32U)
198
201
#define AT24C64_PAGE_WRITE_DELAY_US (10000U)
202
205
#define AT24C64_MAX_POLLS (1 + (AT24C64_PAGE_WRITE_DELAY_US \
206
/ AT24CXXX_POLL_DELAY_US))
207
216
#define AT24C128_EEPROM_SIZE (16384U)
217
220
#define AT24C128_PAGE_SIZE (64U)
221
224
#define AT24C128_PAGE_WRITE_DELAY_US (5000U)
225
228
#define AT24C128_MAX_POLLS (1 + (AT24C128_PAGE_WRITE_DELAY_US \
229
/ AT24CXXX_POLL_DELAY_US))
230
239
#define AT24C256_EEPROM_SIZE (32768U)
240
243
#define AT24C256_PAGE_SIZE (64U)
244
247
#define AT24C256_PAGE_WRITE_DELAY_US (5000U)
248
251
#define AT24C256_MAX_POLLS (1 + (AT24C256_PAGE_WRITE_DELAY_US \
252
/ AT24CXXX_POLL_DELAY_US))
253
262
#define AT24C512_EEPROM_SIZE (65536U)
263
266
#define AT24C512_PAGE_SIZE (128U)
267
270
#define AT24C512_PAGE_WRITE_DELAY_US (5000U)
271
274
#define AT24C512_MAX_POLLS (1 + (AT24C512_PAGE_WRITE_DELAY_US \
275
/ AT24CXXX_POLL_DELAY_US))
276
285
#define AT24C1024_EEPROM_SIZE (131072U)
286
289
#define AT24C1024_PAGE_SIZE (256U)
290
293
#define AT24C1024_PAGE_WRITE_DELAY_US (5000U)
294
297
#define AT24C1024_MAX_POLLS (1 + (AT24C1024_PAGE_WRITE_DELAY_US \
298
/ AT24CXXX_POLL_DELAY_US))
299
308
#define AT24MAC_EEPROM_SIZE (256U)
309
312
#define AT24MAC_PAGE_SIZE (16U)
313
316
#define AT24MAC_PAGE_WRITE_DELAY_US (5000U)
317
320
#define AT24MAC_MAX_POLLS (1 + (AT24MAC_PAGE_WRITE_DELAY_US \
321
/ AT24CXXX_POLL_DELAY_US))
322
328
#if IS_USED(MODULE_AT24C1024)
329
#define AT24CXXX_EEPROM_SIZE (AT24C1024_EEPROM_SIZE)
330
#define AT24CXXX_PAGE_SIZE (AT24C1024_PAGE_SIZE)
331
#define AT24CXXX_MAX_POLLS (AT24C1024_MAX_POLLS)
332
#elif IS_USED(MODULE_AT24C512)
333
#define AT24CXXX_EEPROM_SIZE (AT24C512_EEPROM_SIZE)
334
#define AT24CXXX_PAGE_SIZE (AT24C512_PAGE_SIZE)
335
#define AT24CXXX_MAX_POLLS (AT24C512_MAX_POLLS)
336
#elif IS_USED(MODULE_AT24C256)
337
#define AT24CXXX_EEPROM_SIZE (AT24C256_EEPROM_SIZE)
338
#define AT24CXXX_PAGE_SIZE (AT24C256_PAGE_SIZE)
339
#define AT24CXXX_MAX_POLLS (AT24C256_MAX_POLLS)
340
#elif IS_USED(MODULE_AT24C128)
341
#define AT24CXXX_EEPROM_SIZE (AT24C128_EEPROM_SIZE)
342
#define AT24CXXX_PAGE_SIZE (AT24C128_PAGE_SIZE)
343
#define AT24CXXX_MAX_POLLS (AT24C128_MAX_POLLS)
344
#elif IS_USED(MODULE_AT24C64)
345
#define AT24CXXX_EEPROM_SIZE (AT24C64_EEPROM_SIZE)
346
#define AT24CXXX_PAGE_SIZE (AT24C64_PAGE_SIZE)
347
#define AT24CXXX_MAX_POLLS (AT24C64_MAX_POLLS)
348
#elif IS_USED(MODULE_AT24C32)
349
#define AT24CXXX_EEPROM_SIZE (AT24C32_EEPROM_SIZE)
350
#define AT24CXXX_PAGE_SIZE (AT24C32_PAGE_SIZE)
351
#define AT24CXXX_MAX_POLLS (AT24C32_MAX_POLLS)
352
#elif IS_USED(MODULE_AT24C16A)
353
#define AT24CXXX_EEPROM_SIZE (AT24C16A_EEPROM_SIZE)
354
#define AT24CXXX_PAGE_SIZE (AT24C16A_PAGE_SIZE)
355
#define AT24CXXX_MAX_POLLS (AT24C16A_MAX_POLLS)
356
#elif IS_USED(MODULE_AT24C08A)
357
#define AT24CXXX_EEPROM_SIZE (AT24C08A_EEPROM_SIZE)
358
#define AT24CXXX_PAGE_SIZE (AT24C08A_PAGE_SIZE)
359
#define AT24CXXX_MAX_POLLS (AT24C08A_MAX_POLLS)
360
#elif IS_USED(MODULE_AT24C04)
361
#define AT24CXXX_EEPROM_SIZE (AT24C04_EEPROM_SIZE)
362
#define AT24CXXX_PAGE_SIZE (AT24C04_PAGE_SIZE)
363
#define AT24CXXX_MAX_POLLS (AT24C04_MAX_POLLS)
364
#elif IS_USED(MODULE_AT24C02)
365
#define AT24CXXX_EEPROM_SIZE (AT24C02_EEPROM_SIZE)
366
#define AT24CXXX_PAGE_SIZE (AT24C02_PAGE_SIZE)
367
#define AT24CXXX_MAX_POLLS (AT24C02_MAX_POLLS)
368
#elif IS_USED(MODULE_AT24C01A)
369
#define AT24CXXX_EEPROM_SIZE (AT24C01A_EEPROM_SIZE)
370
#define AT24CXXX_PAGE_SIZE (AT24C01A_PAGE_SIZE)
371
#define AT24CXXX_MAX_POLLS (AT24C01A_MAX_POLLS)
372
#elif IS_USED(MODULE_AT24MAC)
373
#define AT24CXXX_EEPROM_SIZE (AT24MAC_EEPROM_SIZE)
374
#define AT24CXXX_PAGE_SIZE (AT24MAC_PAGE_SIZE)
375
#define AT24CXXX_MAX_POLLS (AT24MAC_MAX_POLLS)
376
#else
/* minimal */
377
#define AT24CXXX_EEPROM_SIZE (128U)
378
#define AT24CXXX_PAGE_SIZE (4U)
379
#define AT24CXXX_MAX_POLLS (6U)
380
#endif
381
383
#ifdef __cplusplus
384
}
385
#endif
386
387
#endif
/* AT24CXXX_DEFINES_H */
388
kernel_defines.h
Common macros and compiler attributes/pragmas configuration.
Generated on Tue Nov 24 2020 19:46:50 by
1.8.17