Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //#include <ipst.h>
- const int GLCD_BLACK = 0;
- const int GLCD_WHITE = 1;
- const int GLCD_YELLOW = 2;
- unsigned char screen[128][128];
- void glcdPixel(unsigned int x, unsigned int y, unsigned int color) {
- screen[x][y] = color;
- }
- void glcdFillRect(unsigned int x, unsigned int y, unsigned width, unsigned int height, unsigned int color) {
- for(int i = 0; i < width; i++) {
- for(int j = 0; j < height; j++) {
- glcdPixel(x + i, y + j, color);
- }
- }
- }
- void glcdFillScreen(unsigned int color) {
- }
- void setup();
- void loop();
- #include <stdio.h>
- #include <string.h>
- int main() {
- memset(screen, 0, sizeof(screen));
- setup();
- for(int i = 0; i < 128; i++) {
- for(int j = 0; j < 128; j++) {
- putchar(screen[j][i] ? screen[j][i] + '0' : ' ');
- }
- putchar('\n');
- }
- return 0;
- }
- #define THAITEXT_CHAR unsigned char
- #define THAITEXT_CHAR_NEWLINE 0xFF
- #define THAITEXT_CHAR_ENDLINE THAITEXT_CHAR_NEWLINE
- #define THAITEXT_CHAR_WHITESPACE 0xFE
- #define THAITEXT_CHAR_COLOR 0xFD
- #define THAITEXT_CHAR_LINE_HEIGHT 12
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement