TheThingsIndustries / generic-node-se

Generic Node Sensor Edition
https://www.genericnode.com
Other
108 stars 31 forks source link

MX25R1635 library does not compile with C++ compiler. #189

Closed mcserved closed 3 years ago

mcserved commented 3 years ago

Summary:

When using a C++ compiler, the MX25R1635 library won't compile as it does some exclusive C things such as: https://github.com/TheThingsIndustries/generic-node-se/blob/97442fdf3c0a3506eab73380def829bf5e937c7e/Software/lib/MX25R1635/nor_cmd.h#L30 There are more examples, but the basic idea is that it should not be compiled as a C++ code (which some users might consider for their implementations).

Steps to Reproduce:

  1. Try to compile basic with C++ compiler

How do you propose to implement this?

Edit all header files in the MX25R1635 library to include this for each file (or just the ones that stop compilation):

#ifdef __cplusplus
extern "C" {
#endif`

...

#ifdef __cplusplus
}
#endif

Environment:

Bare metal

What can you do yourself and what do you need help with?

All