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
Propeller GCC Demos
sidetv
TvText.h
1
19
#ifndef __TV_TEXT__
20
#define __TV_TEXT__
21
22
#include <stdint.h>
23
27
#define TV_TEXT_WHITE_BLUE 0
28
#define TV_TEXT_WHITE_RED 1
29
#define TV_TEXT_YELLOW_BROWN 2
30
#define TV_TEXT_GREY_WHITE 3
31
#define TV_TEXT_CYAN_DARKCYAN 4
32
#define TV_TEXT_GREEN_WHITE 5
33
#define TV_TEST_RED_PINK 6
34
#define TV_TEXT_CYAN_BLUE 7
35
36
#define TV_TEXT_COLORS 8
37
41
#define TV_TEXT_PAL_WHITE_BLUE 0
42
#define TV_TEXT_PAL_WHITE_RED 2
43
#define TV_TEXT_PAL_YELLOW_BROWN 4
44
#define TV_TEXT_PAL_GREY_WHITE 6
45
#define TV_TEXT_PAL_CYAN_DARKCYAN 8
46
#define TV_TEXT_PAL_GREEN_WHITE 10
47
#define TV_TEST_PAL_RED_PINK 12
48
#define TV_TEXT_PAL_CYAN_BLUE 14
49
50
55
#define TV_TEXT_COLORTABLE_SIZE 8*2
56
60
#define TV_TEXT_COLS 42
61
65
#define TV_TEXT_ROWS 14
66
70
#define TV_TEXT_SCREENSIZE (TV_TEXT_COLS * TV_TEXT_ROWS)
71
75
#define TV_TEXT_LASTROW (TV_TEXT_SCREENSIZE-TV_TEXT_COLS)
76
80
typedef
enum
{
81
TV_TEXT_STAT_DISABLED,
82
TV_TEXT_STAT_INVISIBLE,
83
TV_TEXT_STAT_VISIBLE
84
} tvTextStat_t;
85
89
typedef
struct
_tv_text_struct
90
{
91
uint32_t status ;
//0/1/2 = off/invisible/visible read-only
92
uint32_t enable ;
//0/non-0 = off/on write-only
93
uint32_t pins ;
//%pppmmmm = pin group, pin group mode write-only
94
uint32_t mode ;
//%tccip = tile,chroma,interlace,ntsc/pal write-only
95
uint16_t *
screen
;
//pointer to screen (words) write-only
96
uint32_t *colors ;
//pointer to colors (longs) write-only
97
uint32_t ht ;
//horizontal tiles write-only
98
uint32_t vt ;
//vertical tiles write-only
99
uint32_t hx ;
//horizontal tile expansion write-only
100
uint32_t vx ;
//vertical tile expansion write-only
101
uint32_t ho ;
//horizontal offset write-only
102
uint32_t vo ;
//vertical offset write-only
103
uint32_t broadcast ;
//broadcast frequency (Hz) write-only
104
uint32_t auralcog ;
//aural fm cog write-only
105
}
TvText_t
;
106
107
/*
108
* TV_Text public API
109
*/
110
117
int
tvText_start(
int
basepin);
118
122
void
tvText_stop(
void
);
123
128
void
tvText_str(
char
* sptr);
129
134
void
tvText_dec(
int
value);
135
141
void
tvText_hex(
int
value,
int
digits);
142
148
void
tvText_bin(
int
value,
int
digits);
149
167
void
tvText_out(
int
c);
168
174
int
tvText_outchar(
char
c);
175
192
void
tvText_setColorPalette(
char
* palette);
193
194
/*
195
* TV_Text getTile gets tile data from x,y position
196
* See header file for more details.
197
*/
198
uint16_t tvText_getTile(
int
x,
int
y);
199
200
/*
201
* TV_Text setTile sets tile data at x,y position
202
* @param x is screen column position
203
* @param y is screen row position
204
* @param tile is tile index
205
*/
206
void
tvText_setTile(
int
x,
int
y, uint16_t tile);
207
208
/*
209
* TV_Text setTileColor sets tile data color at x,y position
210
* @param x is screen column position
211
* @param y is screen row position
212
* @returns tile color palette index
213
*/
214
uint16_t tvText_getTileColor(
int
x,
int
y);
215
216
/*
217
* TV_Text setTileColor sets tile data color at x,y position
218
* @param x is screen column position
219
* @param y is screen row position
220
* @param tile color palette index
221
*/
222
void
tvText_setTileColor(
int
x,
int
y, uint16_t color);
223
229
void
tvText_setCurPosition(
int
x,
int
y);
230
236
void
tvText_setCoordPosition(
int
x,
int
y);
237
243
void
tvText_setXY(
int
x,
int
y);
244
249
void
tvText_setX(
int
value);
250
255
void
tvText_setY(
int
value);
256
261
int
tvText_getX(
void
);
262
267
int
tvText_getY(
void
);
268
273
void
tvText_setColors(
int
value);
274
279
int
tvText_getColors(
void
);
280
285
int
tvText_getColumns(
void
);
286
291
int
tvText_getRows(
void
);
292
297
void
print(
char
* s);
298
303
// void putchar(char c); // let stdio.h define
304
305
306
#endif
307
//__TV_TEXT__
308
309
/*
310
+------------------------------------------------------------------------------------------------------------------------------+
311
¦ TERMS OF USE: MIT License ¦
312
+------------------------------------------------------------------------------------------------------------------------------¦
313
¦Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation ¦
314
¦files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, ¦
315
¦modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software¦
316
¦is furnished to do so, subject to the following conditions: ¦
317
¦ ¦
318
¦The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.¦
319
¦ ¦
320
¦THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE ¦
321
¦WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR ¦
322
¦COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ¦
323
¦ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ¦
324
+------------------------------------------------------------------------------------------------------------------------------+
325
*/
326
327
screen
Definition:
badgetools.h:1610
_tv_text_struct
Definition:
TvText.h:89
Generated on Sat Aug 27 2016 00:58:10 for PropWare by
1.8.12