wizard97 / simplyatomic Goto Github PK
View Code? Open in Web Editor NEWSimple Arduino portable atomic macros
License: BSD 3-Clause "New" or "Revised" License
Simple Arduino portable atomic macros
License: BSD 3-Clause "New" or "Revised" License
Hello,
Does your library support the arduino MKR1000?
Thank you very much for the information.
Regards,
Jose
If, in a single sketch, both util/atomic.h
and SimplyAtomic.h
are included, compilation fails:
In file included from mjs_firmware.ino:26:0:
.../avr/include/util/atomic.h: In function 'uint8_t __iSeiRetVal()':
.../avr/include/util/atomic.h:42:27: error: redefinition of 'uint8_t __iSeiRetVal()'
static __inline__ uint8_t __iSeiRetVal(void)
^
In file included from .../SimplyAtomic/SimplyAtomic.h:9:0,
from mjs_firmware.ino:24:
.../SimplyAtomic/avr.h:15:27: note: 'uint8_t __iSeiRetVal()' previously defined here
static __inline__ uint8_t __iSeiRetVal(void)
Similar errors appear for __iCliRetVal and __iRestore. Fixing this
should be a matter of adding a "SimplyAtomic" prefix to all these helper
functions (also, I think __iSeiRetVal
is not used, and could be
removed?).
It would also be good to add a prefix to the ATOMIC_RESTORESTATE macro,
or remove it altogether and just inline it. I would expect an error
about this macro too, but somehow that doesn't happen here.
On an unrelated note, I see that this code is based on AVR's
util/atomic.h, but the license notice is not preserved, which violates
the license of that code. One could argue that this code is too simple
to apply copyright to, but just keeping the license wouldn't hurt. Now,
there is no license attached at all, which would prevent people from
redistributing (binaries containing) this code.
I try to use SimplyAtomic on Arduino using ESP8266 board.
On compiling I get the message: Error: unknown opcode or format name 'cli'.
How can I solve this?
Thanks for your help.
Best regards,
Ton
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.