add lvgl for xiuos
This commit is contained in:
@@ -239,6 +239,14 @@ static void DrvLcdSetPixel(uint16_t x, uint16_t y, uint16_t color)
|
||||
DrvLcdDataHalfWord(&color, 1);
|
||||
}
|
||||
|
||||
static void DrvLcdSetPixelDot(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2,void* color)
|
||||
{
|
||||
uint32 size = 0;
|
||||
size = (x2- x1 + 1)*(y2 - y1 + 1);
|
||||
DrvLcdSetArea(x1, y1, x2, y2);
|
||||
DrvLcdDataHalfWord(color, size);
|
||||
}
|
||||
|
||||
void LcdShowChar(uint16 x,uint16 y,uint8 num,uint8 size,uint16 color,uint16 back_color)
|
||||
{
|
||||
uint8 temp,t1,t;
|
||||
@@ -460,7 +468,7 @@ static uint32 LcdWrite(void *dev, struct BusBlockWriteParam *write_param)
|
||||
return -ERROR;
|
||||
}
|
||||
LcdWriteParam * show = (LcdWriteParam *)write_param->buffer;
|
||||
KPrintf("DEBUG TYPE %d X:%d Y:%d color %d\n",show->pixel_info.x_pos, show->pixel_info.y_pos, show->pixel_info.pixel_color);
|
||||
// KPrintf("DEBUG TYPE %d X1:%d X2:%d Y1:%d Y2:%d\n",show->type,show->pixel_info.x_startpos, show->pixel_info.x_endpos,show->pixel_info.y_startpos, show->pixel_info.y_endpos);
|
||||
if(0 == show->type) //output string
|
||||
{
|
||||
LcdShowString(show->string_info.x_pos,show->string_info.y_pos,show->string_info.width,show->string_info.height,show->string_info.font_size,show->string_info.addr,show->string_info.font_color,show->string_info.back_color);
|
||||
@@ -468,7 +476,8 @@ static uint32 LcdWrite(void *dev, struct BusBlockWriteParam *write_param)
|
||||
}
|
||||
else if(1 == show->type) //output dot
|
||||
{
|
||||
DrvLcdSetPixel(show->pixel_info.x_pos, show->pixel_info.y_pos, show->pixel_info.pixel_color);
|
||||
// DrvLcdSetPixel(show->pixel_info.x_pos, show->pixel_info.y_pos, show->pixel_info.pixel_color);
|
||||
DrvLcdSetPixelDot(show->pixel_info.x_startpos,show->pixel_info.y_startpos, show->pixel_info.x_endpos, show->pixel_info.y_endpos,show->pixel_info.pixel_color);
|
||||
return EOK;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -349,11 +349,11 @@ static void* BigMemMalloc(struct DynamicBuddyMemory *dynamic_buddy, x_size_t siz
|
||||
}
|
||||
|
||||
/* best-fit method */
|
||||
for (node = dynamic_buddy->mm_freenode_list[ndx].next;
|
||||
(ndx < MEM_LINKNRS ) && (node->size < allocsize);
|
||||
node = node->next) {
|
||||
ndx++;
|
||||
};
|
||||
for (node = dynamic_buddy->mm_freenode_list[ndx].next;
|
||||
(ndx < MEM_LINKNRS ) && (node->size < allocsize);
|
||||
node = node->next) {
|
||||
ndx++;
|
||||
};
|
||||
/* get the best-fit freeNode */
|
||||
if (node && (node->size >= allocsize)) {
|
||||
struct DynamicFreeNode *remainder;
|
||||
@@ -1167,7 +1167,7 @@ void MemoryInfo(uint32 *total_memory, uint32 *used_memory, uint32 *max_used_memo
|
||||
#ifdef TOOL_SHELL
|
||||
#include <shell.h>
|
||||
|
||||
void ShowBuddy(void);
|
||||
void ShowBuddy();
|
||||
void ShowMemory(void);
|
||||
/**
|
||||
* This function will list the statistic information about memory.
|
||||
@@ -1206,16 +1206,18 @@ void ShowBuddy(void)
|
||||
lock = CriticalAreaLock();
|
||||
KPrintf("\n\033[41;1mlist memory information\033[0m\n", __func__);
|
||||
for(int level = 0; level < MEM_LINKNRS; level++) {
|
||||
KPrintf("\n %s level [%d],memory size[2^%d] \n",__func__, level,level +6);
|
||||
KPrintf("%s level [%d],memory size[2^%d] \n",__func__, level,level +6);
|
||||
for (debug = &ByteManager.dynamic_buddy_manager.mm_freenode_list[level]; ; ) {
|
||||
if(debug->size > 0)
|
||||
KPrintf(" [current node %x,next node %x, size %u, flag %x]\n",debug, debug->next,debug->size,debug->flag);
|
||||
else
|
||||
KPrintf(" [listhead node %x,next node %x]\n",debug, debug->next);
|
||||
if(debug->next)
|
||||
{
|
||||
debug = debug->next;
|
||||
|
||||
if(debug->size == 0)
|
||||
if(debug->size > 0)
|
||||
KPrintf(" [current node %x,next node %x, size %u, flag %x]\n",debug, debug->next,debug->size,debug->flag);
|
||||
else
|
||||
KPrintf(" \n");
|
||||
}
|
||||
if(debug->size == 0 || NONE == debug->next)
|
||||
break;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -240,8 +240,8 @@ KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/knowing/tensorflow
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LIB_LV),y)
|
||||
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/lib/lvgl_new #
|
||||
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/lib/lvgl_new/examples/porting #
|
||||
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/lib/lvgl #
|
||||
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/lib/lvgl/examples/porting #
|
||||
|
||||
endif
|
||||
|
||||
|
||||
@@ -57,24 +57,26 @@ typedef struct
|
||||
uint16 y_pos;
|
||||
uint16 width;
|
||||
uint16 height;
|
||||
uint8 font_size;
|
||||
uint8 *addr;
|
||||
uint8 font_size;
|
||||
uint8 *addr;
|
||||
uint16 font_color;
|
||||
uint16 back_color;
|
||||
}LcdStringParam;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16 x_pos;
|
||||
uint16 y_pos;
|
||||
uint16 pixel_color;
|
||||
uint16 x_startpos;
|
||||
uint16 x_endpos;
|
||||
uint16 y_startpos;
|
||||
uint16 y_endpos;
|
||||
void* pixel_color;
|
||||
}LcdPixelParam;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char type;
|
||||
LcdPixelParam pixel_info;
|
||||
LcdStringParam string_info;
|
||||
LcdPixelParam pixel_info;
|
||||
}LcdWriteParam;
|
||||
|
||||
struct LcdDevDone
|
||||
|
||||
Reference in New Issue
Block a user