emWin & SHARP LS027B7DH01 LCD

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by Andrew on Tue Jul 23 01:33:49 MST 2013
Hi there,

   I am using the monochrome low power LCD in one of my projects. I implemented a frame buffer to which I can write (draw pixels) and which I can flush to the LCD through SPI interface & DMA and it works fine.
   I decided to try emWin GUI library, because it offers a lot of widgets and other cool stuff. Modified GUIConf & LCDConf configuration files to use GUIDRV_LIN_1 driver and GUICC_1 colour conversion, changed resolution and other settings. It compiled and runs fine. The only problem I have is bits order. Because the display is connected through the LPC1758 SSP interface which transmits MSB (most significant bit) first and the display is expecting LSB first I organised the frame buffer in the way where bits of all bytes swapped. So that I don't need to do swapping every time before I flush the buffer and my SetPixel is aware of that and handles it properly.
   The questions is how to configure the GUIDRV_LIN_1 driver or emWin so that they write to the frame buffer properly? I found in the documentation LCD_ENDIAN_BIG setting, changed it from 0 to 1 but it didn't make any difference.
   It seems to me that I need to write my own driver to handle it. They mention GUIDRV_Template in the emWin documentation but I have only the header file in the library I downloaded from the site. Does any one know if according to the licence agreement we are allowed to implement our own drivers?
   If we are, where can I find more information about the driver development on emWin?

    Bits order I need   7 6 5 4 3 2 1 0     7 6 5 4 3 2 1 0  ... ... ..
    Bits order emWin   0 1 2 3 4 5 6 7     0 1 2 3 4 5 6 7  ... ... ..

Thank you