Hi, After mitigating ENET issue, I need use a graphic driver, after inserting SSD driver from QS-Wheather I code does'nt wrork. I am still new on this product and I plan finish read manuals on next week.
Code base come from SYSBIOS UDP echo where I added command interpreter from my linux code. It regularly get command and data from UDP buffer then dispatch it to draw routines but nothing appear on Display.
Initializazion is called after main init, draw has a simple call wrapper to use my original Linux code as is but I think something of SYSBIOS or TIRTOS interfere with device drivers.
Is some example of ready to use device driver available on examples?
Thank you
******************************************************
#include "drivers/kentec320x240x16_ssd2119.h"
Main init call:
BIOS_getCpuFreq(&cpuFreq);
cpuFreq.lo = 10*(cpuFreq.lo/12);
BIOS_setCpuFreq(&cpuFreq);
/* Call board init functions */
Board_initGeneral();
Board_initGPIO();
Board_initEMAC();
/* Turn on user LED */
GPIO_write(Board_LED0, Board_LED_ON);
Kentec320x240x16_SSD2119Init(cpuFreq.lo);
System_printf("Starting the UDP Echo example\nSystem provider is set to "
"SysMin. Halt the target to view any SysMin contents in"
" ROV.\n");
*************************************************************************************
Function calling low level pixel draw, this is not working...
#define makecol(r,g,b) ((((r) & 0x00f8) << 8) | \
(((g) & 0x00fc) << 3) | \
(((b) & 0x00f8) >> 3))
void *screen;
void putpixel(void *pvDisplayData, int32_t i32X,int32_t i32Y, uint32_t ui32Value)
{
Kentec320x240x16_SSD2119PixelDraw(pvDisplayData, i32X,i32Y,ui32Value);
}
void LCD_DrawB(char buf[])
{
// static int chline = 0;
int i,x,y,line;
int bit = 0x80;
x=byte2int(buf[RM_POS_XLO],buf[RM_POS_XHI]);
y=byte2int(buf[RM_POS_YLO],buf[RM_POS_YHI]);
line=buf[RM_POS_LCDD];
for(i=0;i<8;i++)
{
if(line&bit)
putpixel(screen, x+i, y/*+ chline*/, makecol( 128, 255, 128));
else
putpixel(screen, x+i, y/*+ chline*/, makecol( 30, 30, 0));
bit >>=1;
}
}