Created
December 21, 2010 12:22
-
-
Save orymate/749867 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* based on http://goo.gl/ArZG6 */ | |
#define X )*2+1 | |
#define _ )*2 | |
#define s ((((((((0 /* 8 parens for 8 bit, 16 for 16, etc) */ | |
unsigned char lcd_char_P[] = | |
{ | |
s X X X X X X _ _, | |
s X _ _ _ _ _ X _, | |
s X _ _ _ _ _ _ X, | |
s X _ _ _ _ _ X _, | |
s X X X X X X _ _, | |
s X _ _ _ _ _ _ _, | |
s X _ _ _ _ _ _ _, | |
s X _ _ _ _ _ _ _ | |
}; | |
#undef X | |
#undef _ | |
#undef s | |
#include <stdio.h> | |
int main() | |
{ | |
int i, j; | |
for (i = 0; i < 8; i++) { | |
for (j = 7; j >= 0; j--) { | |
putchar((lcd_char_P[i] >> j) & 1 ? 'x' : ' '); | |
} | |
putchar('\n'); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment