rt-thread/bsp/raspberry-pi/raspi3-32/driver/drv_fb.h

60 lines
1.1 KiB
C
Raw Normal View History

2020-01-10 10:38:21 +08:00
/*
2021-03-14 12:58:10 +08:00
* Copyright (c) 2006-2021, RT-Thread Development Team
2020-01-10 10:38:21 +08:00
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2019-08-29 zdzn first version
*/
#ifndef __DRV_FB_H__
#define __DRV_FB_H__
#define RGB(r, g, b) ((((r))<<16) | (((g))<<8) | ((b)))
#define COLOR_BLACK RGB(0, 0, 0)
2021-03-14 12:58:10 +08:00
#define COLOR_GREEN RGB(0, 255, 0)
2020-01-10 10:38:21 +08:00
2021-03-14 12:58:10 +08:00
#define COLOR_CYAN RGB(0, 255, 255)
2020-01-10 10:38:21 +08:00
2021-03-14 12:58:10 +08:00
#define COLOR_RED RGB(255, 0, 0)
2020-01-10 10:38:21 +08:00
2021-03-14 12:58:10 +08:00
#define COLOR_YELLOW RGB(255, 255, 0)
#define COLOR_WHITE RGB(255, 255, 255)
2020-01-10 10:38:21 +08:00
#define CONSOLE_WHITE COLOR_WHITE
#define CONSOLE_BLACK COLOR_BLACK
#define CONSOLE_GREEN COLOR_GREEN
#define CONSOLE_CYAN COLOR_CYAN
#define CONSOLE_RED COLOR_RED
#define CONSOLE_YELLOW COLOR_YELLOW
typedef struct
{
rt_uint32_t width;
rt_uint32_t height;
rt_uint32_t vwidth;
rt_uint32_t vheight;
rt_uint32_t pitch;
rt_uint32_t depth;
rt_uint32_t fore;
rt_uint32_t back;
rt_uint32_t x;
rt_uint32_t y;
rt_uint32_t addr;
rt_uint32_t size;
} fb_t;
struct rt_hdmi_fb_device
{
struct rt_device parent;
fb_t fb;
};
2022-01-07 13:49:06 +08:00
extern fb_t fb_info;
2020-01-10 10:38:21 +08:00
void print_fb_info();
#endif/* __DRV_FB_H__ */