diff --git a/OneWireIO_Demo.ino b/OneWireIO.ino
similarity index 94%
rename from OneWireIO_Demo.ino
rename to OneWireIO.ino
index 140d3df..dff1446 100644
--- a/OneWireIO_Demo.ino
+++ b/OneWireIO.ino
@@ -26,8 +26,8 @@ void setup()
led.writeLow();
// Setup the OneWire library
- OneWire.setReceiveCallback(&owReceive);
- OneWire.begin(owROM, oneWireData.getPinNumber());
+ OWSlave.setReceiveCallback(&owReceive);
+ OWSlave.begin(owROM, oneWireData.getPinNumber());
}
void loop()
@@ -63,7 +63,7 @@ void owReceive(OneWireSlave::ReceiveEvent evt, byte data)
// in this simple example we just reply with one byte to say we've processed the command
// a real application should have a CRC system to ensure messages are not corrupt, for both directions
// you can use the static OneWireSlave::crc8 method to add CRC checks in your communication protocol (it conforms to standard one-wire CRC checks, that is used to compute the ROM last byte for example)
- OneWire.write(&acknowledge, 1, NULL);
+ OWSlave.write(&acknowledge, 1, NULL);
break;
diff --git a/OneWireIO.vcxproj b/OneWireIO.vcxproj
index e27473d..71ab23a 100644
--- a/OneWireIO.vcxproj
+++ b/OneWireIO.vcxproj
@@ -13,7 +13,7 @@
{3B500971-1570-460F-81C3-22AC3B7764B9}
OneWireIO
- OneWireIO_Demo
+ OneWireIO
@@ -45,14 +45,14 @@
Level3
Disabled
true
- D:\Outils\Arduino\hardware\arduino\avr\cores\arduino;D:\Outils\Arduino\hardware\tools\avr\avr\include
+ D:\Outils\Arduino\hardware\arduino\avr\cores\arduino;D:\Outils\Arduino\hardware\tools\avr\avr\include;C:\Program Files %28x86%29\Arduino\hardware\arduino\avr\cores\arduino;C:\Program Files %28x86%29\Arduino\hardware\tools\avr\avr\include
_MBCS;%(PreprocessorDefinitions);ARDUINO=160;__AVR__;UBRRH;__AVR_ATmega328__
true
- if exist $(ProjectDir)$(IntDir)$(ProjectName).cpp.elf (
+ if exist $(ProjectDir)$(IntDir)$(ProjectName).ino.elf (
echo Elf generated
) else (
echo no output
@@ -61,12 +61,8 @@ exit /B 1
- if exist $(ProjectDir)$(IntDir)$(ProjectName).cpp.elf (
-echo Elf generated
-) else (
-echo no output
-exit /B 1
-)
+
+
@@ -84,11 +80,11 @@ exit /B 1
-
+
Document
false
- if exist $(ProjectDir)$(IntDir)$(ProjectName).cpp.elf del $(ProjectDir)$(IntDir)$(ProjectName).cpp.elf
-D:\Outils\Arduino\arduino.exe --pref build.path=$(ProjectDir)$(IntDir) --upload %(FullPath)
+ if exist $(ProjectDir)$(IntDir)$(ProjectName).ino.elf del $(ProjectDir)$(IntDir)$(ProjectName).ino.elf
+"C:\Program Files (x86)\Arduino\arduino.exe" --upload --pref build.path=$(ProjectDir)$(Configuration) %(FullPath) | more
always_build_$(ProjectConfiguration).dummy
diff --git a/OneWireSlave.cpp b/OneWireSlave.cpp
index ebf4287..b5f4e2d 100644
--- a/OneWireSlave.cpp
+++ b/OneWireSlave.cpp
@@ -26,7 +26,7 @@ namespace
void(*timerEvent)() = 0;
}
-OneWireSlave OneWire;
+OneWireSlave OWSlave;
byte OneWireSlave::rom_[8];
byte OneWireSlave::scratchpad_[8];
diff --git a/OneWireSlave.h b/OneWireSlave.h
index 1c911c8..ac8838d 100644
--- a/OneWireSlave.h
+++ b/OneWireSlave.h
@@ -104,6 +104,6 @@ private:
static void(*clientReceiveCallback_)(ReceiveEvent evt, byte data);
};
-extern OneWireSlave OneWire;
+extern OneWireSlave OWSlave;
#endif