Is it possible to terminate serial communication ?

I'm using pins 0 & 1 for serial communication. In order to do that, I set serial.begin(9600) and, then, serial.read and serial.print as needed.

In my application, however, after a certain point I would like that pins 0 & 1 stop acting as serial communication ports and start behaving as normal digital pins (supporting digitalRead & digitalWrite).

How do I do it ? Do I need any specific command to stop the serial communication mode or do I just need to declare the new pinMode for pins 0 & 1 ?

Maybe Serial.end()

http://arduino.cc/en/Serial/End

Serial

end() Description

Disables serial communication, allowing the RX and TX pins to be used for general input and output. To re-enable serial communication, call Serial.begin().

You were right: I was using an older version of the Arduino SW that didn't have the command Serial.end(). Once I downloaded the newer SW, I was able to use Serial.end() and it solved my problem.

Thank you !