Skip to content

SoftwareSerial examples for Arduino M0 will not compile #234

Open
@control48

Description

@control48

IDE: 1.8.2
Installation: C:\Program Files (x86)\Arduino\portable\packages\arduino\hardware\samd\1.6.15\libraries\SoftwareSerial\SoftwareSerial.cpp and \SoftwareSerial.h (from github from samd hardware)

Application : SoftwareSerialExample.ino (the original example)

Errors:

sketch\SoftwareSerial.cpp: In member function 'void SoftwareSerial::setTX(uint8_t)':

SoftwareSerial.cpp:174: error: cannot convert 'volatile uint32_t* {aka volatile long unsigned int*}' to 'volatile PORT_OUT_Type*' in assignment

   _transmitPortRegister = portOutputRegister(port);

                         ^

sketch\SoftwareSerial.cpp: In member function 'void SoftwareSerial::setRX(uint8_t)':

SoftwareSerial.cpp:186: error: cannot convert 'volatile uint32_t* {aka volatile long unsigned int*}' to 'volatile PORT_IN_Type*' in assignment

   _receivePortRegister = portInputRegister(port);

                        ^

exit status 1
cannot convert 'volatile uint32_t* {aka volatile long unsigned int*}' to 'volatile PORT_OUT_Type*' in assignment

What is wrong in the data type/ struc/?? that breaks this function? Attempted to port srv code base to samd base and the broken samd version does not work for serial I/O. Does anyone have a working example or modified .cpp / .h set that works?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions