Subversion Repositories HelenOS

Rev

Rev 2290 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2290 Rev 2326
Line 24... Line 24...
24
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
 */
27
 */
28
 
28
 
-
 
29
/** @addtogroup arm32
-
 
30
 * @{
-
 
31
 */
-
 
32
/** @file
-
 
33
 */
-
 
34
 
29
 
35
 
30
#include <printf/printf_core.h>
36
#include <printf/printf_core.h>
31
#include <arch/debug_print/print.h>
37
#include <arch/debug/print.h>
32
#include <arch/machine.h>
38
#include <arch/machine.h>
33
 
39
 
34
 
40
 
35
/**
41
/**
36
 * Prints a character to console.
42
 * Prints a character to the console.
37
 *
43
 *
38
 * @param ch character to be printed
44
 * @param ch Character to be printed.
39
 */
45
 */
40
static void putc(char ch)
46
static void putc(char ch)
41
{
47
{
42
    machine_debug_putc(ch);
48
    machine_debug_putc(ch);
43
}
49
}
44
 
50
 
-
 
51
 
-
 
52
/** Prints a string to the console.
-
 
53
 *
-
 
54
 * @param str    String to be printed.
-
 
55
 * @param count  Number of characters to be printed.
-
 
56
 * @param unused Unused parameter.
-
 
57
 *
-
 
58
 * @return Number of printed characters.
-
 
59
 */
45
int debug_write(const char *str, size_t count, void *unused)
60
static int debug_write(const char *str, size_t count, void *unused)
46
{
61
{
47
    int i;
62
    int i;
48
    for (i = 0; i < count; ++i) {
63
    for (i = 0; i < count; ++i) {
49
        putc(str[i]);
64
        putc(str[i]);
50
    }
65
    }
51
    return i;
66
    return i;
52
}
67
}
53
 
68
 
-
 
69
 
-
 
70
/** Prints a formated string.
-
 
71
 *
-
 
72
 * @param fmt "Printf-like" format.
-
 
73
 */
54
void debug_printf(const char *fmt, ...)
74
void debug_printf(const char *fmt, ...)
55
{
75
{
56
    va_list args;
76
    va_list args;
57
    va_start (args, fmt);
77
    va_start (args, fmt);
58
 
78
 
Line 60... Line 80...
60
    printf_core(fmt, &ps, args);
80
    printf_core(fmt, &ps, args);
61
 
81
 
62
    va_end(args);
82
    va_end(args);
63
}
83
}
64
 
84
 
-
 
85
/** @}
65
 
86
 */