BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - raydem

Pages: [1] 2
1
Discussion - EVE / Re: Text with newline doesn't work
« on: November 09, 2022, 01:51:37 PM »
Quote
  Unfortunately, the FT81x series of EVE ICs does not support the '/n' character in its text commands, this accounts for the behaviour you are seeing with the ME812AU setting in ESD, new line interpretation is only supported in the BT81x series of EVE ICs.
There is the answer in the other post. And I used FT811.

Rudolph, thanks for checked it.

2
Discussion - EVE / Re: Text with newline doesn't work
« on: November 04, 2022, 12:47:54 PM »
hi,

Some news?

thanks.

3
Discussion - EVE / Re: Custom Fonts
« on: November 04, 2022, 12:43:33 PM »
hello,
I use compressed fonts(both .zlib). The EveSetFont and EveCmdText are inside of the  commands List with their needed list commands.

Code: [Select]
   

//These are the parameters for SetFont (DisplayCustomFont_t struct)

    fontData[0].address = 0x00000000u;
    fontData[0].font = 0u;
    fontData[0].firsChar = 32u;
    fontData[0].format = EVE_L2;
    fontData[0].height = 21u;
    fontData[0].width = 26u;
    fontData[0].stride = 7u;

    fontData[1].address = 0x00010000u;
    fontData[1].font = 1u;
    fontData[1].firsChar = 32u;
    fontData[1].format = EVE_L4;
    fontData[1].height = 21u;
    fontData[1].width = 26;
    fontData[1].stride = 13u;

// This is for SetFont, executed twice (for fondData[0] and fontData[1])
Private uint32 EveSetFont(const uint32 start, const DisplayCustomFont_t* const data)
{
    uint32 cont;

    cont = Write32BitsInArray(start, BITMAP_SOURCE(data->address));
    cont = Write32BitsInArray(cont, BITMAP_LAYOUT(data->format, data->stride, data->height));
    cont = Write32BitsInArray(cont, BITMAP_SIZE(EVE_NEAREST, EVE_BORDER, EVE_BORDER, data->width, data->height));

    cont = Write32BitsInArray(cont, CMD_SETFONT2);
    cont = Write32BitsInArray(cont, (uint32)data->font);
    cont = Write32BitsInArray(cont, data->address);
    cont = Write32BitsInArray(cont, (uint32)data->firsChar);
    cont = Write32BitsInArray(cont, END());

   return cont;
}

// This is for display text
Private uint32 EveCmdText(const uint32 start, const GraphicText_t* const data)
{
    const uint8 *textPtr = data->string;
    uint32 cont;
    uint32 textindex = 0uL;
    uint8 StringLength = data->len;
    uint32 commandSize;

    cont = Write32BitsInArray(start, DL_COLOR_RGB | data->color);

    cont = Write32BitsInArray(cont, CMD_TEXT);
    cont = Write32BitsInArray(cont, (((uint32)data->y0 << 16u) | ((uint32)data->x0  & 0xffffu)));
    cont = Write32BitsInArray(cont, (((uint32)data->option  << 16u) | ((uint32)data->font & 0xffffu)));

    commandSize = cont;

    while (textindex < data->len) {
        gpDataBuffer[++cont] = (uint8)textPtr[textindex];
        textindex++;
    }

    if (0x00u != textPtr[data->len - 1u]) {   
        cont++;
        gpDataBuffer[cont] = 0x00u;
        StringLength++;
    }

    StringLength = StringLength & 0x03u; /* 0, 1, 2 or 3 */
    StringLength = 4u-StringLength; /* 4, 3, 2 or 1 */
    StringLength &= 3u; /* 3, 2 or 1 */

    while (StringLength > 0u) {
        gpDataBuffer[++cont] = 0x00u;                     
        StringLength--;
    }

    EveIncCmdOffset(FifoWriteLocation, (uint16)commandSize); // Update fifo write

    return cont;
}


4
Discussion - EVE / Re: Text with newline doesn't work
« on: October 29, 2022, 12:41:51 AM »
Hi,
This is the strange symbol:


Code: [Select]
cmd_text(80, 60, 29, OPT_CENTER,"one two\nthree
four");
This code was copied from the programming guide, it is the reason for it has not the EVE_. I used Rudolph's code and the defines use prefix EVE_ .
Code: [Select]
#define EVE_OPT_CENTERY          1024u

5
Discussion - EVE / Re: Blind effect with draw images
« on: October 28, 2022, 11:48:15 PM »
Hi,

It Works!!!!  ;D ;D ;D
Thank you very much.

6
Discussion - EVE / Re: Blind effect with draw images
« on: October 28, 2022, 10:36:25 AM »
Hi,
Yes, always I use the same address, 0x00000000;
I will try your suggestion.
Thanks

7
Discussion - EVE / Re: Blind effect with draw images
« on: October 27, 2022, 03:51:36 PM »
Hi,
I check it read the REG_CMDB_SPACE register, if is equal to 0xFFC is the same that REG_CMD_READ==REG_CMD_WRITE.

Not black screen or corrupted data, the second image it is show like if the display draws line by line (horizontal line). Not draw the image complete is like animation.

8
Discussion - EVE / Re: Blind effect with draw images
« on: October 26, 2022, 01:32:05 PM »
Hi,
The order is:

Code: [Select]
Private GraphicServiceState_t EveCmdLoadimage(const GraphicLoadImage_t* const dataImage)
{
    uint32 i;

    LibBufOperResetBuffer(gpDataBuffer, 0u, GRAPHIC_MAX_TX_SIZE);

    addr = EVE_RAM_CMD + (uint32)FifoWriteLocation;

    gpDataBuffer[cont] = (uint8)((addr >> 16u) | MEM_WRITE);
    gpDataBuffer[++cont] = (uint8)(addr >> 8u);   
    gpDataBuffer[++cont] = (uint8)(addr);

    cont = Write32BitsInArray(cont, CMD_LOADIMAGE);
    cont = Write32BitsInArray(cont, dataImage->address);
    cont = Write32BitsInArray(cont, 0u);

    for(i = 0; i < dataImage->len; i++){                   // Save the image into the buffer to send it over SPI
        gpDataBuffer[++cont] = dataImage->data[i];           
    }

    padding = (uint8)(dataImage->len & 0x03u);
    padding = 4u-padding;
    padding &= 3u;
    EveIncCmdOffset(FifoWriteLocation, (uint16)padding);

    while (padding > 0u) {
        gpDataBuffer[++cont] = 0x00u;                           
        padding--;
    }

    SendGraphicData(++cont, 0u);  // Send gpDataBuffer over SPI

    EveMemWrite(SEND_32_BITS, REG_CMD_WRITE, (uint32)FifoWriteLocation);
}

Code: [Select]
Private void CheckIcState(const osMsgData data)
{
BOOL loop = TRUE;
while(loop){
EveReadAddress(REG_CMDB_SPACE, SEND_16_BITS);
cmdRead = ((uint16)((uint16)readSPI[1] << 8u) + (uint16)readSPI[0]);
if ((cmdRead & 0x0003u) != 0u) {
      EveMemWrite(SEND_8_BITS, REG_CPURESET, 0x01u);
EveMemWrite(SEND_32_BITS, REG_CMD_READ, RESET_CMD_STATE);
EveMemWrite(SEND_32_BITS, REG_CMD_WRITE, RESET_CMD_STATE);
EveMemWrite(SEND_8_BITS, REG_CPURESET, 0x00u);
loop = false;
}
else if (cmdRead != 0XFFC){
EveReadAddress(REG_CMDB_SPACE, SEND_16_BITS);
}
else {
loop = false;
}
}
}


Code: [Select]
Private void DrawListGraphic(const GraphicDrawImage_t *const data)
{
    uint32 cont = 0uL;

    const uint32 address = EVE_RAM_CMD + (uint32)FifoWriteLocation;

    gpDataBuffer[cont] = (uint8)((address >> 16u) | MEM_WRITE);
    gpDataBuffer[++cont] = (uint8)(address >> 8u);
    gpDataBuffer[++cont] = (uint8)(address & 0x000000ffu);

    cont = Write32BitsInArray(cont, CMD_DLSTART);
    cont = Write32BitsInArray(cont, DL_CLEAR_RGB | WHITE);
    cont = Write32BitsInArray(cont, DL_CLEAR | CLR_COL | CLR_STN | CLR_TAG);

    cont = EveSetBitmap(start, data->address , data->format, data->width, data->height);
    cont = Write32BitsInArray(cont, DL_COLOR_RGB | (uint32)data->color);
    cont = Write32BitsInArray(cont, BEGIN(EVE_BITMAPS));

    cont = Write32BitsInArray(cont, VERTEX2II((uint32)data->x0, (uint32)data->y0, (uint32)0u, (uint32)0u));
    cont = Write32BitsInArray(cont, END());

    cont = Write32BitsInArray(cont, DISPLAY());
    cont = Write32BitsInArray(cont, CMD_SWAP);
    SendGraphicData(++cont, 0u); // Send gpDataBuffer over SPI

    EveMemWrite(SEND_32_BITS, REG_CMD_WRITE, (uint32)FifoWriteLocation); // This method sends the fifoWriteLocation over SPI
                                                                                                                     // with SPI chip select actions.
}

Code: [Select]
Private void CheckIcState(const osMsgData data)
{
BOOL loop = TRUE;
while(loop){
EveReadAddress(REG_CMDB_SPACE, SEND_16_BITS);
cmdRead = ((uint16)((uint16)readSPI[1] << 8u) + (uint16)readSPI[0]);
if ((cmdRead & 0x0003u) != 0u) {
      EveMemWrite(SEND_8_BITS, REG_CPURESET, 0x01u);
EveMemWrite(SEND_32_BITS, REG_CMD_READ, RESET_CMD_STATE);
EveMemWrite(SEND_32_BITS, REG_CMD_WRITE, RESET_CMD_STATE);
EveMemWrite(SEND_8_BITS, REG_CPURESET, 0x00u);
loop = false;
}
else if (cmdRead != 0XFFC){
EveReadAddress(REG_CMDB_SPACE, SEND_16_BITS);
}
else {
loop = false;
}
}
}

9
Discussion - EVE / Text with newline doesn't work
« on: October 26, 2022, 11:22:20 AM »
Hi,
I want to use the newline function inside the string, but it only draws a strange symbol at the position of "\n". I checked the programming guide and says to only include the "\n" in the string. I am using the font 18.

Code: [Select]
cmd_text(80, 60, 29, OPT_CENTER,"one two\nthree
four");

I am using this
Code: [Select]
cmd_text(80, 60, 18, EVE_OPT_CENTERY,"User:\n");

10
Discussion - EVE / Re: Blind effect with draw images
« on: October 26, 2022, 10:20:02 AM »
Hi Rudolph,
Only with #define EVE_VSIZE (320u)  lint gives me this message:
Code: [Select]
#define EVE_VSIZE   (320u)  /* Tvd Number of visible lines (in lines) - display height */
".\Source\Config\ConfigGraphic.h" 20 9 Note 960: Violates MISRA 2004 Required Rule 20.2, Re-use of C90 identifier pattern: EVE_VSIZE because it begins with 'E' and a following uppercase letter

For me the Note is 960 not 980 in Rule 20.2

About the suggestions for a new prefix, I like your prefix EVE_ but if you want to avoid lint notes... maybe something like BT_EVE_ . But I think your prefix is ​​fine, and you shouldn't change it.


11
Discussion - EVE / Custom Fonts
« on: October 26, 2022, 09:03:37 AM »
Hello,
I am trying to use various custom fonts saved in RAM. I can draw with the font that I loaded first but not with the following ones. I guess the problem is the address to load the fonts. I use fonts converted and compressed with EAB 2.6.1. I am loading in RAM the raw file(.raw)

Code: [Select]

    #define EVE_RAM_G         0x00000000u

    FillDataLoadImage(0u, EVE_RAM_G, arial20_L2, sizeof(arial20_L2), INFLATE_IMAGE);   // index image, address in RAM, data, data size, format
    FillDataLoadImage(1u,  sizeof(arial20_L2), arial20_L4, sizeof(arial20_L4), INFLATE_IMAGE); // index image, address in RAM, data, data size, format

    Write32BitsInArray(start, CMD_SETFONT2);
    Write32BitsInArray(cont, (uint32)0u); //Font 0
    Write32BitsInArray(cont, EVE_RAM_G); // address
    Write32BitsInArray(cont, (uint32)32u); // first character

    Write32BitsInArray(start, CMD_SETFONT2);
    Write32BitsInArray(cont, (uint32)1u); //Font 1
    Write32BitsInArray(cont, sizeof(arial20_L2)); // address
    Write32BitsInArray(cont, (uint32)32u); // first character

12
Discussion - EVE / Re: Blind effect with draw images
« on: October 25, 2022, 06:36:47 PM »
Hi,
No, I am loading and drawing both images separately (one image follows the other image). The code will be executed twice, once for each image. The image to load is PNG.

Code: [Select]
Private uint32 Write32BitsInArray(const uint32 start, const uint32 data)
{
    uint32 cont = start;

    gpDataBuffer[++cont] = (uint8)(data);           
    gpDataBuffer[++cont] = (uint8)(data >> 8u);     
    gpDataBuffer[++cont] = (uint8)(data >> 16u);   
    gpDataBuffer[++cont] = (uint8)(data >> 24u);   

    EveIncCmdOffset(FifoWriteLocation, 4u);    // increment FifoWriteLocation 4 bytes

    return cont;
}
Private void DrawListGraphic(const GraphicDrawImage_t *const data)
{
    uint32 cont = 0uL;

    const uint32 address = EVE_RAM_CMD + (uint32)FifoWriteLocation;

    gpDataBuffer[cont] = (uint8)((address >> 16u) | MEM_WRITE);
    gpDataBuffer[++cont] = (uint8)(address >> 8u); 
    gpDataBuffer[++cont] = (uint8)(address & 0x000000ffu); 

    cont = Write32BitsInArray(cont, CMD_DLSTART);
    cont = Write32BitsInArray(cont, DL_CLEAR_RGB | WHITE);
    cont = Write32BitsInArray(cont, DL_CLEAR | CLR_COL | CLR_STN | CLR_TAG);

    cont = EveSetBitmap(start, data->address , data->format, data->width, data->height);
    cont = Write32BitsInArray(cont, DL_COLOR_RGB | (uint32)data->color);
    cont = Write32BitsInArray(cont, BEGIN(EVE_BITMAPS));

    cont = Write32BitsInArray(cont, VERTEX2II((uint32)data->x0, (uint32)data->y0, (uint32)0u, (uint32)0u));
    cont = Write32BitsInArray(cont, END());

    cont = Write32BitsInArray(cont, DISPLAY());
    cont = Write32BitsInArray(cont, CMD_SWAP);
    SendGraphicData(++cont, 0u); // Send gpDataBuffer over SPI

    EveMemWrite(SEND_32_BITS, REG_CMD_WRITE, (uint32)FifoWriteLocation); // This method sends the fifoWriteLocation over SPI 
                                                                                                                     // with SPI chip select actions.
}

Private GraphicServiceState_t EveCmdLoadimage(const GraphicLoadImage_t* const dataImage)
{
    uint32 i;

    LibBufOperResetBuffer(gpDataBuffer, 0u, GRAPHIC_MAX_TX_SIZE);

    addr = EVE_RAM_CMD + (uint32)FifoWriteLocation;

    gpDataBuffer[cont] = (uint8)((addr >> 16u) | MEM_WRITE);
    gpDataBuffer[++cont] = (uint8)(addr >> 8u);   
    gpDataBuffer[++cont] = (uint8)(addr);

    cont = Write32BitsInArray(cont, CMD_LOADIMAGE);
    cont = Write32BitsInArray(cont, dataImage->address);
    cont = Write32BitsInArray(cont, 0u);

    for(i = 0; i < dataImage->len; i++){                   // Save the image into the buffer to send it over SPI
        gpDataBuffer[++cont] = dataImage->data[i];           
    }

    padding = (uint8)(dataImage->len & 0x03u);
    padding = 4u-padding;
    padding &= 3u;
    EveIncCmdOffset(FifoWriteLocation, (uint16)padding);

    while (padding > 0u) {
        gpDataBuffer[++cont] = 0x00u;                           
        padding--;
    }

    SendGraphicData(++cont, 0u);  // Send gpDataBuffer over SPI

    EveMemWrite(SEND_32_BITS, REG_CMD_WRITE, (uint32)FifoWriteLocation);
}

13
Discussion - EVE / Re: Blind effect with draw images
« on: October 25, 2022, 10:19:45 AM »
Are you using DL_CLEAR at the beginnning of the display-list?

And I wonder about the comment:
//lint !e960 Violates MISRA 2004 Required Rule 20.2, Re-use of C90 identifier pattern

How is this identified as a MISRA 20.2 violation?

Yes, I use DL_CLEAR and DL_CLEAR_RGB.  About the lint is because the defines start with capital letter E.

14
Discussion - EVE / Re: Blind effect with draw images
« on: October 24, 2022, 10:01:46 PM »
Hello,

Thank you for yoru post.

Can you just confirm which version of EVE yo're using and how you are loading these subsequent full screen images (RAM_G or via flash)?

Best Regards,
BRT Community

Version EVE 3 with FT811. I load PNG image from the RAM_G

15
Discussion - EVE / Blind effect with draw images
« on: October 24, 2022, 12:10:46 PM »
Hello, 
I get a weird refresh effect (like a blind) when the screen draws a full image after the screen has shown a full image before. But when the screen displays, for example, a list and then draws a full image, it's fine.

This is the configuration:
Code: [Select]
#define EVE_VSIZE   (320u)  /* Tvd Number of visible lines (in lines) - display height */               //lint !e960 Violates MISRA 2004 Required Rule 20.2, Re-use of C90 identifier pattern
#define EVE_HSIZE   (240u)  /* Thd Length of visible part of line (in PCLKs) - display width */         //lint !e960 Violates MISRA 2004 Required Rule 20.2, Re-use of C90 identifier pattern

#define EVE_VSYNC0  (10u)   /* Tvf Vertical Front Porch */                                              //lint !e960 Violates MISRA 2004 Required Rule 20.2, Re-use of C90 identifier pattern
#define EVE_VSYNC1  (12u)   /* Tvf + Tvp Vertical Front Porch plus Vsync Pulse width */                 //lint !e960 Violates MISRA 2004 Required Rule 20.2, Re-use of C90 identifier pattern
#define EVE_VOFFSET (22u)   /* Tvf + Tvp + Tvb Number of non-visible lines (in lines) */                //lint !e960 Violates MISRA 2004 Required Rule 20.2, Re-use of C90 identifier pattern
#define EVE_VCYCLE  (343u)  /* Tv Total number of lines (visible and non-visible) (in lines) */         //lint !e960 Violates MISRA 2004 Required Rule 20.2, Re-use of C90 identifier pattern

#define EVE_HSYNC0  (16u)   /* Thf Horizontal Front Porch */                                            //lint !e960 Violates MISRA 2004 Required Rule 20.2, Re-use of C90 identifier pattern
#define EVE_HSYNC1  (36u)   /* Thf + Thp Horizontal Front Porch plus Hsync Pulse width */               //lint !e960 Violates MISRA 2004 Required Rule 20.2, Re-use of C90 identifier pattern
#define EVE_HOFFSET (76u)   /* Thf + Thp + Thb Length of non-visible part of line (in PCLK cycles) */   //lint !e960 Violates MISRA 2004 Required Rule 20.2, Re-use of C90 identifier pattern
#define EVE_HCYCLE  (317u)  /* Total length of line (visible and non-visible) (in PCLKs) */             //lint !e960 Violates MISRA 2004 Required Rule 20.2, Re-use of C90 identifier pattern

#define EVE_PCLK    (5u)    /* 60/5 = 12 MHz                                            */              //lint !e960 Violates MISRA 2004 Required Rule 20.2, Re-use of C90 identifier pattern
#define EVE_PCLKPOL (1u)    /* negative active clock edge                               */              //lint !e960 Violates MISRA 2004 Required Rule 20.2, Re-use of C90 identifier pattern
#define EVE_SWIZZLE (0u)    /* order of bits in each colour channel to be reserved.     */              //lint !e960 Violates MISRA 2004 Required Rule 20.2, Re-use of C90 identifier pattern
#define EVE_CSPREAD (0u)    /* helps reduce the switching noise                         */              //lint !e960 Violates MISRA 2004 Required Rule 20.2, Re-use of C90 identifier pattern

Pages: [1] 2