hello,all, thanks jim for his onewire library.But i used the arduino 12, i got the following errors when the Arduino environment (11) starts up:
OneWire.cpp: In constructor 'OneWire:neWire(uint8_t)':
OneWire.cpp:74: error: 'digital_pin_to_port' was not declared in this scope
OneWire.cpp:76: error: 'port_to_output' was not declared in this scope
OneWire.cpp:77: error: 'port_to_input' was not declared in this scope
OneWire.cpp:78: error: 'port_to_mode' was not declared in this scope
so i have to fix it myself for i cannot open the link on background to get the recent files.
in onewire.h i add #include <pins_arduino.h>
in onewire.cpp
OneWire::OneWire( uint8_t pinArg)
{
pin = pinArg;
/*
port = digital_pin_to_port[pin].port;
bit = digital_pin_to_port[pin].bit;
outputReg = port_to_output[port];
inputReg = port_to_input[port];
modeReg = port_to_mode[port];
*/
port = digitalPinToPort(pin);
bit = digitalPinToBitMask(pin);
outputReg = port_to_output_PGM[port];
inputReg = port_to_input_PGM[port];
modeReg = port_to_mode_PGM[port];
#if ONEWIRE_SEARCH
reset_search();
#endif
}
now the error is gone, but i want to know that it is right ? maybe anybody can help me or give me the right link to get recent file.thanks.