Print command with SerialOpen

Hello,

On version 0.22, with Serial.begin(9600), I used Serial.println("Test") without any problem, however it does not work with SerialOpen(0,9600) on verson 1.0

Could someone tell me why, and a correct print command with using SerialOpen ?

Thanks Eaton

What is SerialOpen?

Sorry, forgot to attach the function defined

void SerialOpen(uint8_t port, uint32_t baud) {
uint8_t h = ((F_CPU / 4 / baud -1) / 2) >> 8;
uint8_t l = ((F_CPU / 4 / baud -1) / 2);
switch (port) {
case 0: UCSR0A = (1<<U2X0); UBRR0H = h; UBRR0L = l; UCSR0B |= (1<<RXEN0)|(1<<TXEN0)|(1<<RXCIE0); break;
#if defined(MEGA)
case 1: UCSR1A = (1<<U2X1); UBRR1H = h; UBRR1L = l; UCSR1B |= (1<<RXEN1)|(1<<TXEN1)|(1<<RXCIE1); break;
case 2: UCSR2A = (1<<U2X2); UBRR2H = h; UBRR2L = l; UCSR2B |= (1<<RXEN2)|(1<<TXEN2)|(1<<RXCIE2); break;
case 3: UCSR3A = (1<<U2X3); UBRR3H = h; UBRR3L = l; UCSR3B |= (1<<RXEN3)|(1<<TXEN3)|(1<<RXCIE3); break;
#endif
}
}

Okay. That still doesn't explain what SerialOpen is. I don't know what it is or how it relates to the Arduino Serial library.

Why have you written (or borrowed) this convoluted function that will only work on one kind of Arduino? What is wrong with using the Serial.begin() method in 1.0?