📄 fb.h
字号:
/* Copyright (c) 2007 Massachusetts Institute of Technology * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *//** * fb.h - blue-steel frame buffer utilities * @author Russel Ryan * @author Natalia Chernenko * * Contains routines prodviding simple operations on the PS3 frame buffer */#ifndef _FB_H_#define _FB_H_//blue steel framebuffer utilities#define FB_NAME "/dev/fb0"#define BPP 4#define RGB32(r,g,b) (uint32_t)( (r << 16) | (g << 8) | b )//prototypesbool fb_init();void fb_shutdown();void fb_set_all_pixels(unsigned int color);void fb_set_all_pixels(unsigned char *buffer, unsigned int color);void fb_set_pixel(unsigned int x, unsigned int y, unsigned int color);void fb_set_pixel(unsigned char *buffer, unsigned int x, unsigned int y, unsigned int color);unsigned char* fb_get_buffer_addr(int buffer);unsigned char* fb_get_buffer_addr();void fb_flip_to_buffer(unsigned int next_buffer);void fb_flip_buffer();void fb_memcpy_frame(unsigned int *image, int width, int height);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -