void fb_print_force(const char* str) { size_t len = strlen(str); int i; for(i = 0; i < len; i++) { fb_putc(str[i]); } }
static void __preload QSD8xxxFbPutc(struct fbinfo *fbi, char c) { // Draw the character to the fb as usual fb_putc(fbi, c); // Only initiate DMA transfer after a newline if (c != '\n') return; // Initiate the DMA transfer to update the display QSD8xxxFbDmaData* data = (QSD8xxxFbDmaData*)fbi->putcFuncData; if (getMMUReg() & 0x1) { *(uint32 *)data->fbDmaSize = (fbi->scry << 16) | (fbi->scrx); *(uint32 *)data->fbDmaPhysFb = data->fbPhysAddr; *(uint32 *)data->fbDmaStride = fbi->scrx * 2; *(uint32 *)data->fbDmaStart = 0; } else { *(uint32 *)(0xaa200000 + 0x90004) = (fbi->scry << 16) | (fbi->scrx); *(uint32 *)(0xaa200000 + 0x90008) = data->fbPhysAddr; *(uint32 *)(0xaa200000 + 0x9000c) = fbi->scrx * 2; *(uint32 *)(0xaa200000 + 0x00044) = 0; } }
void fb_print_center(const char* str) { int i; int pad = (gFbTWidth-strlen(str))/2; for(i=0;i<pad;i++) { fb_putc(' '); } fb_print(str); }
// Write a positive decimal integer to the screen. void fb_putui(unsigned int i) { if (i == 0) { fb_putc('0'); return; } char c[32]; itoa(i,c); fb_write(c); }
void fb_print(const char* str) { if(!gFbDisplayText) return; unsigned int len = strlen(str); int i; for(i = 0; i < len; i++) { fb_putc(str[i]); } }
void fb_print_line(char c) { int i; for(i=0;i<gFbTWidth;i++) { fb_putc(c); } }
// Clear the framebuffer. void fb_clear() { int i; for (i = 0; i < FB_NUM_CELLS; ++i) fb_putc(0x20); // Put a whitespace. }
static int dputc (int c) { return fb_putc(c); }