[patch #9659] Update eeprom_is_ready for avrxmega3 devices

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[patch #9659] Update eeprom_is_ready for avrxmega3 devices

Joerg Wunsch-6
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
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev
Reply | Threaded
Open this post in threaded view
|

Re: [patch #9659] Update eeprom_is_ready for avrxmega3 devices

Pitchumani Sivanupandi-2
Hi All,

Any comments for this patch?

If OK, I'll commit this by early next week.

Regards,
Pitchumani

On 6/21/18, 12:24 PM, "Pitchumani" <[hidden email]> wrote:

    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
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev
Reply | Threaded
Open this post in threaded view
|

Re: [patch #9659] Update eeprom_is_ready for avrxmega3 devices

Joerg Wunsch
As [hidden email] wrote:

> Hi All,
>
> Any comments for this patch?
>
> If OK, I'll commit this by early next week.

Yes, please do!

--
cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)

_______________________________________________
AVR-libc-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev
Reply | Threaded
Open this post in threaded view
|

[patch #9659] Update eeprom_is_ready for avrxmega3 devices

Joerg Wunsch-6
In reply to this post by Joerg Wunsch-6
Update of patch #9659 (project avr-libc):

                  Status:            Works For Me => Done                  
             Open/Closed:                    Open => Closed                

    _______________________________________________________

Follow-up Comment #1:

committed as revision #2548
http://svn.savannah.gnu.org/viewvc/avr-libc?view=revision&revision=2548

    _______________________________________________________

Reply to this item at:

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

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


_______________________________________________
AVR-libc-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev