2004-03-04 Theodore A. Roth * NEWS: Add note about new eeprom macro. Add note about bugs fixed. * include/avr/boot.h: Update copyright year. (__boot_page_fill_normal): Replace while loop with eeprom_busy_wait. (__boot_page_fill_alternate): Ditto. (__boot_page_fill_extended): Ditto. (__boot_page_erase_normal): Ditto. (__boot_page_erase_alternate): Ditto. (__boot_page_erase_extended): Ditto. (__boot_page_write_normal): Ditto. (__boot_page_write_alternate): Ditto. (__boot_page_write_extended): Ditto. (__boot_rww_enable): Ditto. (__boot_rww_enable_alternate): Ditto. (__boot_lock_bits_set): Ditto. (__boot_lock_bits_set_alternate): Ditto. * include/avr/eeprom.h: Update copyright year. (eeprom_busy_wait): New macro interface. Index: NEWS =================================================================== RCS file: /cvsroot/avr-libc/avr-libc/NEWS,v retrieving revision 1.17.2.5 diff -u -p -p -r1.17.2.5 NEWS --- NEWS 27 Nov 2003 05:25:23 -0000 1.17.2.5 +++ NEWS 4 Mar 2004 18:34:25 -0000 @@ -1,3 +1,20 @@ +*** Changes in avr-libc-1.0.3: + +* Extend eeprom API. + +New macro: + eeprom_busy_wait + +* Bugs fixed: + + [#2143] malloc() routines chunk smaller than requested + [#2233] Documentation issues with inline asm + [#5454] Inline functions results in undefined reference when optimize level 0 + is used. + [#7556] printf and friends improperly handle non-null termnated strings when + a %s argument has a precision. + [#7802] vfscanf problem with unsigned long (patch #2554) + *** Changes in avr-libc-1.0.2: * Extend crc16 API. Index: configure.in =================================================================== RCS file: /cvsroot/avr-libc/avr-libc/configure.in,v retrieving revision 1.81.2.17 diff -u -p -p -r1.81.2.17 configure.in --- configure.in 27 Nov 2003 05:25:23 -0000 1.81.2.17 +++ configure.in 4 Mar 2004 18:34:25 -0000 @@ -1,7 +1,8 @@ # Autoconf configure script for avr libc/libm main directory. # Process this file with autoconf to produce a configure script. -# Copyright (c) 2002, Reinhard Jessich +# Copyright (c) 2002, 2003, 2004 +# Reinhard Jessich # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -137,7 +138,7 @@ AC_CANONICAL_SYSTEM dnl NOTE: Don't put a '-' in the version number or rpm will puke dnl when building the package. dnl -AM_INIT_AUTOMAKE(avr-libc, 1.0.2) +AM_INIT_AUTOMAKE(avr-libc, 1.0.2.20040304) dnl Use the AC_CHECK_TOOL macro to find also cross tools AC_CHECK_TOOL(AS, as, as) Index: include/avr/boot.h =================================================================== RCS file: /cvsroot/avr-libc/avr-libc/include/avr/boot.h,v retrieving revision 1.4.2.4 diff -u -p -p -r1.4.2.4 boot.h --- include/avr/boot.h 18 Sep 2003 22:50:56 -0000 1.4.2.4 +++ include/avr/boot.h 4 Mar 2004 18:34:25 -0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2002-2003, Eric B. Weddington +/* Copyright (c) 2002, 2003, 2004 Eric B. Weddington All rights reserved. Redistribution and use in source and binary forms, with or without @@ -181,7 +181,7 @@ #define __boot_page_fill_normal(address, data) \ ({ \ boot_spm_busy_wait(); \ - while(!eeprom_is_ready()); \ + eeprom_busy_wait(); \ __asm__ __volatile__ \ ( \ "movw r0, %3\n\t" \ @@ -200,7 +200,7 @@ #define __boot_page_fill_alternate(address, data)\ ({ \ boot_spm_busy_wait(); \ - while(!eeprom_is_ready()); \ + eeprom_busy_wait(); \ __asm__ __volatile__ \ ( \ "movw r0, %3\n\t" \ @@ -221,7 +221,7 @@ #define __boot_page_fill_extended(address, data) \ ({ \ boot_spm_busy_wait(); \ - while(!eeprom_is_ready()); \ + eeprom_busy_wait(); \ __asm__ __volatile__ \ ( \ "movw r0, %4\n\t" \ @@ -242,7 +242,7 @@ #define __boot_page_erase_normal(address) \ ({ \ boot_spm_busy_wait(); \ - while(!eeprom_is_ready()); \ + eeprom_busy_wait(); \ __asm__ __volatile__ \ ( \ "movw r30, %2\n\t" \ @@ -258,7 +258,7 @@ #define __boot_page_erase_alternate(address) \ ({ \ boot_spm_busy_wait(); \ - while(!eeprom_is_ready()); \ + eeprom_busy_wait(); \ __asm__ __volatile__ \ ( \ "movw r30, %2\n\t" \ @@ -276,7 +276,7 @@ #define __boot_page_erase_extended(address) \ ({ \ boot_spm_busy_wait(); \ - while(!eeprom_is_ready()); \ + eeprom_busy_wait(); \ __asm__ __volatile__ \ ( \ "movw r30, %A3\n\t" \ @@ -294,7 +294,7 @@ #define __boot_page_write_normal(address) \ ({ \ boot_spm_busy_wait(); \ - while(!eeprom_is_ready()); \ + eeprom_busy_wait(); \ __asm__ __volatile__ \ ( \ "movw r30, %2\n\t" \ @@ -310,7 +310,7 @@ #define __boot_page_write_alternate(address) \ ({ \ boot_spm_busy_wait(); \ - while(!eeprom_is_ready()); \ + eeprom_busy_wait(); \ __asm__ __volatile__ \ ( \ "movw r30, %2\n\t" \ @@ -328,7 +328,7 @@ #define __boot_page_write_extended(address) \ ({ \ boot_spm_busy_wait(); \ - while(!eeprom_is_ready()); \ + eeprom_busy_wait(); \ __asm__ __volatile__ \ ( \ "movw r30, %A3\n\t" \ @@ -346,7 +346,7 @@ #define __boot_rww_enable() \ ({ \ boot_spm_busy_wait(); \ - while(!eeprom_is_ready()); \ + eeprom_busy_wait(); \ __asm__ __volatile__ \ ( \ "sts %0, %1\n\t" \ @@ -359,7 +359,7 @@ #define __boot_rww_enable_alternate() \ ({ \ boot_spm_busy_wait(); \ - while(!eeprom_is_ready()); \ + eeprom_busy_wait(); \ __asm__ __volatile__ \ ( \ "sts %0, %1\n\t" \ @@ -375,7 +375,7 @@ ({ \ uint8_t value = (uint8_t)(lock_bits | __BOOT_LOCK_BITS_MASK); \ boot_spm_busy_wait(); \ - while(!eeprom_is_ready()); \ + eeprom_busy_wait(); \ __asm__ __volatile__ \ ( \ "ldi r30, 1\n\t" \ @@ -394,7 +394,7 @@ ({ \ uint8_t value = (uint8_t)(lock_bits | __BOOT_LOCK_BITS_MASK); \ boot_spm_busy_wait(); \ - while(!eeprom_is_ready()); \ + eeprom_busy_wait(); \ __asm__ __volatile__ \ ( \ "ldi r30, 1\n\t" \ Index: include/avr/eeprom.h =================================================================== RCS file: /cvsroot/avr-libc/avr-libc/include/avr/eeprom.h,v retrieving revision 1.8 diff -u -p -p -r1.8 eeprom.h --- include/avr/eeprom.h 17 Jul 2003 19:52:23 -0000 1.8 +++ include/avr/eeprom.h 4 Mar 2004 18:34:25 -0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2002, Marek Michalkiewicz +/* Copyright (c) 2002, 2003, 2004 Marek Michalkiewicz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -72,6 +72,15 @@ \returns 1 if EEPROM is ready for a new read/write operation, 0 if not. */ #define eeprom_is_ready() bit_is_clear(EECR, EEWE) + +/** \def eeprom_busy_wait + \ingroup avr_eeprom + + Loops until the eeprom is no longer busy. + + \returns Nothing. */ + +#define eeprom_busy_wait() do {} while (!eeprom_is_ready ()) #ifdef __cplusplus extern "C" {