PicoVGA  1.0-cmake
VGA/TV display on Raspberry Pico
picovga.h
Go to the documentation of this file.
1 
7 #ifndef _PICOVGA_H
8 #define _PICOVGA_H
9 
25 
31 typedef signed char s8;
32 typedef unsigned char u8;
33 typedef signed short s16;
34 typedef unsigned short u16;
35 typedef signed long int s32;
36 typedef unsigned long int u32;
37 typedef signed long long int s64;
38 typedef unsigned long long int u64;
39 
40 typedef unsigned int uint;
41 
42 typedef unsigned char Bool;
43 #define True 1
44 #define False 0
45 
46 // NULL
47 #ifndef NULL
48 #ifdef __cplusplus
49 #define NULL 0
50 #else
51 #define NULL ((void*)0)
52 #endif
53 #endif
54 
55 // I/O port prefix
56 #define __IO volatile
57 
58 // request to use inline
59 #define INLINE __attribute__((always_inline)) inline
60 
61 // avoid to use inline
62 #define NOINLINE __attribute__((noinline))
63 
64 // weak function
65 #define WEAK __attribute__((weak))
66 
67 // align array to 4-bytes
68 #define ALIGNED __attribute__((aligned(4)))
69 
70 #define LED_PIN 25
71 
72 // ----------------------------------------------------------------------------
73 // Constants
74 // ----------------------------------------------------------------------------
75 
76 #define B0 (1<<0)
77 #define B1 (1<<1)
78 #define B2 (1<<2)
79 #define B3 (1<<3)
80 #define B4 (1<<4)
81 #define B5 (1<<5)
82 #define B6 (1<<6)
83 #define B7 (1<<7)
84 #define B8 (1U<<8)
85 #define B9 (1U<<9)
86 #define B10 (1U<<10)
87 #define B11 (1U<<11)
88 #define B12 (1U<<12)
89 #define B13 (1U<<13)
90 #define B14 (1U<<14)
91 #define B15 (1U<<15)
92 #define B16 (1UL<<16)
93 #define B17 (1UL<<17)
94 #define B18 (1UL<<18)
95 #define B19 (1UL<<19)
96 #define B20 (1UL<<20)
97 #define B21 (1UL<<21)
98 #define B22 (1UL<<22)
99 #define B23 (1UL<<23)
100 #define B24 (1UL<<24)
101 #define B25 (1UL<<25)
102 #define B26 (1UL<<26)
103 #define B27 (1UL<<27)
104 #define B28 (1UL<<28)
105 #define B29 (1UL<<29)
106 #define B30 (1UL<<30)
107 #define B31 (1UL<<31)
108 
109 #define BIT(pos) (1UL<<(pos))
110 
111 #define BIGINT 0x40000000 // big int value
112 
113 #define _T(a) a
114 
115 #define PI 3.14159265358979324
116 #define PI2 (3.14159265358979324*2)
117 
119 
120 // ----------------------------------------------------------------------------
121 // Includes
122 // ----------------------------------------------------------------------------
123 
138 extern const ALIGNED u8 FontBold8x8[2048];
139 extern const ALIGNED u8 FontBold8x14[3584];
140 extern const ALIGNED u8 FontBold8x16[4096];
141 extern const ALIGNED u8 FontBoldB8x14[3584];
142 extern const ALIGNED u8 FontBoldB8x16[4096];
143 extern const ALIGNED u8 FontGame8x8[2048];
144 extern const ALIGNED u8 FontIbm8x8[2048];
145 extern const ALIGNED u8 FontIbm8x14[3584];
146 extern const ALIGNED u8 FontIbm8x16[4096];
147 extern const ALIGNED u8 FontIbmTiny8x8[2048];
148 extern const ALIGNED u8 FontItalic8x8[2048];
149 extern const ALIGNED u8 FontThin8x8[2048];
150 
152 
153 
154 // PicoVGA includes
155 #include "define.h" // common definitions of C and ASM
156 #include "util/canvas.h" // canvas
157 #include "util/overclock.h" // overclock
158 #include "util/print.h" // print to attribute text buffer
159 #include "util/rand.h" // random number generator
160 #include "util/mat2d.h" // 2D transformation matrix
161 #include "util/pwmsnd.h" // PWM sound output
162 #include "vga_pal.h" // VGA colors and palettes
163 #include "vga_vmode.h" // VGA videomodes
164 #include "vga_layer.h" // VGA layers
165 #include "vga_screen.h" // VGA screen layout
166 #include "vga_util.h" // VGA utilities
167 #include "vga.h" // VGA output
168 
169 #endif
vga_vmode.h
VGA videomodes.
vga.h
Video/Library Initialization.
overclock.h
Overclock.
vga_util.h
VGA utilities.
vga_pal.h
VGA colors and palettes.
print.h
Print to attribute text buffer.
canvas.h
Canvas.
pwmsnd.h
PWM sound output.
rand.h
Random number generator.
mat2d.h
2D Transformation Matrix
define.h
VGA common definitions of C and ASM.
vga_screen.h
VGA screen layout.
vga_layer.h
VGA layers.