Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

software/videomixer: framebuffer enable/disable

  • Loading branch information...
commit bb73558ccc13a01090b4230c9494204335984e12 1 parent 534dec6
Sébastien Bourdeauducq authored May 12, 2013

Showing 1 changed file with 13 additions and 0 deletions. Show diff stats Hide diff stats

  1. 13  software/videomixer/main.c
13  software/videomixer/main.c
@@ -5,12 +5,15 @@
5 5
 #include <uart.h>
6 6
 #include <hw/csr.h>
7 7
 #include <hw/flags.h>
  8
+#include <console.h>
8 9
 
9 10
 #include "dvisampler0.h"
10 11
 #include "dvisampler1.h"
11 12
 
12 13
 int main(void)
13 14
 {
  15
+	int c;
  16
+
14 17
 	irq_setmask(0);
15 18
 	irq_setie(1);
16 19
 	uart_init();
@@ -28,6 +31,16 @@ int main(void)
28 31
 	while(1) {
29 32
 		dvisampler0_service();
30 33
 		dvisampler1_service();
  34
+		if(readchar_nonblock()) {
  35
+			c = readchar();
  36
+			if(c == '1') {
  37
+				fb_enable_write(1);
  38
+				printf("Framebuffer is ON\n");
  39
+			} else if(c == '0') {
  40
+				fb_enable_write(0);
  41
+				printf("Framebuffer is OFF\n");
  42
+			}
  43
+		}
31 44
 	}
32 45
 	
33 46
 	return 0;

0 notes on commit bb73558

Please sign in to comment.
Something went wrong with that request. Please try again.