Imported Upstream version 3.2.2
[debian/gnuradio] / usrp2 / firmware / lib / nonstdio.h
1 /* -*- c -*- */
2 /*
3  * Copyright 2007 Free Software Foundation, Inc.
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  */
18
19 #ifndef INCLUDED_NONSTDIO_H
20 #define INCLUDED_NONSTDIO_H
21
22 #include <stdio.h>
23 #include <usrp2_types.h>
24 #include <stddef.h>
25
26 void putstr(const char *s);             // cf puts, no added newline
27 void puthex4(unsigned long x);          // output 1 hex digit
28 void puthex8(unsigned long x);          // output 2 hex digits
29 void puthex16(unsigned long x);         // output 4 hex digits
30 void puthex32(unsigned long x);         // output 8 hex digits
31 void puthex4_nl(unsigned long x);       // ... followed by newline
32 void puthex8_nl(unsigned long x);
33 void puthex16_nl(unsigned long x);
34 void puthex32_nl(unsigned long x);
35 #define puthex puthex32
36 #define puthex_nl puthex32_nl
37 void newline();                         // putchar('\n')
38
39 void print_mac_addr(const unsigned char addr[6]);
40 void print_fxpt_freq(u2_fxpt_freq_t v);
41 void print_fxpt_gain(u2_fxpt_gain_t v);
42 void print_uint64(uint64_t v);
43
44 void print_buffer(uint32_t *buf, size_t n);
45
46 #endif /* INCLUDED_NONSTDIO_H */