Hi,
I am trying to use NeoSWSerial with an ATmega1284p chip using MightyCore in the Arduino IDE. The code I am using works fine with an Arduino Uno, but the actual library won't compile for the ATmega 1284p chip, giving the following error
In file included from C:\Users\blake\AppData\Local\Arduino15\packages\MightyCore\hardware\avr\2.0.3\cores\MCUdude_corefiles/Arduino.h:316:0,
from C:\Users\blake\Documents\Arduino\libraries\NeoSWSerial\src/NeoSWSerial.h:4,
from C:\Users\blake\Documents\Arduino\libraries\NeoSWSerial\src\NeoSWSerial.cpp:32:
C:\Users\blake\Documents\Arduino\libraries\NeoSWSerial\src\NeoSWSerial.cpp: In member function 'void NeoSWSerial::listen()':
C:\Users\blake\AppData\Local\Arduino15\packages\MightyCore\hardware\avr\2.0.3\variants\bobuino/pins_arduino.h:130:106: error: operands to ?: have different types 'volatile uint8_t* {aka volatile unsigned char*}' and 'uint8_t {aka unsigned char}'
#define PORT_NDX_TO_PCMSK(x) ((x) == 0 ? &PCMSK0 : ((x) == 1 ? &PCMSK1 : ((x) == 2 ? &PCMSK2 : ((x) == 3 ? &PCMSK3 : (uint8_t )0))))
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\blake\AppData\Local\Arduino15\packages\MightyCore\hardware\avr\2.0.3\variants\bobuino/pins_arduino.h:132:78: note: in definition of macro 'ifpin'
#define ifpin(p,what,ifnot) (((p) >= 0 && (p) < NUM_DIGITAL_PINS) ? (what) : (ifnot))
^~~~
C:\Users\blake\AppData\Local\Arduino15\packages\MightyCore\hardware\avr\2.0.3\variants\bobuino/pins_arduino.h:135:52: note: in expansion of macro 'PORT_NDX_TO_PCMSK'
#define digitalPinToPCMSK(p) ifpin(p,(uint8_t *)PORT_NDX_TO_PCMSK(digital_pin_to_pcint[p] >> 3),(uint8_t *)0)
^~~~~~~~~~~~~~~~~
C:\Users\blake\Documents\Arduino\libraries\NeoSWSerial\src\NeoSWSerial.cpp:160:29: note: in expansion of macro 'digitalPinToPCMSK'
volatile uint8_t *pcmsk = digitalPinToPCMSK(rxPin);
^~~~~~~~~~~~~~~~~
C:\Users\blake\Documents\Arduino\libraries\NeoSWSerial\src\NeoSWSerial.cpp: In member function 'void NeoSWSerial::ignore()':
C:\Users\blake\AppData\Local\Arduino15\packages\MightyCore\hardware\avr\2.0.3\variants\bobuino/pins_arduino.h:130:106: error: operands to ?: have different types 'volatile uint8_t* {aka volatile unsigned char*}' and 'uint8_t {aka unsigned char}'
#define PORT_NDX_TO_PCMSK(x) ((x) == 0 ? &PCMSK0 : ((x) == 1 ? &PCMSK1 : ((x) == 2 ? &PCMSK2 : ((x) == 3 ? &PCMSK3 : (uint8_t )0))))
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\blake\AppData\Local\Arduino15\packages\MightyCore\hardware\avr\2.0.3\variants\bobuino/pins_arduino.h:132:78: note: in definition of macro 'ifpin'
#define ifpin(p,what,ifnot) (((p) >= 0 && (p) < NUM_DIGITAL_PINS) ? (what) : (ifnot))
^~~~
C:\Users\blake\AppData\Local\Arduino15\packages\MightyCore\hardware\avr\2.0.3\variants\bobuino/pins_arduino.h:135:52: note: in expansion of macro 'PORT_NDX_TO_PCMSK'
#define digitalPinToPCMSK(p) ifpin(p,(uint8_t *)PORT_NDX_TO_PCMSK(digital_pin_to_pcint[p] >> 3),(uint8_t *)0)
^~~~~~~~~~~~~~~~~
C:\Users\blake\Documents\Arduino\libraries\NeoSWSerial\src\NeoSWSerial.cpp:214:31: note: in expansion of macro 'digitalPinToPCMSK'
volatile uint8_t *pcmsk = digitalPinToPCMSK(rxPin);
^~~~~~~~~~~~~~~~~
Hi, I am trying to use NeoSWSerial with an ATmega1284p chip using MightyCore in the Arduino IDE. The code I am using works fine with an Arduino Uno, but the actual library won't compile for the ATmega 1284p chip, giving the following error
Any help appreciated.
Thanks,
Blake.