[En-Nut-Discussion] stdio + nutrom

Michel Hendriks unreal at home.nl
Thu Apr 29 10:54:25 CEST 2004


Hi,

NGB said:
> Why does nut os have it's own stdio functions, I'm reffering to the  things like
> sprintf ...
> Considering avrlibc already has those functions why have your own ? I stumbled on
> this as we are removing all sprintf in favour of snprintf and nut  os doesn't
> supply that fct.

IMHO, this is one of *the* strong points of Nut/OS. It enables you to create device
drivers that you can access using standard functions like fprintf,fgets, etc.
In most compiler/developer distributions you can only use stdio functions on files.
If you want to use the supplied functions to control your devices you run into all
sorts of problems, which, in Nut/OS, you don't have.

> Also, I've just start using the Rom file system and, now the recomended use is
> with the standard functions eg: open.
> With the old fcts I can get a pointer directly to the data
> (romf->romf_entry->rome_data) .
> How can I do this with the new way ?

fopen(UROM:NameOfFile, "r");

> Thanks
>
> Nic
>
>
>
>
>
> -------------------------------------------------
>
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion






More information about the En-Nut-Discussion mailing list