MoteinoMEGA on 2.0.1 error compiling



  • Hello.

    I cannot compile a standard GW sketch on 2.0.1b for MoteinoMEGA. It does compile for Moteino though.
    This is the error message:

    Arduino: 1.6.9 (Windows 10), Board: "MoteinoMEGA"
    
    In file included from C:\Users\Alex\AppData\Local\Temp\build7dc6f2b63c7f50e674134238335fb178.tmp\sketch\GatewaySerial-2.0.1b.ino.cpp:1:0:
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/core/MyLeds.cpp: In function 'void ledsProcess()':
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:154: error: '__digitalPinToPortReg' was not declared in this scope
    
       #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), __digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                                                              ^
    
    C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino/Arduino.h:112:30: note: in definition of macro 'bitSet'
    
     #define bitSet(value, bit) ((value) |= (1UL << (bit)))
    
                                  ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:117: note: in expansion of macro 'bitWrite'
    
       #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), __digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                         ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/core/MyHwATMega328.h:61:40: note: in expansion of macro 'digitalWriteFast'
    
     #define hwDigitalWrite(__pin, __value) digitalWriteFast(__pin, __value)
    
                                            ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/core/MyLeds.cpp:66:5: note: in expansion of macro 'hwDigitalWrite'
    
         hwDigitalWrite(MY_DEFAULT_RX_LED_PIN, state);
    
         ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:180: error: '__digitalPinToBit' was not declared in this scope
    
       #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), __digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                                                                                        ^
    
    C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino/Arduino.h:112:49: note: in definition of macro 'bitSet'
    
     #define bitSet(value, bit) ((value) |= (1UL << (bit)))
    
                                                     ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:117: note: in expansion of macro 'bitWrite'
    
       #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), __digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                         ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/core/MyHwATMega328.h:61:40: note: in expansion of macro 'digitalWriteFast'
    
     #define hwDigitalWrite(__pin, __value) digitalWriteFast(__pin, __value)
    
                                            ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/core/MyLeds.cpp:66:5: note: in expansion of macro 'hwDigitalWrite'
    
         hwDigitalWrite(MY_DEFAULT_RX_LED_PIN, state);
    
         ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/RFM69/RFM69.cpp: In member function 'bool RFM69::initialize(uint8_t, uint8_t, uint8_t)':
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:154: error: '__digitalPinToPortReg' was not declared in this scope
    
       #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), __digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                                                              ^
    
    C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino/Arduino.h:112:30: note: in definition of macro 'bitSet'
    
     #define bitSet(value, bit) ((value) |= (1UL << (bit)))
    
                                  ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:117: note: in expansion of macro 'bitWrite'
    
       #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), __digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                         ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/core/MyHwATMega328.h:61:40: note: in expansion of macro 'digitalWriteFast'
    
     #define hwDigitalWrite(__pin, __value) digitalWriteFast(__pin, __value)
    
                                            ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/RFM69/RFM69.cpp:90:3: note: in expansion of macro 'hwDigitalWrite'
    
       hwDigitalWrite(_slaveSelectPin, HIGH);
    
       ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:180: error: '__digitalPinToBit' was not declared in this scope
    
       #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), __digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                                                                                        ^
    
    C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino/Arduino.h:112:49: note: in definition of macro 'bitSet'
    
     #define bitSet(value, bit) ((value) |= (1UL << (bit)))
    
                                                     ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:117: note: in expansion of macro 'bitWrite'
    
       #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), __digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                         ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/core/MyHwATMega328.h:61:40: note: in expansion of macro 'digitalWriteFast'
    
     #define hwDigitalWrite(__pin, __value) digitalWriteFast(__pin, __value)
    
                                            ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/RFM69/RFM69.cpp:90:3: note: in expansion of macro 'hwDigitalWrite'
    
       hwDigitalWrite(_slaveSelectPin, HIGH);
    
       ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:91:172: error: '__digitalPinToDDRReg' was not declared in this scope
    
       #define pinModeFast(__pin, __mode) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__mode) && (__mode!=INPUT_PULLUP)) { bitWrite(*__digitalPinToDDRReg(__pin), __digitalPinToBit(__pin), (__mode)); } else { pinMode((__pin), (__mode)); } } while (0) 
    
                                                                                                                                                                                ^
    
    C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino/Arduino.h:112:30: note: in definition of macro 'bitSet'
    
     #define bitSet(value, bit) ((value) |= (1UL << (bit)))
    
                                  ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:91:136: note: in expansion of macro 'bitWrite'
    
       #define pinModeFast(__pin, __mode) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__mode) && (__mode!=INPUT_PULLUP)) { bitWrite(*__digitalPinToDDRReg(__pin), __digitalPinToBit(__pin), (__mode)); } else { pinMode((__pin), (__mode)); } } while (0) 
    
                                                                                                                                            ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/core/MyHwATMega328.h:63:35: note: in expansion of macro 'pinModeFast'
    
     #define hwPinMode(__pin, __value) pinModeFast(__pin, __value)
    
                                       ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/RFM69/RFM69.cpp:91:3: note: in expansion of macro 'hwPinMode'
    
       hwPinMode(_slaveSelectPin, OUTPUT);
    
       ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:91:198: error: '__digitalPinToBit' was not declared in this scope
    
       #define pinModeFast(__pin, __mode) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__mode) && (__mode!=INPUT_PULLUP)) { bitWrite(*__digitalPinToDDRReg(__pin), __digitalPinToBit(__pin), (__mode)); } else { pinMode((__pin), (__mode)); } } while (0) 
    
                                                                                                                                                                                                          ^
    
    C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino/Arduino.h:112:49: note: in definition of macro 'bitSet'
    
     #define bitSet(value, bit) ((value) |= (1UL << (bit)))
    
                                                     ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:91:136: note: in expansion of macro 'bitWrite'
    
       #define pinModeFast(__pin, __mode) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__mode) && (__mode!=INPUT_PULLUP)) { bitWrite(*__digitalPinToDDRReg(__pin), __digitalPinToBit(__pin), (__mode)); } else { pinMode((__pin), (__mode)); } } while (0) 
    
                                                                                                                                            ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/core/MyHwATMega328.h:63:35: note: in expansion of macro 'pinModeFast'
    
     #define hwPinMode(__pin, __value) pinModeFast(__pin, __value)
    
                                       ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/RFM69/RFM69.cpp:91:3: note: in expansion of macro 'hwPinMode'
    
       hwPinMode(_slaveSelectPin, OUTPUT);
    
       ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/RFM69/RFM69.cpp: In member function 'virtual void RFM69::sendFrame(uint8_t, const void*, uint8_t, bool, bool)':
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:94:114: error: '__digitalPinToPINReg' was not declared in this scope
    
       #define digitalReadFast(__pin) ( (bool) (__builtin_constant_p(__pin) ) ? (( bitRead(*__digitalPinToPINReg(__pin), __digitalPinToBit(__pin))) ) : digitalRead((__pin)) )
    
                                                                                                                      ^
    
    C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino/Arduino.h:111:32: note: in definition of macro 'bitRead'
    
     #define bitRead(value, bit) (((value) >> (bit)) & 0x01)
    
                                    ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/core/MyHwATMega328.h:62:30: note: in expansion of macro 'digitalReadFast'
    
     #define hwDigitalRead(__pin) digitalReadFast(__pin)
    
                                  ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/RFM69/RFM69.cpp:338:10: note: in expansion of macro 'hwDigitalRead'
    
       while (hwDigitalRead(_interruptPin) == 0 && millis() - txStart < RF69_TX_LIMIT_MS) {} // wait for DIO0 to turn HIGH signalling transmission finish
    
              ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:94:140: error: '__digitalPinToBit' was not declared in this scope
    
       #define digitalReadFast(__pin) ( (bool) (__builtin_constant_p(__pin) ) ? (( bitRead(*__digitalPinToPINReg(__pin), __digitalPinToBit(__pin))) ) : digitalRead((__pin)) )
    
                                                                                                                                                ^
    
    C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino/Arduino.h:111:43: note: in definition of macro 'bitRead'
    
     #define bitRead(value, bit) (((value) >> (bit)) & 0x01)
    
                                               ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/core/MyHwATMega328.h:62:30: note: in expansion of macro 'digitalReadFast'
    
     #define hwDigitalRead(__pin) digitalReadFast(__pin)
    
                                  ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/RFM69/RFM69.cpp:338:10: note: in expansion of macro 'hwDigitalRead'
    
       while (hwDigitalRead(_interruptPin) == 0 && millis() - txStart < RF69_TX_LIMIT_MS) {} // wait for DIO0 to turn HIGH signalling transmission finish
    
              ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/RFM69/RFM69.cpp: In member function 'virtual void RFM69::select()':
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:154: error: '__digitalPinToPortReg' was not declared in this scope
    
       #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), __digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                                                              ^
    
    C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino/Arduino.h:112:30: note: in definition of macro 'bitSet'
    
     #define bitSet(value, bit) ((value) |= (1UL << (bit)))
    
                                  ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:117: note: in expansion of macro 'bitWrite'
    
       #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), __digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                         ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/core/MyHwATMega328.h:61:40: note: in expansion of macro 'digitalWriteFast'
    
     #define hwDigitalWrite(__pin, __value) digitalWriteFast(__pin, __value)
    
                                            ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/RFM69/RFM69.cpp:488:3: note: in expansion of macro 'hwDigitalWrite'
    
       hwDigitalWrite(_slaveSelectPin, LOW);
    
       ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:180: error: '__digitalPinToBit' was not declared in this scope
    
       #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), __digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                                                                                        ^
    
    C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino/Arduino.h:112:49: note: in definition of macro 'bitSet'
    
     #define bitSet(value, bit) ((value) |= (1UL << (bit)))
    
                                                     ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:117: note: in expansion of macro 'bitWrite'
    
       #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), __digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                         ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/core/MyHwATMega328.h:61:40: note: in expansion of macro 'digitalWriteFast'
    
     #define hwDigitalWrite(__pin, __value) digitalWriteFast(__pin, __value)
    
                                            ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/RFM69/RFM69.cpp:488:3: note: in expansion of macro 'hwDigitalWrite'
    
       hwDigitalWrite(_slaveSelectPin, LOW);
    
       ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/RFM69/RFM69.cpp: In member function 'virtual void RFM69::unselect()':
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:154: error: '__digitalPinToPortReg' was not declared in this scope
    
       #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), __digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                                                              ^
    
    C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino/Arduino.h:112:30: note: in definition of macro 'bitSet'
    
     #define bitSet(value, bit) ((value) |= (1UL << (bit)))
    
                                  ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:117: note: in expansion of macro 'bitWrite'
    
       #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), __digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                         ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/core/MyHwATMega328.h:61:40: note: in expansion of macro 'digitalWriteFast'
    
     #define hwDigitalWrite(__pin, __value) digitalWriteFast(__pin, __value)
    
                                            ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/RFM69/RFM69.cpp:493:3: note: in expansion of macro 'hwDigitalWrite'
    
       hwDigitalWrite(_slaveSelectPin, HIGH);
    
       ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:180: error: '__digitalPinToBit' was not declared in this scope
    
       #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), __digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                                                                                        ^
    
    C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino/Arduino.h:112:49: note: in definition of macro 'bitSet'
    
     #define bitSet(value, bit) ((value) |= (1UL << (bit)))
    
                                                     ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:117: note: in expansion of macro 'bitWrite'
    
       #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), __digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                         ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/core/MyHwATMega328.h:61:40: note: in expansion of macro 'digitalWriteFast'
    
     #define hwDigitalWrite(__pin, __value) digitalWriteFast(__pin, __value)
    
                                            ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/RFM69/RFM69.cpp:493:3: note: in expansion of macro 'hwDigitalWrite'
    
       hwDigitalWrite(_slaveSelectPin, HIGH);
    
       ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/RFM69/RFM69.cpp: In member function 'void RFM69::setCS(uint8_t)':
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:154: error: '__digitalPinToPortReg' was not declared in this scope
    
       #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), __digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                                                              ^
    
    C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino/Arduino.h:112:30: note: in definition of macro 'bitSet'
    
     #define bitSet(value, bit) ((value) |= (1UL << (bit)))
    
                                  ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:117: note: in expansion of macro 'bitWrite'
    
       #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), __digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                         ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/core/MyHwATMega328.h:61:40: note: in expansion of macro 'digitalWriteFast'
    
     #define hwDigitalWrite(__pin, __value) digitalWriteFast(__pin, __value)
    
                                            ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/RFM69/RFM69.cpp:530:3: note: in expansion of macro 'hwDigitalWrite'
    
       hwDigitalWrite(_slaveSelectPin, HIGH);
    
       ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:180: error: '__digitalPinToBit' was not declared in this scope
    
       #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), __digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                                                                                        ^
    
    C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino/Arduino.h:112:49: note: in definition of macro 'bitSet'
    
     #define bitSet(value, bit) ((value) |= (1UL << (bit)))
    
                                                     ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:117: note: in expansion of macro 'bitWrite'
    
       #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), __digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                         ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/core/MyHwATMega328.h:61:40: note: in expansion of macro 'digitalWriteFast'
    
     #define hwDigitalWrite(__pin, __value) digitalWriteFast(__pin, __value)
    
                                            ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/RFM69/RFM69.cpp:530:3: note: in expansion of macro 'hwDigitalWrite'
    
       hwDigitalWrite(_slaveSelectPin, HIGH);
    
       ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:91:172: error: '__digitalPinToDDRReg' was not declared in this scope
    
       #define pinModeFast(__pin, __mode) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__mode) && (__mode!=INPUT_PULLUP)) { bitWrite(*__digitalPinToDDRReg(__pin), __digitalPinToBit(__pin), (__mode)); } else { pinMode((__pin), (__mode)); } } while (0) 
    
                                                                                                                                                                                ^
    
    C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino/Arduino.h:112:30: note: in definition of macro 'bitSet'
    
     #define bitSet(value, bit) ((value) |= (1UL << (bit)))
    
                                  ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:91:136: note: in expansion of macro 'bitWrite'
    
       #define pinModeFast(__pin, __mode) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__mode) && (__mode!=INPUT_PULLUP)) { bitWrite(*__digitalPinToDDRReg(__pin), __digitalPinToBit(__pin), (__mode)); } else { pinMode((__pin), (__mode)); } } while (0) 
    
                                                                                                                                            ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/core/MyHwATMega328.h:63:35: note: in expansion of macro 'pinModeFast'
    
     #define hwPinMode(__pin, __value) pinModeFast(__pin, __value)
    
                                       ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/RFM69/RFM69.cpp:531:3: note: in expansion of macro 'hwPinMode'
    
       hwPinMode(_slaveSelectPin, OUTPUT);
    
       ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:91:198: error: '__digitalPinToBit' was not declared in this scope
    
       #define pinModeFast(__pin, __mode) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__mode) && (__mode!=INPUT_PULLUP)) { bitWrite(*__digitalPinToDDRReg(__pin), __digitalPinToBit(__pin), (__mode)); } else { pinMode((__pin), (__mode)); } } while (0) 
    
                                                                                                                                                                                                          ^
    
    C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino/Arduino.h:112:49: note: in definition of macro 'bitSet'
    
     #define bitSet(value, bit) ((value) |= (1UL << (bit)))
    
                                                     ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:91:136: note: in expansion of macro 'bitWrite'
    
       #define pinModeFast(__pin, __mode) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__mode) && (__mode!=INPUT_PULLUP)) { bitWrite(*__digitalPinToDDRReg(__pin), __digitalPinToBit(__pin), (__mode)); } else { pinMode((__pin), (__mode)); } } while (0) 
    
                                                                                                                                            ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/core/MyHwATMega328.h:63:35: note: in expansion of macro 'pinModeFast'
    
     #define hwPinMode(__pin, __value) pinModeFast(__pin, __value)
    
                                       ^
    
    C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/RFM69/RFM69.cpp:531:3: note: in expansion of macro 'hwPinMode'
    
       hwPinMode(_slaveSelectPin, OUTPUT);
    
       ^
    
    

  • Hardware Contributor

    Looks like 1284p defines are missing in digitalWriteFast.h
    that should be fixed soon..bug reported 😉 or i will look asap pin mapping of 1284..



  • @scalz That's what I thought! Thanks



  • Anyone have a fix for this yet??

    Thanks



  • @lafleur I have not tried it yet on the latest beta. Maybe @scalz would know if this has been fixed?



  • I'm using beta from Yesterday (23Nov2016), still an issue...

    Made these changes in: digitalWriteFast.h to get started as the 644 and 1284 have the same pinout.

    #elif defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)
    	#define __digitalPinToPortReg(__pin)	(((__pin) <= 7) ? &PORTB : (((__pin) >= 8 && (__pin) <= 15) ? &PORTD : (((__pin) >= 16 && (__pin) <= 23) ? &PORTC : &PORTA)))
    	#define __digitalPinToDDRReg(__pin)		(((__pin) <= 7) ? &DDRB : (((__pin) >= 8 && (__pin) <= 15) ? &DDRD : (((__pin) >= 8 && (__pin) <= 15) ? &DDRC : &DDRA)))
    	#define __digitalPinToPINReg(__pin)		(((__pin) <= 7) ? &PINB : (((__pin) >= 8 && (__pin) <= 15) ? &PIND : (((__pin) >= 8 && (__pin) <= 15) ? &PINC : &PINA)))
    	#define __digitalPinToBit(__pin)		(((__pin) <= 7) ? (__pin) : (((__pin) >= 8 && (__pin) <= 15) ? (__pin) - 8 : (((__pin) >= 16 && (__pin) <= 23) ? (__pin) - 16 : (__pin) - 24)))
    
    

    But now I get:

    "digitalPinToInterrupt" not defined

    This function seem to be defined for a RPI, but I'm using a MoteinoMEGA, so something is still wrong. I just deleted the function call for now. Not needed on Arduino.



  • @scalz just before I try the latest 2.1.0 version, do you know if this issue with moteino mega mapping has been fixed please?


  • Admin

    2.1.1 (released yesterday) should fix the issue.



  • @hek I can confirm that v.2.1.1 compiles for Moteino Mega. Will update the software on my Mega shortly.



  • I think i still get the same "digitalPinToInterrupt" compile error as @lafleur (has 2.1.1 fixed this for you?) with MoteinoMega but im now on Mysensors 2.1.1
    Im trying a RFM95MQTTGateway.

    In the sketch i have defined:

    #define MY_RFM95_SPI_CS            4
    #define MY_RFM95_IRQ_PIN           2
    
    In file included from C:\Program Files (x86)\Arduino\libraries\MySensors/MySensors.h:304:0,
    
                     from C:\Users\somewhere..........Node101Motion_rfm95v1test.ino:54:
    
    C:\Program Files (x86)\Arduino\libraries\MySensors/drivers/RFM95/RFM95.cpp: In function 'bool RFM95_initialise(float)':
    
    C:\Program Files (x86)\Arduino\libraries\MySensors/drivers/RFM95/RFM95.cpp:165:60: error: 'digitalPinToInterrupt' was not declared in this scope
    
      _SPI.usingInterrupt(digitalPinToInterrupt(MY_RFM95_IRQ_PIN));```


  • @Tris yes, there is still an issue with RFM95 and ATmega1284(P) - hopefully will be dealt with in the next release


  • Admin


 

306
Online

7.7k
Users

8.6k
Topics

92.3k
Posts