'BLIT_OP_COPY_L8' was not declared in this scope/no declaration matches 'void touchgfx::OSWrappers::taskYield()'

43 Views Asked by At

I imported a TouchGFX project (based on an example project) and tried to build it, but got the following errors:

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()
      |      ^~~~~~~~~~
1

There are 1 best solutions below

0
On

The following solved the issue for me:

I added BLIT_OP_COPY_L8 to the enumeration (bitfield) in BlitOp.hpp where I found the other BLIT_OP_*** values:

/** 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() was implemented but was missing from the OSWrappers class, so I added it to it in 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 !!!
};