PaulStoffregen / OneWire

Library for Dallas/Maxim 1-Wire Chips
http://www.pjrc.com/teensy/td_libs_OneWire.html
579 stars 382 forks source link

Compatibility with Atmega328p #65

Closed Zuputmer closed 5 years ago

Zuputmer commented 5 years ago

Hey, I believe this library is compatible with the atmega328p. I am using the atmega328p as a standalone microcontroller without the Arduino ide or bootloader, and I am afraid the noInterrupts() function used in OneWire.cpp will not compile in Atmel Studio since it is a function in Arduino IDE. Can I just replace the NoInterrupts() and Interrupts() functions with cli() and sei() functions which happen to disable and enable interrupts in Atmel Studio?