Hook up stdio input, for the heck of it. We seem to be moving away from it, but there are things it can do that are hard to do with the Stream interfaces.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@555 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
DrZiplok@gmail.com 2010-09-25 18:15:56 +00:00
parent 6838829428
commit 5ba0c7328f
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ FastSerial::FastSerial(const uint8_t portNumber,
_rxBuffer->head = _rxBuffer->tail = 0; _rxBuffer->head = _rxBuffer->tail = 0;
// init stdio // init stdio
fdev_setup_stream(&_fd, &FastSerial::_putchar, NULL, _FDEV_SETUP_WRITE); fdev_setup_stream(&_fd, &FastSerial::_putchar, &FastSerial::_getchar, _FDEV_SETUP_RW);
fdev_set_udata(&_fd, this); fdev_set_udata(&_fd, this);
if (0 == portNumber) { if (0 == portNumber) {
stdout = &_fd; // serial port 0 is always the default console stdout = &_fd; // serial port 0 is always the default console