PropWare
C++ objects and CMake build system for Parallax Propeller
Home
Download
Getting Started
Documentation
Reference
About
Related Links
Namespace List
Class List
File List
Examples
Build System
File List
File Members
propsideworkspace
Learn
Examples
Badge
01 Display
04 Screen Auto ON OFF.c
1
/*
2
Screen Auto ON OFF.c
3
Turn automatic screen update off to make multiple updates to the screen
4
buffer before allowing the changes to appear. The screen_update function
5
can be used to manually update when changes are ready.
6
*/
7
8
#include "simpletools.h"
// Include simpletools library
9
#include "
badgetools.h
"
// Include badgetools library
10
11
void
main
()
// Main function
12
{
13
badge_setup
();
// Call badge setup
14
for
(
int
n = 0; n < 8; n++)
// Count 0 to 8
15
{
16
oledprint
(
"%d"
, n);
// Update with each number
17
pause(200);
// Pause 1/5 s
18
}
19
screen_auto
(
OFF
);
// Disable screen auto-update
20
cursor
(0, 1);
// Position cursor
21
22
// Changes in this loop don't appear
23
// until the screen_update call.
24
for
(
int
n =
'a'
; n <=
'h'
; n++)
// Count from a to h
25
{
26
oledprint
(
"%c"
, n);
// Print the character
27
pause(200);
// Wait 1/5 s
28
}
29
screen_update
();
// Make changes appear
30
}
screen_update
int screen_update(void)
Manually update the screen image after. Typically used after multiple oLED function calls after scree...
Definition:
oled_asmfast.c:426
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
main
int main(void)
Definition:
GraphicsTest.c:20
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
screen_auto
void screen_auto(int state)
Cause function calls like oledprint, point, and others to appear immediately after the function is ca...
Definition:
oled_auto.c:7
badgetools.h
This library provides convenient functions for a variety of Parallax eBadge operations.
cursor
void cursor(int col, int row)
Position the cursor to a certain column and row for printing text on the oLED display. Column can be 0 to 7 and row can be 0 or 1 in default LARGE text mode. In SMALL text mode, column can be 0 to 31, and row can be 0 to 7.
Definition:
oled_cursor.c:7
OFF
#define OFF
OFF can be used in place of zero to enabled parameters in functions like drive_feedback and drive_tri...
Definition:
abdrive.h:139
Generated on Sat Aug 27 2016 00:58:03 for PropWare by
1.8.12