SHA2017-badge / Firmware

ESP32 firmware for the SHA2017 badge
https://wiki.sha2017.org/w/Badge
Other
83 stars 36 forks source link

Allow C++ compilers to include the badge headers. #172

Closed osresearch closed 7 years ago

osresearch commented 7 years ago

Wraps all of the headers with __BEGIN_DECLS and __END_DECLS so that C++ compilers like the Arduino framework can include the badge component headers.

osresearch commented 7 years ago

Thanks for the merge! __BEGIN_DECLS / __END_DECLS tells the C++ compiler that the functions in that block are C functions and should not undergo name mangling. On C they are NOPs. They expand to:

#ifdef __cplusplus
extern "C" {
#endif

// externs go here

#ifdef __cplusplus
};
#endif