[bootloader]
- reduce memory footprint - bugfix writing last page git-svn-id: http://moon:8086/svn/projects/HendiControl@56 fda53097-d464-4ada-af97-ba876c37ca34
This commit is contained in:
@@ -20,36 +20,7 @@ void uart_putc(char c);
|
||||
char uart_getc(void);
|
||||
void uart_puts(char const *str);
|
||||
|
||||
inline void print_byte(char byte)
|
||||
{
|
||||
int i;
|
||||
unsigned char c, nibble;
|
||||
|
||||
for (i=0; i < 2; i++)
|
||||
{
|
||||
nibble = (char)((byte >> 4) & 0xF);
|
||||
byte <<= 4;
|
||||
|
||||
if (nibble < 10)
|
||||
c = nibble + '0';
|
||||
else
|
||||
c = nibble + 'A' - 10;
|
||||
|
||||
uart_putc(c);
|
||||
}
|
||||
}
|
||||
|
||||
inline void print_word(uint16_t word)
|
||||
{
|
||||
int i;
|
||||
unsigned char c;
|
||||
|
||||
for (i=0; i < 2; i++)
|
||||
{
|
||||
c = (char) (word >> 8);
|
||||
print_byte(c);
|
||||
word <<= 8;
|
||||
}
|
||||
}
|
||||
void print_byte(char byte);
|
||||
void print_word(uint16_t word);
|
||||
|
||||
#endif /* UART_H_ */
|
||||
Reference in New Issue
Block a user