linux framebuffer ѧϰ±Ê¼Ç¶þ£¨³ÌÐòÓÃÀý£©
1 ³ÌÐòÁ÷³Ìͼ¡£
2 sampleÀý×Ó
HI_S32 TDE_DrawGraphicSample()
{
HI_U32 u32Size;
HI_S32 s32Fd;
HI_U32 u32Times;
HI_U8* pu8Screen;
HI_U32 u32PhyAddr;
HI_S32 s32Ret = -1;
HI_U32 i = 0;
struct fb_fix_screeninfo stFixInfo;
struct fb_var_screeninfo stVarInfo;
struct fb_bitfield stR32 = {10, 5, 0};
struct fb_bitfield stG32 = {5, 5, 0};
struct fb_bitfield stB32 = {0, 5, 0};
struct fb_bitfield stA32 = {15, 1, 0};
//HI_UNF_DISPLAY_SetEnable(HI_TRUE);
/* 1. open tde device */
HI_TDE2_Open();
/* 2. framebuffer operation */
s32Fd = open("/dev/fb0", O_RDWR);
if (s32Fd == -1)
{
printf("open frame buffer device error\n");
goto FB_OPEN_ERROR;
}
stVarInfo.xres_virtual = SCREEN_WIDTH;
stVarInfo.yres_virtual = SCREEN_HEIGHT*2;
stVarInfo.xres = SCREEN_WIDTH;
stVarInfo.yres = SCREEN_HEIGHT;
stVarInfo.activate = FB_ACTIVATE_NOW;
stVarInfo.bits_per_pixel = 16;
stVarInfo.xoffset = 0;
stVarInfo.yoffset = 0;
stVarInfo.red = stR32;
stVarInfo.green = stG32;
stVarInfo.blu
Ïà¹ØÎĵµ£º
1. HCI²ãÐÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI) ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈÐÒé ......
°üÀ¨ÎÒ×Ô¼ºÔÚÄÚ£¬ºÜ¶àÈ˶ÔÄںˣ¬½ø³Ì£¬Ïß³Ìͬ²½¶¼²»ÊǺÜÇå³þ£¬ÏÂÃæÉÔ΢×ܽáһϣº
ÄÚºËͬ²½£º
Ö÷ÒªÊÇ·ÀÖ¹¶àºË´¦ÀíÆ÷ͬʱ·ÃÎÊÐÞ¸Äij¶Î´úÂ룬»òÕßÔÚ¶ÔÉ豸Çý¶¯³ÌÐò½øÐÐÁÙ½çÇø±£»¤¡£Ö÷ÒªÓÐһϼ¸ÖÖ·½Ê½£º
1. Mutex£¨»¥³â£©
Í·Îļþ£º
#include <linux/mutex.h>
³õʼ»¯·½·¨£º
DEFINE_MUTEX(name);»òÕß ......
ARGB8888
32λɫ,ARGB8888±íʾARGB¸÷´ú±í8룬A±íʾ͸Ã÷¶È£¬µ±ÎªffʱΪ·Ç͸Ã÷£¬RGB·Ö±ðΪºìÂÌÀ¶£¬ff±íʾ×îŨ¡£
ARGB1555
16λɫ 1 λ±íʾ ͸Ã÷¶È£¬ Ö»ÄÜÏÔʾÁ½ÖÖ״̬£¬Í¸Ã÷ºÍ·Ç͸Ã÷¡£
¡¾Ê²Ã´ÊÇFrameBuffer¡¿
FrameÖ¡£ºÄãËù¿´µ½µÄÆÁÄ»µÄͼÏñ£¬»òÕßÔÚÒ»¸ö´°¿ÚÖеÄͼÏñ£¬¾Í½ÐÒ»Ö¡¡£
Buffer»º³å£ºÒ»¶ÎRAM£¬ÓÃÀ´ÔÝ´æÍ¼ÏñÊý ......
1. µØÖ·¿Õ¼äµÄ¹ÜÀí
¡¡¡¡ÎïÀíµØÖ·¶¼ÊÇÓÐÄں˹ÜÀíµÄ£¬ node-->zone-->mem_map-->page, ËùÓеÄÎïÀíÒ³Ãæ¶¼ÔÚmem_mapÊý×éÖеÄÒ³Ö¡¶ÔÓ¦£¬ È»ºó²»Í¬µÄpageÓзÖΪDMA£¬normal£¬highmemÈý¸özone¡£
¡¡¡¡ÄÚºËÏßÐÔµØÖ·¿Õ¼ä£¬ ʵ¼ÊÉÏÖ»ÊǵͶËÄÚ´æ²ÅÓÐÏßÐÔµØÖ·£¬0---896MB²¿·Ö¡£
¡¡¡¡ÄÚºËÐéÄâµØÖ·£¬ µÍ¶ËÄÚ´æµÄÐéÄâµØÖ·ÓëÏ ......
ÕæÕý½Ó´¥linuxµ½ÏÖÔÚ½«½ü1ÄêÁË£¬ÓÉ×î³õµÄÃÅÍ⺺£¬µ½ÏÖÔڱȽϵÃÐÄÓ¦ÊÖµÄʹÓÃlinux£¬Íê³É¼¸ºõËùÓй¤×÷£¬°üÀ¨³ÌÐò¿ª·¢¡¢±¾µØÏµÍ³Î¬»¤¡¢½»Á÷¡¢ÓéÀֵȹ¦ÄÜ£¬ËãÊÇÊÕ»ñÆÄ·áÁË¡£
×ܽáÁËÒ»ÏÂ×Ô¼ºÓÃÆðÀ´¸Ð¾õ²»´íµÄlinux¹¤¾ß£º(²»·Ö˳Ðò£¬linux·¢ÐаæÓõÄÊÇfedora 10)
1. ±à¼Æ÷: vim (Ààuinxƽ̨ÉϹ«ÈÏ×î¾µäµÄ£¬Ã»»°Ëµ)
2. ³ÌÐò¿ª ......