I'd like to know if it's possible to create a library for Arduino that does not contain a class, just functions.
I know how to create a library with a class, but I'd like to create a library of general purpose functions that don't need to be instantiated to be used. Just used like the standard functions included in the Arduino IDE: sizeof(), etc..
Is this possible? If so, can anyone point me in the direction of a template? I've been searching, but haven't found anything.
Thanks!
No new and delete keywords 2. No exceptions 3. No libstdc++, hence no standard functions, templates or classes
- most of that is nonsense. You can usenew
anddelete
these days. You can use templates and classes. You can get the STL (standard template library) from StandardCplusplus. You have standard functions likemalloc
,memcpy
,strcpy
, etc.You also will need to close the Arduino IDE when recompiling a library
- when I am developing a library I use a standalone editor for editing the library. I don't need to close the IDE to test it.