PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Examples
Badge
05 EEPROM Data Storage
01 Erase Badge EEPROM.c
1
/*
2
Erase Badge EEPROM.c
3
The contacts_eraseAll function erases all data from EEPROM addresses
4
32768..65535. The process takes about 20 s.
5
*/
6
7
#include "
simpletools.h
"
// Include simpletools library
8
#include "
badgetools.h
"
// Include badgetools library
9
10
void
main
()
// Main function
11
{
12
badge_setup
();
// Call badge setup
13
14
oledprint
(
"P17 to ERASE"
);
// User prompt
15
16
while
(1)
// Main loop
17
{
18
if
(
button
(5))
// If P17 button pressed
19
{
20
clear
();
// Clear display
21
oledprint
(
"Erasing Wait 20s"
);
// Message to user
22
contacts_eraseAll
();
// Erase
23
clear
();
// Display done
24
oledprint
(
"Done!"
);
25
}
26
}
27
}
28
29
clear
int clear(void)
Clear the display.
Definition:
oled_clear.c:7
simpletools.h
This library provides convenient functions for a variety of microcontroller I/O, timing,...
main
int main(void)
Definition:
GraphicsTest.c:20
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
oledprint
int oledprint(const char *fmt,...)
Use to display strings on the oLED display in a manner similar to displaying combinations of strings ...
Definition:
peb_text.c:4
badge_setup
int badge_setup(void)
Set up all available badge drivers. Call this function at the start of any given program to allow acc...
Definition:
badgealpha.c:29
badgetools.h
This library provides convenient functions for a variety of Parallax eBadge operations.
button
int button(int pad)
Gets the state of a touch button (1) pressed, (0) not pressed. Numbering {6, 5, 4,...
Definition:
jm_touchpads.c:70
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17