-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SoftwareSerial does not compile with Calunium's pins_arduino.h #1
Comments
I'm starting to believe though, that the digitalPinToPCMSK(p) and in particular the __pcmsk array is incomplete. Any help on completing these would be appreciated. |
I've not had chance to test this but the change to uint16_t* does look correct. Why do you believe __pcmsk is incomplete? |
I also added the index 'p' to the array lookup in digitalPinToPCMSK(p). |
I've applied the changes you suggested. |
Hi Steve |
@deladriere With two hardware UARTs I've never had the need to use SoftwareSerial. |
I am trying this code
|
Digital pin 10 is the slave select (/SS) for the SPI port. It's normally recommended that it is kept as an output; you're not using SPI so I'm not sure if that still applies. Could you try another pin? |
Hi Steve just installed the lasted version and still cannot work with the SoftwareSerial |
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:
define digitalPinToPCICR(p) ifpin(p,&PCICR,(uint8_t *)0)
define digitalPinToPCICRbit(p) ifpin(p, digital_pin_to_pcint[p] >> 3, 0)
define digitalPinToPCMSK(p) ifpin(p,(uint16_t *)__pcmsk[digital_pin_to_pcint[p]],(uint16_t *)0)
define digitalPinToPCMSKbit(p) ifpin(p, digital_pin_to_pcint[p] & 0x7, 0)
The text was updated successfully, but these errors were encountered: