1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2025-04-21 12:27:27 +03:00

ubb-vga2: move image generation out of the main program

- ubb-vga2.c (session, grab): made the frame buffer "void *" and pass
  frame buffer resolution
- ubb-vga.h: color encoding and items shared between compilation units
- ubb-vga2.c (thres, pattern, grab), grabfb.c: move to grabfb.c
- ubb-vga2.c (map): make global, for use by grabfb.c
- ubb-vga2.c (pick, pattern, tricolor, grid): removed obsolete test
  image generators
- Makefile (OBJS, ubb-vga2): added grabfb.o
- Makefile (clean): remove only .o files
- Makefile (spotless): remove only executables
This commit is contained in:
Werner Almesberger
2011-04-27 20:59:29 -03:00
parent 625d9877ab
commit 8643e457fa
4 changed files with 93 additions and 93 deletions

33
ubb-vga/ubb-vga.h Normal file
View File

@@ -0,0 +1,33 @@
/*
* ubb-vga.h - Output video on UBB with more or less VGA timing
*
* Written 2011 by Werner Almesberger
* Copyright 2011 Werner Almesberger
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#ifndef UBB_VGA_H
#define UBB_VGA_H
#include <stdint.h>
#include <sys/types.h>
#define R_VAL (1 << 3)
#define G_VAL (1 << 0)
#define B_VAL (1 << 1)
#define Y_VAL (1 << 2)
void *map(off_t addr, size_t size);
extern uint8_t thres;
void grabfb(void *f, int xres, int yres);
#endif /* !UBB_VGA_H */