Rev 2468 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2468 | Rev 4651 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /* |
1 | /* |
2 | * Copyright (c) 2007 Michal Kebrt |
2 | * Copyright (c) 2007 Michal Kebrt |
- | 3 | * Copyright (c) 2009 Vineeth Pillai |
|
3 | * All rights reserved. |
4 | * All rights reserved. |
4 | * |
5 | * |
5 | * Redistribution and use in source and binary forms, with or without |
6 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions |
7 | * modification, are permitted provided that the following conditions |
7 | * are met: |
8 | * are met: |
Line 29... | Line 30... | ||
29 | 30 | ||
30 | /** @addtogroup arm32boot |
31 | /** @addtogroup arm32boot |
31 | * @{ |
32 | * @{ |
32 | */ |
33 | */ |
33 | /** @file |
34 | /** @file |
34 | * @brief GXemul specific code. |
35 | * @brief bootloader output logic |
35 | */ |
36 | */ |
36 | 37 | ||
37 | 38 | ||
38 | #include <printf.h> |
39 | #include <printf.h> |
39 | 40 | ||
40 | 41 | ||
41 | /** Address where characters to be printed are expected. */ |
42 | /** Address where characters to be printed are expected. */ |
- | 43 | #ifdef MACHINE_GXEMUL_TESTARM |
|
42 | #define PUTC_ADDRESS 0x10000000 |
44 | #define PUTC_ADDRESS 0x10000000 |
- | 45 | #endif |
|
- | 46 | #ifdef MACHINE_ICP |
|
- | 47 | #define PUTC_ADDRESS 0x16000000 |
|
- | 48 | #endif |
|
- | 49 | ||
43 | 50 | ||
44 | 51 | ||
45 | /** Prints a character to the console. |
52 | /** Prints a character to the console. |
46 | * |
53 | * |
47 | * @param ch Character to be printed. |
54 | * @param ch Character to be printed. |
48 | */ |
55 | */ |
49 | static void putc(char ch) |
56 | static void putc(char ch) |
50 | { |
57 | { |
- | 58 | if (ch == '\n') |
|
- | 59 | *((volatile char *) PUTC_ADDRESS) = '\r'; |
|
51 | *((volatile char *) PUTC_ADDRESS) = ch; |
60 | *((volatile char *) PUTC_ADDRESS) = ch; |
52 | } |
61 | } |
53 | 62 | ||
54 | 63 | ||
55 | /** Prints a string to the console. |
64 | /** Prints a string to the console. |