Statistics
| Branch: | Tag: | Revision:

root / firmware / zpu / lib / nonstdio.h @ 22ed61f9

History | View | Annotate | Download (1.64 KB)

1
//
2
// Copyright 2010 Ettus Research LLC
3
//
4
/*
5
 * Copyright 2007 Free Software Foundation, Inc.
6
 *
7
 * This program is free software: you can redistribute it and/or modify
8
 * it under the terms of the GNU General Public License as published by
9
 * the Free Software Foundation, either version 3 of the License, or
10
 * (at your option) any later version.
11
 *
12
 * This program is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 * GNU General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU General Public License
18
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
 */
20

    
21
#ifndef INCLUDED_NONSTDIO_H
22
#define INCLUDED_NONSTDIO_H
23

    
24
#include <stdio.h>
25
#include <stdint.h>
26
#include <stddef.h>
27

    
28
void putstr(const char *s);                // cf puts, no added newline
29
void puthex4(unsigned long x);                // output 1 hex digit
30
void puthex8(unsigned long x);                // output 2 hex digits
31
void puthex16(unsigned long x);                // output 4 hex digits
32
void puthex32(unsigned long x);                // output 8 hex digits
33
void puthex4_nl(unsigned long x);        // ... followed by newline
34
void puthex8_nl(unsigned long x);
35
void puthex16_nl(unsigned long x);
36
void puthex32_nl(unsigned long x);
37
#define puthex puthex32
38
#define puthex_nl puthex32_nl
39
void newline();                                // putchar('\n')
40

    
41
void print_mac_addr(const unsigned char addr[6]);
42
void print_uint64(uint64_t v);
43

    
44
void print_buffer(uint32_t *buf, size_t n);
45
//char *itoa(signed long value, char *result, int base);
46
//void reverse(char s[]);
47

    
48
void print_ip_addr(const void *t);
49

    
50
#endif /* INCLUDED_NONSTDIO_H */