Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

software/videomixer: framebuffer enable/disable

  • Loading branch information...
commit bb73558ccc13a01090b4230c9494204335984e12 1 parent 534dec6
@sbourdeauducq sbourdeauducq authored
Showing with 13 additions and 0 deletions.
  1. +13 −0 software/videomixer/main.c
View
13 software/videomixer/main.c
@@ -5,12 +5,15 @@
#include <uart.h>
#include <hw/csr.h>
#include <hw/flags.h>
+#include <console.h>
#include "dvisampler0.h"
#include "dvisampler1.h"
int main(void)
{
+ int c;
+
irq_setmask(0);
irq_setie(1);
uart_init();
@@ -28,6 +31,16 @@ int main(void)
while(1) {
dvisampler0_service();
dvisampler1_service();
+ if(readchar_nonblock()) {
+ c = readchar();
+ if(c == '1') {
+ fb_enable_write(1);
+ printf("Framebuffer is ON\n");
+ } else if(c == '0') {
+ fb_enable_write(0);
+ printf("Framebuffer is OFF\n");
+ }
+ }
}
return 0;
Please sign in to comment.
Something went wrong with that request. Please try again.