Re: Removal of 8-bit AVR support (Re: STM32L051 and LPUART)
Nathan Moore <[email protected]> Tue, 25 Oct 2016 10:19:03 -0400
| Newsgroups | gmane.comp.hardware.microcontrollers.ethernut |
|---|---|
| Message-ID | <CAAJh09XaVqobH_gR7WoZtEVR-qoOBA8ser=fqHJLZijk8w7Dpg@mail.gmail.com> |
On Tue, Oct 25, 2016 at 5:19 AM, Uwe Bonnes < bon-1JbLm1bU5j5ZIx36JBfelj3+ndqKAYMe9FMPySWZwLkb1SvskN2V4Q@public.gmane.org> wrote: > > Another thing is the protection of 2 and 4 byte variables with a Critical > section. This is not needed with 32-bit systems. But a look at nut/dev/ > shows that only the old u(s)art driver use it. So it is legacy, but does > not > hamper us beside carrying old code around. > I started to write some Critical macros that would take a parameter to test for size and alignment to determine if they should actually do anything, but while doable in GCC that got complicated quickly. Is that something that people would find useful? Is that something that people would trust and/or use correctly? Alternately, a family of Critical macros with size suffixes could be written for each architecture and not rely so much on the preprocessor and compiler to get it right. Nathan _______________________________________________ http://lists.egnite.de/mailman/listinfo/en-nut-discussion