mirror of
https://github.com/travisgoodspeed/goodwatch
synced 2024-11-21 23:58:31 +00:00
Function to draw a decimal number on the screen.
This commit is contained in:
parent
df6c132e83
commit
0108caf7fe
@ -61,6 +61,17 @@ void lcd_digit(int pos, int digit){
|
||||
}
|
||||
}
|
||||
|
||||
//! Draws a decimal number on the screen.
|
||||
void lcd_number(long num){
|
||||
long bcd=0;
|
||||
int i;
|
||||
for(i=0;i<8;i++){
|
||||
bcd|=((num%10)<<(4*i));
|
||||
num/=10;
|
||||
}
|
||||
lcd_hex(bcd);
|
||||
}
|
||||
|
||||
//! Draws hex on the screen.
|
||||
void lcd_hex(long num){
|
||||
/* So in an ideal world, we'd have characters arranged nicely into
|
||||
|
Loading…
Reference in New Issue
Block a user