1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2024-11-05 04:49:44 +02:00
ben-blinkenlights/ubb-vga/ubb-vga.h
Werner Almesberger 6558f56de6 ubb-vga2: replaced threshold-based color mapping with color cube model
- ubb-vga.h (ccube_init, ccube_map), ccube.c: color mapper based on
  proximity in color cube
- grabfb.c (pattern, grabfb), ppmimg.c (pattern, convert): use the color
  cube mapper instead of inferios threshold-based mapping
- ubb-vga2.c (session): initialize the color cube
- ubb-vga.h (thres), grabfb.c (thres), ubb-vga2.c (usage, main): removed
  the threshold along with the option (-l) to set it
- Makefile (OBJS): added ccube.o
2011-04-28 01:18:03 -03:00

49 lines
935 B
C

/*
* 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);
/* ccube.c */
uint8_t ccube_map(uint8_t r, uint8_t g, uint8_t b);
void ccube_init(void);
/* grabfb.c */
void grabfb(void *f, int xres, int yres);
/* tstimg.c */
void tstimg(void *f, int xres, int yres);
/* ppmimg.c */
extern char *img_name;
void ppmimg(void *f, int xres, int yres);
#endif /* !UBB_VGA_H */