首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >“BLIT_OP_COPY_L8”未在此作用域中声明/没有声明匹配“void::OSWrappers::taskYield()”

“BLIT_OP_COPY_L8”未在此作用域中声明/没有声明匹配“void::OSWrappers::taskYield()”
EN

Stack Overflow用户
提问于 2022-09-09 09:01:19
回答 1查看 19关注 0票数 0

我导入了一个TouchGFX项目(基于一个示例项目)并试图构建它,但是得到了以下错误:

代码语言:javascript
复制
TouchGFX/target/STM32H7DMA.cpp:151:42: error: 'BLIT_OP_COPY_L8' was not declared in this scope
  151 |                                        | BLIT_OP_COPY_L8
      |                                          ^~~~~~~~~~~~~~~


TouchGFX/target/OSWrappers.cpp:183:6: error: no declaration matches 'void touchgfx::OSWrappers::taskYield()'
  183 | void OSWrappers::taskYield()
      |      ^~~~~~~~~~
EN

回答 1

Stack Overflow用户

发布于 2022-09-09 09:23:17

以下几点为我解决了这个问题:

我将BLIT_OP_COPY_L8添加到BlitOp.hpp中的枚举(位域)中,在其中找到其他BLIT_OP_***值:

代码语言:javascript
复制
/** The Blit Operations. */
enum BlitOperations
{
    BLIT_OP_COPY = 1 << 0,                         ///< Copy the source to the destination
    BLIT_OP_FILL = 1 << 1,                         ///< Fill the destination with color
    BLIT_OP_COPY_WITH_ALPHA = 1 << 2,              ///< Copy the source to the destination using the given alpha
    BLIT_OP_FILL_WITH_ALPHA = 1 << 3,              ///< Fill the destination with color using the given alpha
    BLIT_OP_COPY_WITH_TRANSPARENT_PIXELS = 1 << 4, ///< Deprecated, ignored. (Copy the source to the destination, but not the transparent pixels)
    BLIT_OP_COPY_ARGB8888 = 1 << 5,                ///< Copy the source to the destination, performing per-pixel alpha blending
    BLIT_OP_COPY_ARGB8888_WITH_ALPHA = 1 << 6,     ///< Copy the source to the destination, performing per-pixel alpha blending and blending the result with an image-wide alpha
    BLIT_OP_COPY_A4 = 1 << 7,                      ///< Copy 4-bit source text to destination, performing per-pixel alpha blending
    BLIT_OP_COPY_A8 = 1 << 8,                      ///< Copy 8-bit source text to destination, performing per-pixel alpha blending
    BLIT_OP_COPY_L8 = 1 << 9    // !!! Added here !!!
};

实现了OSWrappers::taskYield(),但是OSWrappers类中缺少它,所以我在OSWrappers.hpp中添加了它:

代码语言:javascript
复制
class OSWrappers
{
public:
    /** Initialize framebuffer semaphore and queue/mutex for VSYNC signal. */
    static void initialize();
    /* ... */
    static void taskDelay(uint16_t ms);
    static void taskYield();    // !!! Added here !!!
};
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73659715

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档