[En-Nut-Discussion] Recent CVS changes

Damian Slee damian at commtech.com.au
Thu Nov 27 06:12:22 CET 2003


>>3. Added support for program space strings for use in printf. The type character 

%P doesn't support formated strings.  
My submission a few weeks ago does, but is limited to sizeof buf which is 16 characters.

putf.c
...
	case 'S':
            cp = va_arg(ap, char *);
            if (cp == 0)
                goto putf_s;
            memcpy_P(buf,cp, BUF);   /* only support upto max size of buf */
            buf[BUF-1] = 0;          /* nul terminate if string was longer */
            cp = buf;
            goto putf_s;

        case 's':
            cp = va_arg(ap, char *);
putf_s:

-----Original Message-----
From: Oliver Schulz [mailto:Oliver.Schulz at bong.de]
Sent: Wednesday, 26 November 2003 4:00 PM
To: Ethernut User Chat (English)
Subject: [En-Nut-Discussion] Recent CVS changes


Hi folks,

for everyone who is interessted to get the actual development state of Nut/OS from CVS, I made some changes in the last days:

1. I added an incoming packet queue for UDP packets. The maximum queue size is configurable with a new funktion 'NutUdpSetSockOpt' (works like NutTcpSetSockOpt). Use SO_RCVBUF to set the queue size in bytes. If any UDP packet arrives while the queue is full, it's simply discarded. 

The default queue size is 0, which means queueing disabled and Nut/Net will discard any buffered packet if a new packet arrives (old behaviour).

2. Added the time functions to implement some standarc C time functions and the SNTP protocol. See http://www.ethernut.de/arc/ostime-102.zip (or newer version on http://www.ethernut.de/en/projects.html) for details.

3. Added support for program space strings for use in printf. The type character is 'P'. To use it, write code something like 'printf ("Current state: %P\n", s)', with s is a prog_char *. Thanks to Ralph Mason, who contributed this.


There are some pending updates, which will be commited to the CVS after some more testing:
- Changed startup code for avr-gcc. It makes possible to use more than 4KB of static data if you have external RAM.
- Full implementation of Dallas' One-Wire-Protocol. It's used for example by the DS1820 digital temperatur sensor.

If you discover any bugs, give me a reply!

Cheers,
Oliver.
_______________________________________________
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