Serial.begin() with 2 parameters

Hi everyone,

Is second parameter in begin() function supported or not? On official site it says it is supported and the syntax is:

Serial.begin(speed, config);

with 'config' being one of the predefined values, like SERIAL_5E1 or SERIAL_7E1.

The problem is, that as soon as I add the SERIAL_7E1 as second parameter, the compiler gives me error:
'SERIAL_7E1' was not declared in this scope.

The sketch compiles OK with just one parameter.

Here is how I code it:

 Serial.begin (9600, SERIAL_7E1);

Do I need to add #include ? If yes - what's the name of library?

The selected board is Arduino Mega 2560.
Thanks in advance.

You con't have to include something.

But you should use the latest Arduino software.

Just confirm in a blank sketch that this won't compile:

void setup(){
  Serial.begin(9600,SERIAL_7E1);
}

void loop(){}

It compiles for me using IDE 1.0.4

It compiled for me, too, using IDE 1.0.4.

How to use this forum

blackbolek:
Is second parameter in begin() function supported or not? On official site it says it is supported and the syntax is:

What IDE do you have?

How to use this forum

Sorry, yes I probably should have phrased that better, what I wrote should definitely work, but should be a quick test of what the OP said was wrong

Thanks for all the replays. The problem was old version of IDE. I'm using Linux Mint and the version in Software Manager was not updated.
I downloaded v. 1.0.4 and it compiles OK.