2 Copyright (C) 2012 jaseg <s@jaseg.de>
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 version 3 as published by the Free Software Foundation.
12 void uart_puthex_nibble(uint8_t nibble
){
14 uart_putc('0'+nibble
);
16 uart_putc('A'+nibble
-0xA);
19 void uart_puthex(uint8_t data
){
20 uart_puthex_nibble(data
>4);
21 uart_puthex_nibble(data
&0xF);
24 void uart_puthex_16(uint16_t data
){
26 uart_puthex(data
&0xFF);
29 void uart_puthex_flip_16(uint16_t data
){
30 uart_puthex(data
&0xFF);
34 void uart_puthex_32(uint32_t data
){
35 uint16_t high
= data
>>16;
37 uint16_t low
= data
&0xFFFF;
41 void uart_puthex_flip_32(uint32_t data
){
42 uint16_t low
= data
&0xFFFF;
43 uart_puthex_flip_16(low
);
44 uint16_t high
= data
>>16;
45 uart_puthex_flip_16(high
);
48 void uart_putdec(uint8_t data
){