mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-09-30 02:09:48 +03:00
6cd21404cd
- physmem.c (calloc_phys_vec): malloc the vector instead of sbrk'ing it - ubb-vga.h (xlat_virt), physmem.c (xlat_one, xlat_virt): translate a vector of virtual addresses to physical addresses
54 lines
1.0 KiB
C
54 lines
1.0 KiB
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);
|
|
|
|
/* physmem.c */
|
|
|
|
void **calloc_phys_vec(size_t n, size_t size);
|
|
unsigned long *xlat_virt(void *const *v, size_t n);
|
|
|
|
/* 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 */
|