Jump to content

baev_al

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by baev_al

  1. The problem with Hard Fault is solved. I used gdispGxxxx function - so I needed to create an GDisplay variable - and that caused a problem. I changed the function to gdispXxxx.

    Now I have another problem.

    In gfxconfig.h I defined

    #define GDISP_HARDWARE_DRAWPIXEL TRUE

    I added the function to the .c driver file


    #if GDISP_HARDWARE_DRAWPIXEL
    LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g)
    {
    LcdSendCommand(ST7735_CASET);
    LcdSendData(0x00);
    LcdSendData(g->p.x);
    LcdSendCommand(ST7735_RASET);
    LcdSendData(0x00);
    LcdSendData(g->p.y);
    LcdSendCommand(ST7735_RAMWR);
    LcdSendData(g->p.color);
    }
    #endif

    But I never get here. Stepping through the code showed that in this part of the code (gdisp.c)


    static GFXINLINE void drawpixel(GDisplay *g) {

    // Best is hardware accelerated pixel draw
    #if GDISP_HARDWARE_DRAWPIXEL
    #if GDISP_HARDWARE_DRAWPIXEL == HARDWARE_AUTODETECT
    if (gvmt(g)->pixel)
    #endif
    {
    gdisp_lld_draw_pixel(g);
    return;
    }

    when I try to step into gdisp_lld_pixel(g) the program just steps over...

  2. What display are you using? If the display module uses a controller that's already supported by the uGFX library then you don't have to do anything but implementing the board file. The board file contains a few functions which you have to implement so they send and receive data through SPI in your case.

    In case of your display controller is not yet supported you'll have to implement the driver yourself. We recommend having a look at some of the numerous existing drivers.

    Thank you for your support.

    I'am using a display with ST7735S driver. It seems there is no support for it yet.

    As an example I took SSD1289 driver.

    Am I right that my task is to make work the following functions (which use the functions communicating with hardware):

    set_cursor(GDisplay *g)

    set_viewport(GDisplay* g)

    gdisp_lld_init(GDisplay *g)

    Where is exactly the function sending the data to the LCD?

    Should I deal with dummy_read(g)?

    I added functions sending data and commands to board_ST7735S.h file as well as LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g).

    Here is the part of the main() function:

    gfxInit();

    gdispGDrawLine(g, 0,0, 128, 128, 0xFF);

    When I step throug the last function I achieve Hard Fault when the programm tries to reach drawpixel(g) in gdisp.c.

    What did I do wrong?

  3. Hello.

    I'm just started to quest through the uGFX. Does it make sence to use it with the attached schematic? I made the lcd work sending commands vis SPI. It seems I need to form this into driver... Can you please advise me what part of the documentation should I read?

    Thanks

    mcu.thumb.jpg.9bee3d46338800f3a9a9bb52f3

×
×
  • Create New...