Integrating smile's r0ket-nrf24l01-foo. Right now, it compiles.
[cerebrum.git] / util.h
blobd54e8a1105130bd3f5984738ce1fd80c720840b9
1 /*
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.
7 */
9 #ifndef __UTIL_H__
10 #define __UTIL_H__
11 #include <avr/io.h>
13 void uart_puthex_nibble(uint8_t nibble);
14 void uart_puthex(uint8_t data);
15 void uart_puthex_16(uint16_t data);
16 void uart_puthex_32(uint32_t data);
17 void uart_puthex_flip_16(uint16_t data);
18 void uart_puthex_flip_32(uint32_t data);
19 void uart_putdec(uint8_t data);
20 inline uint8_t min(uint8_t a, uint8_t b){
21 return a>b?b:a;
24 #endif//__UTIL_H__