mirror of https://github.com/ArduPilot/ardupilot
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:
parent
6838829428
commit
5ba0c7328f
|
@ -103,7 +103,7 @@ FastSerial::FastSerial(const uint8_t portNumber,
|
|||
_rxBuffer->head = _rxBuffer->tail = 0;
|
||||
|
||||
// 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);
|
||||
if (0 == portNumber) {
|
||||
stdout = &_fd; // serial port 0 is always the default console
|
||||
|
|
Loading…
Reference in New Issue