[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] stdio - how extensible?
From: |
Larry Barello |
Subject: |
[avr-gcc-list] stdio - how extensible? |
Date: |
Wed, 14 Sep 2005 09:59:31 -0700 |
I am wrapping up a serial io sample for my rtos (www.barello.net/AvrX) and
as a final test I spun up two tasks, one attached to USART0 and one to
USART1 (mega128). Well, duh, it didn't work since the second call to
fdevopen() (task 2) failed miserably. I knew that, I am just sometimes
thick in the morning ;^)
So, the question is: what would it take to extend the current stdio facility
to allow N descriptors (rather than just stdout, stdin and stderr).
Obviously, for my sample I need four channels. But, I bet others are
hanging extra serial ports off the chip (mega8's or SPI USARTs) and could
use channels beyond four. Or is this already implemented and I just need to
RTFM?
A second question: is stdio written to be re-entrant? I.e. No static data
(other than the file descriptor)? The first question is sort of moot if
stdio is not re-entrant (for me at least).
----
Larry Barello
www.barello.net
- [avr-gcc-list] stdio - how extensible?,
Larry Barello <=