SpenceKonde / arduino-tiny-841

Arduino core for ATtny841, 828, 1634 and 441
http://drazzy.com/e/tiny841.shtml
Other
28 stars 8 forks source link

HardwareSerial.h doesn't define serial config values #28

Closed fson closed 8 years ago

fson commented 8 years ago

Serial config values (SERIAL_8N1, SERIAL_5N2 etc) passed as the second (optional) argument to Serial.begin(speed, config) (and some other libraries like modbus-arduino) are missing from this core.

In the official core these are defined in: https://github.com/arduino/Arduino/blob/26e25a4d58ff1a970d4790e5ccc3a5f4c3dea398/hardware/arduino/avr/cores/arduino/HardwareSerial.h#L67-L91

SpenceKonde commented 8 years ago

More serious than that - it doesn't accept the second argument either!

SpenceKonde commented 8 years ago

Try it now (github version, ofc). I just took a quick stab at pulling in those changes.

fson commented 8 years ago

Thanks, that was fast! At least my sketch compiles now, can't test more than that until I have the master device setup.

fson commented 8 years ago

Hold on, it didn't actually compile yet (I had wrong board selected when testing with the new code). Here's what I had to change to make it compile: https://github.com/fson/arduino-tiny-841/commit/3706d58fa8fb87524c8e280820229a5cc3eee8c1

SpenceKonde commented 8 years ago

Oops, yeah, missed a couple. Should be good now.

fson commented 8 years ago

@SpenceKonde &UCSR0c should be &UCSR0C (capital C) here. Otherwise good now!