Go Down

Topic: Modifying the HWSerial to make other Framelength possible (Read 1 time) previous topic - next topic



I'm working on a modification of HWSerial of Arduino 1.0 to make it possible to select the framelength/parity/stopbits like this:

Code: [Select]

The setup of the Serial Port works fine now, but im not very familiar with cpp  (virtual methods, polimorphism, inheritance, etc.) :(
Why i do this is just because i want to port my working c version of a Vending Machine Interface to Arduino.
This MDB interface need 9,N,1 (which arduino does not support so far).

I want to overload the write method that it takes a uint16_t argument, but when i tried to overload the virtual write method in HWSerial i get compiler errors.
Is it correct that the HWSerial get the write method from print.cpp ?

Would be nice if anybody can tell me which function i have to overload to get this working :)

If my explanation is not detailed enough please tell me!



Is it correct that the HWSerial get the write method from print.cpp ?

No. HardwareSerial gets the write() method from the Print class in Print.cpp (case matters, if you haven't figure that out, as do complete names).
The art of getting good answers lies in asking good questions.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131