[En-Nut-Discussion] RE: [En-Nut-Announce] Call for Test

Mike Cornelius mikec at calldirect.com.au
Mon Jan 27 23:31:04 CET 2003


Hi Harald,

I'lld love to give it a try....

Mike

-----Original Message-----
From: en-nut-announce-admin at egnite.de
[mailto:en-nut-announce-admin at egnite.de]On Behalf Of Harald Kipp
Sent: Tuesday, January 28, 2003 1:31 AM
To: en-nut-announce at egnite.de
Subject: [En-Nut-Announce] Call for Test


A new preview release of Nut/OS 3 will be available to people
who like taking risks.

The bad news is, that good old NutMain has gone. Nut/OS apps
now look like this:

int main(void) /* Sniff */
{
     FILE *stream; /* File? What file? */

     NutRegisterDevice(&devUart0, 0, 0); /* Ah, familiar. */
     freopen("uart0", "w", stdout); /* Never seen. */
     printf("Hello world!\n); /* Will this work? */
}

All the fancy NutPrints and NutIfStreams are depricated and
should be replaced by

extern void clearerr(FILE * stream);
extern int fclose(FILE * stream);
extern void fcloseall(void);
extern FILE *_fdopen(int fd, CONST char *mode);
extern int feof(FILE * stream);
extern int ferror(FILE * stream);
extern int fflush(FILE * stream);
extern int fgetc(FILE * stream);
extern char *fgets(char *buffer, int count, FILE * stream);
extern int _fileno(FILE * stream);
extern void _flushall(void);
extern FILE *fopen(CONST char *name, CONST char *mode);
extern int fprintf(FILE * stream, CONST char *fmt, ...);
extern int fprintf_P(FILE * stream, PGM_P fmt, ...);
extern int fputc(int c, FILE * stream);
extern int fputs(CONST char *string, FILE * stream);
extern int fputs_P(PGM_P string, FILE * stream);
extern size_t fread(void *buffer, size_t size, size_t count, FILE * stream);
extern FILE *freopen(CONST char *name, CONST char *mode, FILE * stream);
extern int fscanf(FILE * stream, CONST char *fmt, ...);
extern int fscanf_P(FILE * stream, PGM_P fmt, ...);
extern int fseek(FILE * stream, long offset, int origin);
extern long ftell(FILE * stream);
extern size_t fwrite(CONST void *data, size_t size, size_t count, FILE *
stream);
extern size_t fwrite_P(PGM_P data, size_t size, size_t count, FILE *
stream);
extern int getc(FILE * stream);
extern int getchar(void);
extern char *gets(char *buffer);
extern int printf(CONST char *fmt, ...);
extern int printf_P(PGM_P fmt, ...);
extern int putc(int c, FILE * stream);
extern int putchar(int c);
extern int puts(CONST char *string);
extern int puts_P(PGM_P string);
extern int scanf(CONST char *fmt, ...);
extern int scanf_P(PGM_P fmt, ...);
extern int sprintf(char *buffer, CONST char *fmt, ...);
extern int sprintf_P(char *buffer, PGM_P fmt, ...);
extern int sscanf(CONST char *string, CONST char *fmt, ...);
extern int sscanf_P(CONST char *string, CONST char *fmt, ...);
extern int ungetc(int c, FILE * stream);
extern int vfprintf(FILE * stream, CONST char *fmt, va_list ap);
extern int vfprintf_P(FILE * stream, PGM_P fmt, va_list ap);
extern int vfscanf(FILE * stream, CONST char *fmt, va_list ap);
extern int vfscanf_P(FILE * stream, PGM_P fmt, va_list ap);
extern int vsprintf(char *buffer, CONST char *fmt, va_list ap);
extern int vsprintf_P(char *buffer, PGM_P fmt, va_list ap);
extern int vsscanf(CONST char *string, CONST char *fmt, va_list ap);
extern int vsscanf_P(CONST char *string, PGM_P fmt, va_list ap);

All these functions work on UARTS, TCP sockets and hopefully soon on
Michael Fischer's FAT32 filesystem.

Right now, tcps is the only ported example, but ready for WinAVR (GCC 3.3)
as
well as ICCAVR. If you're interested in taking a test ride, please send an
email
to harald at egnite dot de.

Harald

_______________________________________________
En-Nut-Announce mailing list
En-Nut-Announce at egnite.de
http://www.egnite.de/mailman/listinfo/en-nut-announce




More information about the En-Nut-Discussion mailing list