blabla
vga640x400.h@6:1d73ad03f172, 2011-08-10 (annotated)
- Committer:
- Ivop
- Date:
- Wed Aug 10 11:40:55 2011 +0000
- Revision:
- 6:1d73ad03f172
- Parent:
- 5:c34147b65f7d
- Child:
- 7:746c1bf00d40
documentation, 4th draft
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Ivop | 0:78fa88bb24cb | 1 | #ifndef VGA640X400_H |
Ivop | 0:78fa88bb24cb | 2 | #define VGA640X400_H |
Ivop | 0:78fa88bb24cb | 3 | |
Ivop | 5:c34147b65f7d | 4 | /** |
Ivop | 5:c34147b65f7d | 5 | * @file vga640x400.h |
Ivop | 6:1d73ad03f172 | 6 | * Generate a 640x400 VGA signal. |
Ivop | 6:1d73ad03f172 | 7 | * |
Ivop | 6:1d73ad03f172 | 8 | * The following mbed pins are used: |
Ivop | 6:1d73ad03f172 | 9 | * DIP5 - Monochrome bitstream (connect to R, G and B through 470R resistors) |
Ivop | 6:1d73ad03f172 | 10 | * DIP8 - VSYNC |
Ivop | 6:1d73ad03f172 | 11 | * DIP25 - HSYNC |
Ivop | 6:1d73ad03f172 | 12 | * GND |
Ivop | 5:c34147b65f7d | 13 | */ |
Ivop | 5:c34147b65f7d | 14 | |
Ivop | 4:3f0bd68a4dda | 15 | extern unsigned char text_buffer[80*25]; ///< 80x25 screen buffer, i.e. 25 lines of 80 characters. |
Ivop | 4:3f0bd68a4dda | 16 | extern unsigned char *font; ///< Pointer to the user supplied font. |
Ivop | 4:3f0bd68a4dda | 17 | ///< Each character is 8 pixels wide and 16 pixels high. |
Ivop | 4:3f0bd68a4dda | 18 | ///< The font consists of 16 groups of 256 bytes. |
Ivop | 4:3f0bd68a4dda | 19 | ///< i.e. 256 times the first byte of each character, then |
Ivop | 6:1d73ad03f172 | 20 | ///< 256 times the second byte of each character, and so on. |
Ivop | 4:3f0bd68a4dda | 21 | ///< This differs from the most common way bitmap fonts are |
Ivop | 4:3f0bd68a4dda | 22 | ///< ordered, so you have to preprocess your font data first. |
Ivop | 4:3f0bd68a4dda | 23 | |
Ivop | 0:78fa88bb24cb | 24 | |
Ivop | 4:3f0bd68a4dda | 25 | /** Initialize the VGA signal |
Ivop | 4:3f0bd68a4dda | 26 | * |
Ivop | 4:3f0bd68a4dda | 27 | * This function should be the very first thing you call, before doing anything else. |
Ivop | 4:3f0bd68a4dda | 28 | * It turns off all peripherals, sets the main clock to 100MHz (instead of the 96MHz default of the mbed) |
Ivop | 4:3f0bd68a4dda | 29 | * and switches on PWM, I2S and DMA. |
Ivop | 4:3f0bd68a4dda | 30 | */ |
Ivop | 0:78fa88bb24cb | 31 | void init_vga(void); |
Ivop | 0:78fa88bb24cb | 32 | |
Ivop | 0:78fa88bb24cb | 33 | #endif |