OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [bootloaders/] [orpmon/] [include/] [screen.h] - Blame information for rev 274

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 marcus.erl
#ifndef SCREEN_H
2
#define SCREEN_H
3
 
4
#if CRT_ENABLED
5
#define RESX 640
6
#define RESY 480
7
#define CHAR_WIDTH 8
8
#define CHAR_HEIGHT 12
9
#define COLOR_BLACK 0x00
10
#define COLOR_WHITE 0xFF
11
 
12
#define CHARSX (RESX/CHAR_WIDTH)
13
#define CHARSY (RESY/CHAR_HEIGHT)
14
 
15
#define CRT_REG        (CRT_BASE_ADDR + 0)
16
#define CRT_PALLETE    (CRT_BASE_ADDR + 0x400)
17
#define CRT_BUFFER_REG (CRT_BASE_ADDR + 4)
18
#define PUT_PIXEL(x, y, color) (*(((unsigned char *)FB_BASE_ADDR) + (y) * RESX + (x)) = (color))
19
#define SET_PALLETE(i, r, g, b) (*(((unsigned long *)CRT_PALLETE) + (i)) = (((r) >> 3) << 11) | (((g) >> 2) << 5) | (((b) >> 3) << 0))
20
 
21
void put_char_xy (int x, int y, char c);
22
void put_char (char c);
23
void put_string (char *s);
24
void screen_clear (void);
25
void screen_init (void);
26
void screen_putc (char);
27
 
28
extern unsigned long fg_color;
29
extern unsigned long bg_color;
30
extern int cx;
31
extern int cy;
32
 
33
#endif /* CRT_ENABLED */
34
#endif
35
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.