Go Down

Topic: DigitalToggle in 1.0 (Read 929 times) previous topic - next topic

fubbi

The super useful library DigitalToggle  does not compile in 1.0
It works fine in 0023

http://arduino.cc/playground/Code/DigitalToggle

this is the error I get:

Code: [Select]
/Users/holby/Documents/Arduino/libraries/DigitalToggle/DigitalToggle.cpp: In function 'void digitalToggle(uint8_t)':
/Users/holby/Documents/Arduino/libraries/DigitalToggle/DigitalToggle.cpp:25: error: 'digitalPinToPort' was not declared in this scope
/Users/holby/Documents/Arduino/libraries/DigitalToggle/DigitalToggle.cpp:25: error: 'portInputRegister' was not declared in this scope
/Users/holby/Documents/Arduino/libraries/DigitalToggle/DigitalToggle.cpp:25: error: 'digitalPinToBitMask' was not declared in this scope


does it contain any clues? I would hate to drop using this wonderful little shortcut...

thanks

fubbi

MarkT

I think the change needed is DigitalToggle.h should #include Arduino.h for Arduino 1.0 and beyond, not pins_arduino.h...
[ I won't respond to messages, use the forum please ]

cmpenoob


I think the change needed is DigitalToggle.h should #include Arduino.h for Arduino 1.0 and beyond, not pins_arduino.h...


yep, that fixes it!

Go Up