diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index a0fed17..d5ef439 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -11,7 +11,13 @@ "${workspaceRoot}", "${workspaceRoot}/library/OneWireSlave" ], - "defines": ["ARDUINO=160","__AVR__","UBRRH","__AVR_ATmega328P__","VS_INTELLISENSE"], + "defines": [ + "ARDUINO=160", + "__AVR__", + "UBRRH", + "__AVR_ATmega328P__", + "VS_INTELLISENSE" + ], "intelliSenseMode": "clang-x64", "browse": { "path": [ @@ -44,7 +50,13 @@ "${workspaceRoot}", "${workspaceRoot}/library/OneWireSlave" ], - "defines": ["ARDUINO=160","__AVR__","UBRRH","__AVR_ATmega328P__","VS_INTELLISENSE"], + "defines": [ + "ARDUINO=160", + "__AVR__", + "UBRRH", + "__AVR_ATmega328P__", + "VS_INTELLISENSE" + ], "intelliSenseMode": "clang-x64", "browse": { "path": [ @@ -60,7 +72,10 @@ ], "limitSymbolsToIncludedHeaders": true, "databaseFilename": "" - } + }, + "compilerPath": "/usr/bin/gcc", + "cStandard": "c11", + "cppStandard": "c++14" }, { "name": "Win32", @@ -76,7 +91,11 @@ "_DEBUG", "UNICODE", "_UNICODE", - "ARDUINO=160","__AVR__","UBRRH","__AVR_ATmega328P__","VS_INTELLISENSE" + "ARDUINO=160", + "__AVR__", + "UBRRH", + "__AVR_ATmega328P__", + "VS_INTELLISENSE" ], "intelliSenseMode": "msvc-x64", "browse": { diff --git a/library/OneWireSlave/LowLevel.h b/library/OneWireSlave/LowLevel.h index d18d387..35c6d2e 100644 --- a/library/OneWireSlave/LowLevel.h +++ b/library/OneWireSlave/LowLevel.h @@ -4,7 +4,7 @@ #include #ifdef VS_INTELLISENSE -#define __attribute__() +#define __attribute__(arg1) #endif #if ARDUINO >= 100 @@ -109,6 +109,13 @@ __attribute__((always_inline)) static inline void UserTimer_Run(short skipTicks) #error "Please define I/O register types here" #endif +#ifdef VS_INTELLISENSE +#undef PIN_TO_BITMASK +#define PIN_TO_BITMASK(pin) 0 +#undef PIN_TO_BASEREG +#define PIN_TO_BASEREG(pin) 0 +#endif + class Pin { private: