我导入了一个TouchGFX项目(基于一个示例项目)并试图构建它,但是得到了以下错误:
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()
| ^~~~~~~~~~发布于 2022-09-09 09:23:17
以下几点为我解决了这个问题:
我将BLIT_OP_COPY_L8添加到BlitOp.hpp中的枚举(位域)中,在其中找到其他BLIT_OP_***值:
/** 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中添加了它:
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 !!!
};https://stackoverflow.com/questions/73659715
复制相似问题