📄 libfbx-drivers.h
字号:
/* * libfbx-drivers.h -- Primary header file for libfbx drivers * (C)opyright 2000-2001 U4X Labs * * Written by: Paul Mundt <lethal@u4xlabs.com> * Mike Bourgeous <nitrogen@u4x.org> * Sat Sep 16 04:01:24 EDT 2000 * * $Id: libfbx-drivers.h,v 1.17 2001/03/03 01:34:43 lethal Exp $ * * Basic layout and system for hardware specific optimizations * for the libfbx system. * * See ChangeLog for modifications, CREDITS for credits. * * All source herein is copyright U4X Labs and its original author. * Any code modifications or additions are (C)opyright the original * author and U4X Labs respectively. * * libfbx is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * libfbx is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with libfbx; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */#ifndef __LIBFBX_DRIVERS_H#define __LIBFBX_DRIVERS_H#include <libfbx/libfbx.h>#ifdef __cplusplusextern "C" {#endif /* __cplusplus */#define BIT(x) (1UL << (x))struct fb_surface;typedef struct fb_module { char *id; /* Framebuffer Driver ID */ char *name; /* Name of Module */} fb_module;typedef struct fb_driver_ops { /* blit routines */ void (*draw_image)(struct fb_surface *src, struct fb_surface *dest, int x, int y); unsigned int has_draw_image : 1; /* line routines */ void (*line)(__s32, __s32, __s32, __s32, __s32, __s32, __s32, struct fb_surface *); unsigned int has_line : 1; /* filled rectangle routines */ void (*fill_rect)(__s32 x1, __s32 y1, __s32 x2, __s32 y2, __s32 r, __s32 g, __s32 b, struct fb_surface *surface); unsigned int has_fill_rect : 1; /* console blanking routines */ void (*blank)(int); unsigned int has_blank : 1; /* * writec routines * * Note: We have to call it writec() as putc() is already declared * in accordance with ANSI and POSIX.1. This should never be called * directly, use fb_putc() at all times. */ void (*writec)(__s32 x, __s32 y, __u32 c); unsigned int has_writec : 1;} fb_driver_ops;typedef struct fb_driver { void *handle; /* for dlopen() */ char id[32]; /* Driver ID */ /* init/exit routines */ int (*init)(void); void (*exit)(void); volatile __u8 *mmio_ctl; /* MMIO Base (if applicable) */ struct fb_driver_ops *ops; /* Operations the driver is capable of */} fb_driver;/* drivers/libfbx-gen.c */int fb_map_mmio_region();void fb_unmap_mmio_region();inline void fb_outb(__u32 idx, __u8 val);inline __u8 fb_inb(__u32 idx);inline void fb_outl(__u32 idx, __u32 val);inline __u32 fb_inl(__u32 idx);/* libfbx-modules.c */int fb_load_module(char *name);void fb_unload_module();extern fb_module fb_modules[];#ifdef __cplusplus}#endif /* __cplusplus */#endif /* __LIBFBX_DRIVERS_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -