layer案例的debug

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 就好了!!!!!!!!!!!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值