View Single Post
  #2   Spotlight this post!  
Unread 17-03-2004, 15:46
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Anyone with a replacement Printf?

Quote:
Originally Posted by Larry Barello
I wrote a buffered i/o system for the IFI controller. It is file oriented so output can be directed to either the program port or the TTY port. It is buffered so calls to printf can occur even in interrupt handlers (no blocking) It can handle the actual i/o either as polled in the fast loop, or via a low interrupts. I'll be publishing it soon. I have fputc() fgetc(), etc. done.

The problem is that the existing IFI printf library doesn't exactly lend itself to creating an fprintf() routine, and a "printf()" on top of that (i.e. default output to one or the other ports).

Maybe I just need a primer on how printf(...) works... But I thought I would ask and see if someone has a version that would be more amenable to the streams approach to output.

The original goal was to have the debug menu on one port and still have access to another port for serial peripherals (say, a GPS unit?) But just having it buffered and polling makes a HUGE difference in performance and ability to debug with printf statements.
Here:

Quote:
Originally Posted by Mark McLeod
I just put some routines here http://www.chiefdelphi.com/forums/showthread.php?t=26529 that do this.

You can just call the one routine that prints decimals without changing any of your own printfs.
PS- why do you have to have at least 2 characters?