PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Examples
Badge
05 EEPROM Data Storage
02 View First and Last 64 Bytes with Terminal.c
1
/*
2
View First and Last 64 Bytes with Terminal.c
3
You'll be using SimpleIDE Terminal for this one, so make sure to click
4
the Run with Terminal button to load the program. (That holds for all
5
the EEPROM activities.) After erasure, the values are set to 255, which
6
is hexadecimal 0xFF. The dev_ee_show function displays EEPRM byte values.
7
Values that are not standard character codes are displayed as hexadecimal
8
values.
9
*/
10
11
#include "
simpletools.h
"
// Include simpletools library
12
#include "
badgetools.h
"
// Include badgetools library
13
14
void
main
()
// Main function
15
{
16
badge_setup
();
// Call badge setup
17
18
text_size
(
SMALL
);
// Use SimpleIDE Terminal prompt
19
oledprint
(
"Use SimpleIDE\n"
);
20
oledprint
(
"Run w Terminal\n"
);
21
oledprint
(
"button.\n\n"
);
22
oledprint
(
"View data with\n"
);
23
oledprint
(
"SimpleIDE Term."
);
24
25
print
(
"EEOPROM addresses 32768 to 32831\n"
);
// Display the memory
26
dev_ee_show
(64, 32768);
// This function does the work
27
print
(
"\n\n"
);
// Repeat for 2nd range
28
print
(
"EEOPROM addresses 65472 to 65535\n"
);
29
dev_ee_show
(64, 65535 - 64);
30
}
31
32
simpletools.h
This library provides convenient functions for a variety of microcontroller I/O, timing,...
print
int print(const char *format,...) __attribute__((format(printf
Print format "..." args to the default simple terminal device. The output is limited to 256 bytes.
main
int main(void)
Definition:
GraphicsTest.c:20
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
dev_ee_show
void dev_ee_show(int byteCount, int address)
Display EEPROM contents as a combination of printable characters and numeric values (when not printab...
Definition:
peb_dev_ee_show.c:12
badgetools.h
This library provides convenient functions for a variety of Parallax eBadge operations.
text_size
void text_size(int size)
Set the text size to either 32x16 pixel (LARGE) or 7x5 (SMALL) characters. Examples: text_size(LARGE)...
Definition:
oled_text_size.c:7
SMALL
#define SMALL
For setting oLED character size to 7x5 pixels. Example: text_size(SMALL).
Definition:
badgetools.h:200
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17