TheThingsIndustries / generic-node-se

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

Flash double initialisation fix #193

Closed mcserved closed 3 years ago

mcserved commented 3 years ago

Summary:

This PR has alterations to the flash IC initialisation function relating to to a bug occurring when it is called more than once. It also makes the flash IC build with C++. Closes #173 #189.

Changes:

Notes for Reviewers:

I tested by calling MX25R16_Init three times and seeing if the tests could pass.

Should you want to test if the C++ functionality (not as important as testing if it builds regularly of course) it only really matters if the files are .cpp as well. It is only meant to protect when users want to add their own C++ code to it (like was done with both SHTC3 and LIS2DH12 libraries).