Closed CrustyAuklet closed 5 years ago
Also noticed that I had moved #include <unistd.h>
to the #if !defined(WIN32)
section since MSVC doesn't have that header and mingw doesn't need it. Also a ==
where i think there should be a =
on line 58.
If you want I can fork and open a pull request to group these things together, I am using both the I2C driver and SPI driver pretty heavily in MSVC at work.
The following code fails to compile in Visual Studio 2019 with the error:
https://github.com/jamesbowman/i2cdriver/blob/2697bf5046094cddbebcbdee89a480c77b5c3f22/c/common/i2cdriver.c#L40-L44
my quick fix:
unsure if there is a better way, just wanted to open the issue.
Also, I would suggest placing
#define NOMINMAX
before including windows.h to prevent windows from defining the min and max macros and clashing with other code.