void create_ui(void* phy_fb, int screen_width, int screen_height, int color_bytes, struct EXTERNAL_GFX_OP* gfx_op) {
void create_ui(void* phy_fb, int screen_width, int screen_height, int color_bytes)
问题 ---------- 滑动没有这个案例
准备用layer试试先
正好这时候用的设计工具 开始吧
//#include "nrf_delay.h"
//os
#include "freertos.h"
#include "task.h"
void delay_ms(unsigned short nms)
{
// nrf_delay_ms(nms);
vTaskDelay(1000);
}
死机问题!!!!
死机
第一步
static c_surface_no_fb surface_no_fb(UI_WIDTH, UI_HEIGHT, color_bytes, gfx_op,
Z_ORDER_LEVEL_1, c_rect(LAYER_1_X, LAYER_1_Y, LAYER_1_X + LAYER_1_WIDTH - 1, LAYER_1_Y + LAYER_1_HEIGHT - 1));
第二步
class c_surface_no_fb : public c_surface {//No physical framebuffer, render with external graphic interface
friend class c_display;
public:
c_surface_no_fb(unsigned int width, unsigned int height, unsigned int color_bytes, struct EXTERNAL_GFX_OP* gfx_op,
Z_ORDER_LEVEL max_zorder = Z_ORDER_LEVEL_0, c_rect overlpa_rect = c_rect()) : c_surface(width, height, color_bytes, max_zorder, overlpa_rect), m_gfx_op(gfx_op) {}
protected:
第三部 就是上面的构造函数
c_surface(width, height, color_bytes, max_zorder, overlpa_rect), m_gfx_op(gfx_op) {}
第四部
c_surface(unsigned int width, unsigned int height, unsigned int color_bytes, Z_ORDER_LEVEL max_zorder = Z_ORDER_LEVEL_0, c_rect overlpa_rect = c_rect()) : m_width(width), m_height(height), m_color_bytes(color_bytes), m_fb(0), m_is_active(false), m_top_zorder(Z_ORDER_LEVEL_0), m_phy_fb(0), m_phy_write_index(0), m_display(0)
{
(overlpa_rect == c_rect()) ? set_surface(max_zorder, c_rect(0, 0, width - 1, height - 1)) : set_surface(max_zorder, overlpa_rect);
}
也就是 我以前从没用过lev1 我修改为lev0就可以了!!
继续研究LEV1
是的 上截图OK的
问题是函数的失败 我逻辑反了
int mylen=0;
char myfile[100]={0};
char my_log_out[100]={0};
void my_assert(const char* file, int line)
{
mylen = line;
memcpy(myfile,file,strlen(file));
return;
}
void my_logout(const char* log)
{
memset(my_log_out,0,100);
memcpy(my_log_out,log,strlen(log));
return;
}
void create_ui(void* phy_fb, int screen_width, int screen_height, int color_bytes, struct EXTERNAL_GFX_OP* gfx_op) {
register_debug_function(my_assert,my_logout);
这样的话
我们的代码在这里
3747行 真的话就会进来的!!!然后3751死机了
去掉3751的这句话while1 就好了!!!!!!!!!!!