Subversion Repositories HelenOS-historic

Rev

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

Rev 534 Rev 577
Line 26... Line 26...
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
#include <putchar.h>
29
#include <putchar.h>
30
#include <genarch/ofw/ofw.h>
30
#include <genarch/ofw/ofw.h>
-
 
31
#include <console/chardev.h>
-
 
32
#include <console/console.h>
31
 
33
 
32
/** Print one character.
34
/** Print one character.
33
 *
35
 *
34
 * @param ch Character to be printed.
36
 * @param ch Character to be printed.
35
 */
37
 */
36
void putchar(const char ch)
38
static void ofw_write(chardev_t *d, const char ch)
37
{
39
{
38
    ofw_putchar(ch);
40
    ofw_putchar(ch);
39
}
41
}
-
 
42
 
-
 
43
chardev_t ofw_console;
-
 
44
static chardev_operations_t ofw_ops = {
-
 
45
    .write = ofw_write
-
 
46
};
-
 
47
 
-
 
48
/** Initialize console to use ofw output */
-
 
49
void console_init(void)
-
 
50
{
-
 
51
    chardev_initialize("ofw_out", &ofw_console, &ofw_ops);
-
 
52
    stdout = &ofw_console;
-
 
53
}