#define SDRAM_BASE_ADDR 0x28000000
static uint16_t *fb = (uint16_t *)SDRAM_BASE_ADDR;
void GLCD_DrawChar (unsigned int x, unsigned int y, unsigned int cw, unsigned int ch, unsigned char *c) {
unsigned int i, j, k, pixs;
k = (cw + 7)/8;
if (k == 1) {
for (j = 0; j < ch; j++) {
pixs = *(unsigned char *)c;
c += 1;
for (i = 0; i < cw; i++) {
#if (LANDSCAPE == 0)
fb[(y+j)*PHYS_XSZ + (x+i)] = Color[(pixs >> i) & 1];
#else
fb[(x+i)*PHYS_XSZ + (y+j)] = Color[(pixs >> i) & 1];
#endif
}
}
}
else if (k == 2) {
for (j = 0; j < ch; j++) {
pixs = *(unsigned short *)c;
c += 2;
for (i = 0; i < cw; i++) {
#if (LANDSCAPE == 0)
fb[(y+j)*PHYS_XSZ + (x+i)] = Color[(pixs >> i) & 1];
#else
fb[(x+i)*PHYS_XSZ + (y+j)] = Color[(pixs >> i) & 1];
#endif
}
}
}
}