Re: gcc question
From: Daniel O'Connor (doconnor_at_gsoft.com.au)
Date: 02/24/05
- Previous message: Kathy Quinlan: "gcc question"
- In reply to: Kathy Quinlan: "gcc question"
- Next in thread: Kathy Quinlan: "Re: gcc question"
- Reply: Kathy Quinlan: "Re: gcc question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: freebsd-hackers@freebsd.org Date: Thu, 24 Feb 2005 15:32:39 +1030
On Thu, 24 Feb 2005 15:00, Kathy Quinlan wrote:
> I have some code that I build for two targets, one an Atmel uC and the
> other FreeBSD.
>
> What is the best way to redefine getchar and putchar (in uC they use the
> serial port, in FreeBSD stdin stdout)
>
> Or would I be better #ifdef the commands and making getchar only used in
> uC and my serial port handler in FreeBSD ??
I didn't think getchar/putchar existed in the Atmel libc implementation..
I would suggest using a different function name and implement it differently
for either platform.
Also you'll want to be careful about the fact that the Atmel has 2 separate
address spaces (if it's an AVR anyway) which can cause problems because you
have to read from the right one.
-- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
- application/pgp-signature attachment: stored
- Previous message: Kathy Quinlan: "gcc question"
- In reply to: Kathy Quinlan: "gcc question"
- Next in thread: Kathy Quinlan: "Re: gcc question"
- Reply: Kathy Quinlan: "Re: gcc question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|