Last change
on this file since 984 was
850,
checked in by cfuguet, 10 years ago
|
reconf: introducing a softs directory in the reconfiguration branch
- This softs directory contains a minimalistic (giet-like) library
of drivers and some utility functions.
- Introducing a simple unit test in the vci_cc_vcache_wrapper
component to test the newly introduced watchdog timer mechanism.
This unit test uses the minimalistic library.
|
File size:
399 bytes
|
Line | |
---|
1 | #include <tty.h> |
---|
2 | #include <io.h> |
---|
3 | #include <hard_config.h> |
---|
4 | |
---|
5 | #define TTYREG(x) (SEG_TTY_BASE + ((x)<<2)) |
---|
6 | |
---|
7 | int tty_getc(char *c) |
---|
8 | { |
---|
9 | if (ioread32(TTYREG(TTY_STATUS)) == 0) { |
---|
10 | return 1; |
---|
11 | } |
---|
12 | *c = ioread32(TTYREG(TTY_READ)); |
---|
13 | return 0; |
---|
14 | } |
---|
15 | |
---|
16 | void tty_putc(const char c) |
---|
17 | { |
---|
18 | iowrite32(TTYREG(TTY_WRITE), (uint32_t)c); |
---|
19 | } |
---|
20 | |
---|
21 | /* |
---|
22 | * vim: tabstop=4 : softtabstop=4 : shiftwidth=4 : expandtab |
---|
23 | */ |
---|
Note: See
TracBrowser
for help on using the repository browser.