PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Simple Libraries
Social
libbadgetools
peb_contacts_eraseAll.c
1
#include "
simpletools.h
"
2
#include "
badgetools.h
"
3
4
int
i2cLock;
5
volatile
int
eei2cLock;
6
volatile
int
eei2cLockFlag;
7
volatile
int
eeRecCount, eeNextAddr, eeBadgeOk,
8
eeNext, eeRecsAddr, eeRecs,
9
eeRecHome, eeRecOffice;
10
volatile
int
eeHome;
11
12
void
contacts_eraseAll
()
13
{
14
//printi("EEPROM erase takes 20 seconds...");
15
unsigned
char
str[128];
16
for
(
int
i = 32768; i < 65536; i += 128)
17
{
18
memset(str, 255, 128);
19
ee_putStr
(str, 128, i);
20
}
21
//ee_badgeCheck();
22
eeRecCount = 0;
23
eeNextAddr = 0;
24
eeBadgeOk = 0;
25
eeNext = 0;
26
eeRecsAddr = 0;
27
eeRecs = 0;
28
eeRecHome = 32768;
29
eeRecOffice = 0;
30
//printi("Done!\n\n");
31
}
32
33
/*
34
TERMS OF USE: MIT License
35
36
Permission is hereby granted, free of charge, to any person obtaining a
37
copy of this software and associated documentation files (the "Software"),
38
to deal in the Software without restriction, including without limitation
39
the rights to use, copy, modify, merge, publish, distribute, sublicense,
40
and/or sell copies of the Software, and to permit persons to whom the
41
Software is furnished to do so, subject to the following conditions:
42
43
The above copyright notice and this permission notice shall be included in
44
all copies or substantial portions of the Software.
45
46
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
47
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
48
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
49
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
50
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
51
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
52
DEALINGS IN THE SOFTWARE.
53
*/
54
simpletools.h
This library provides convenient functions for a variety of microcontroller I/O, timing,...
ee_putStr
void ee_putStr(unsigned char *s, int n, int addr)
Store a string of byte values starting at a certain address in the Propeller Chip's dedicated EEPROM.
Definition:
eeprom_putStr.c:25
contacts_eraseAll
void contacts_eraseAll()
Erases user portion of EEPROM by placing 255 in each cell. This erasure affects addresses 32768 thr...
Definition:
peb_contacts_eraseAll.c:12
badgetools.h
This library provides convenient functions for a variety of Parallax eBadge operations.
Generated on Fri May 20 2022 16:48:05 for PropWare by
1.8.17