Three-pin 640x400 VGA Console Mode

Dependents:   projet_AWA_testVGA2

Files at this revision

API Documentation at this revision

Comitter:
Ivop
Date:
Wed Aug 10 11:31:23 2011 +0000
Parent:
3:ab761080df98
Child:
5:c34147b65f7d
Commit message:
documentation, 2nd draft

Changed in this revision

vga640x400.c Show annotated file Show diff for this revision Revisions of this file
vga640x400.h Show annotated file Show diff for this revision Revisions of this file
--- a/vga640x400.c	Wed Aug 10 11:24:28 2011 +0000
+++ b/vga640x400.c	Wed Aug 10 11:31:23 2011 +0000
@@ -35,15 +35,9 @@
  
 // -----------------------------------------------------------------------------------
 
-unsigned char text_buffer[80*25];   ///< 80x25 screen buffer, i.e. 25 lines of 80 characters.
-unsigned char *font;                ///< Pointer to the user supplied font.
-                                    ///< Each character is 8 pixels wide and 16 pixels high.
-                                    ///< The font consists of 16 groups of 256 bytes.
-                                    ///< i.e. 256 times the first byte of each character, then
-                                    ///< 256 times second byte of each character, and so on.
-                                    ///< This differs from the most common way bitmap fonts are
-                                    ///< ordered, so you have to preprocess your font data first.
-                                    
+unsigned char text_buffer[80*25];
+unsigned char *font;
+
 static unsigned line_counter;
 static unsigned char scanline0[100], scanline1[100];    // 100*8=800 color clocks
 static unsigned char *curline = scanline1+20;
@@ -257,13 +251,6 @@
 
 // -----------------------------------------------------------------------------------
 
-/** Initialize the VGA signal
- *
- * This function should be the very first thing you call, before doing anything else.
- * It turns off all peripherals, sets the main clock to 100MHz (instead of the 96MHz default of the mbed)
- * and switches on PWM, I2S and DMA.
- */
-
 void init_vga(void) {
     fl_power_off_all_peripherals();
 
--- a/vga640x400.h	Wed Aug 10 11:24:28 2011 +0000
+++ b/vga640x400.h	Wed Aug 10 11:31:23 2011 +0000
@@ -1,14 +1,22 @@
 #ifndef VGA640X400_H
 #define VGA640X400_H
 
-extern unsigned char text_buffer[80*25];
-extern unsigned char *font;
+extern unsigned char text_buffer[80*25]; ///< 80x25 screen buffer, i.e. 25 lines of 80 characters.
+extern unsigned char *font;              ///< Pointer to the user supplied font.
+                                         ///< Each character is 8 pixels wide and 16 pixels high.
+                                         ///< The font consists of 16 groups of 256 bytes.
+                                         ///< i.e. 256 times the first byte of each character, then
+                                         ///< 256 times second byte of each character, and so on.
+                                         ///< This differs from the most common way bitmap fonts are
+                                         ///< ordered, so you have to preprocess your font data first.
+                                    
 
-// Always call this as the very first thing in your application
-// as it resets the CPU clock to 100MHz. It also resets UART0
-// to 9600 baud with the new clock. All other peripherals are off
-// after a call to init_vga()
-
+/** Initialize the VGA signal
+ *
+ * This function should be the very first thing you call, before doing anything else.
+ * It turns off all peripherals, sets the main clock to 100MHz (instead of the 96MHz default of the mbed)
+ * and switches on PWM, I2S and DMA.
+ */
 void init_vga(void);
 
 #endif
\ No newline at end of file