URL:
  <http://savannah.nongnu.org/patch/?9659>

                 Summary: Update eeprom_is_ready for avrxmega3 devices
                 Project: AVR C Runtime Library
            Submitted by: pitchumani
            Submitted on: Thu 21 Jun 2018 06:54:18 AM UTC
                Category: None
                Priority: 5 - Normal
                  Status: Works For Me
                 Privacy: Public
             Assigned to: pitchumani
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Macro eeprom_is_ready checks NVM_STATUS register for all xmega devices. New
avrxmega3 devices have NVM status register defined with new name
NVMCTRL_STATUS. Below patch updates the eeprom_is_ready definition to check
the eeprom busy bit based on the NVM status register.


--- avr-libc/include/avr/eeprom.h   (revision 2546)
+++ avr-libc/include/avr/eeprom.h   (working copy)
@@ -112,8 +112,10 @@
  */
 #if    defined (__DOXYGEN__)
 # define eeprom_is_ready()
-#elif  defined (__AVR_XMEGA__) && __AVR_XMEGA__
+#elif  defined (NVM_STATUS)
 # define eeprom_is_ready() bit_is_clear (NVM_STATUS, NVM_NVMBUSY_bp)
+#elif  defined (NVMCTRL_STATUS)
+# define eeprom_is_ready() bit_is_clear (NVMCTRL_STATUS, NVMCTRL_EEBUSY_bp)
 #elif  defined (DEECR)
 # define eeprom_is_ready() bit_is_clear (DEECR, BSY)
 #elif  defined (EEPE)





    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?9659>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to