Changeset dabe6333 in mainline for generic/src/console/console.c
- Timestamp:
- 2006-03-16T15:56:40Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1ee9ced
- Parents:
- 37e7d2b9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/console/console.c
r37e7d2b9 rdabe6333 39 39 #include <arch/atomic.h> 40 40 41 #define BUFLEN 2048 42 static char debug_buffer[BUFLEN]; 43 static size_t offset = 0; 44 /** Initialize stdout to something that does not print, but does not fail 45 * 46 * Save data in some buffer so that it could be retrieved in the debugger 47 */ 48 static void null_putchar(chardev_t *d, const char ch) 49 { 50 if (offset >= BUFLEN) 51 offset = 0; 52 debug_buffer[offset++] = ch; 53 } 54 55 static chardev_operations_t null_stdout_ops = { 56 .write = null_putchar 57 }; 58 chardev_t null_stdout = { 59 .name = "null", 60 .op = &null_stdout_ops 61 }; 62 41 63 /** Standard input character device. */ 42 64 chardev_t *stdin = NULL; 43 chardev_t *stdout = NULL;65 chardev_t *stdout = &null_stdout; 44 66 45 67 /** Get character from character device. Do not echo character.
Note:
See TracChangeset
for help on using the changeset viewer.