Library to control a Graphics TFT connected to 4-wire SPI - revised for the Raio RA8875 Display Controller.

Dependents:   FRDM_RA8875_mPaint RA8875_Demo RA8875_KeyPadDemo SignalGenerator ... more

Fork of SPI_TFT by Peter Drescher

Issue: Issue when compiling

Hello, I want to develop an application with the RA8875 from buydisplay and a LPC1768, I have downloaded the demo example, and when I try to compile it, it reports an error: "[ERROR] In file included from .\RA8875\RA8875.cpp:13: ./RA8875/RA8875.h:3239:27: error: assigning to 'RetCode_t (FPointerDummy::*)(RA8875::filecmd_t, std::uint8_t *, std::uint16_t)' from incompatible type 'std::uint32_t (FPointerDummy::*)(std::uint32_t, std::uint8_t *, std::uint16_t)': type mismatch at 1st parameter ('RA8875::filecmd_t' vs 'std::uint32_t' (aka 'unsigned int')) method_callback = (uint32_t (FPointerDummy::*)(uint32_t, uint8_t *, uint16_t))method; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"

The error is reported with Keil 5 and Mbed Studio. Thank you so much for the work

Best regards

1 comment:

01 May 2022

This is an incredibly old Issue report - and in an area of the code that has changed a lot since the original MBED OS2 that this library was created for.

Callbacks and ISR are the two areas where I personally have not put in a lot of work. My personal projects stabilized on OS2 for a very long time. You can find in the code some attempts to circumvent this issue with MBED OS version checks.

for example, here was my attempt that sort-of worked, but I haven't found the right solution for OS6 [I can get it to compile, but at boot it crashes with an error about a mutex in an interrupt context]

    // Interrupt
    m_irq->mode(PullUp);
    #if MBED_VERSION >= MBED_ENCODE_VERSION(5,8,0)
    eventThread.start(callback(&queue, &EventQueue::dispatch_forever));
    m_irq->fall(queue.event(callback(this, &RA8875::TouchPanelISR)));
    #elif (MBED_MAJOR_VERSION >= 5) || (MBED_LIBRARY_VERSION > 127)
    m_irq->fall(callback(this, &RA8875::TouchPanelISR));
    #else
    m_irq->fall(this, &RA8875::TouchPanelISR);
    #endif

Let me appeal to experts in the newer MBED OS versions. If you can help refine this code to work from OS2 to OS6, or at least identify how to make it work right in OS6, I and others would appreciate it.