-
Notifications
You must be signed in to change notification settings - Fork 7
SoftwareSerial does not compile with Calunium's pins_arduino.h #1
Description
When including SoftwareSerial into the Arduino 1.0.1 IDE targeting Calunium 1284P the code wont compile due to compilation errors in SoftwareSerial.cpp.
arduino-1.0.1\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::begin(long int)':
arduino-1.0.1\libraries\SoftwareSerial\SoftwareSerial.cpp:398: error: operands to ?: have different types 'int' and 'uint8_t_'
arduino-1.0.1\libraries\SoftwareSerial\SoftwareSerial.cpp:399: error: expected primary-expression before ']' token
arduino-1.0.1\libraries\SoftwareSerial\SoftwareSerial.cpp:399: error: operands to ?: have different types 'int' and 'uint8_t_'
arduino-1.0.1\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::end()':
arduino-1.0.1\libraries\SoftwareSerial\SoftwareSerial.cpp:414: error: expected primary-expression before ']' token
arduino-1.0.1\libraries\SoftwareSerial\SoftwareSerial.cpp:415: error: expected primary-expression before ']' token
arduino-1.0.1\libraries\SoftwareSerial\SoftwareSerial.cpp:415: error: operands to ?: have different types 'int' and 'uint8_t*'
I found that the problem occurs due to these lines in pins_arduino.h:
define digitalPinToPCICR(p) ifpin(p,&PCICR,(uint8_t *)0)
define digitalPinToPCICRbit(p) ifpin(p,digital_pin_to_pcint[p] >> 3,(uint8_t *)0)
define digitalPinToPCMSK(p) ifpin(p,__pcmsk[digital_pin_to_pcint[]],(uint8_t *)0)
define digitalPinToPCMSKbit(p) ifpin(p,digital_pin_to_pcint[p] & 0x7,(uint8_t *)0)
Changing them to this makes it compilable: