title: How to bypass Serial port libraries in Arduino
body: <p>I want to write my own code for managing an Arduino serial port (9bit serial) so I need to bypass the preprogrammed arduino ISR vector for Serial1 TX. I can do that by modifying HardwareSerial1.cpp but I dislike the fact that my code becomes non portable and a potential victim of library updates.</p>
  
  <p>Do you know how to program a different ISR vector without messing into library code?  I tried this in my own code to no avail:</p>
  
  <pre><code>//bypass arduino library for serial 1 and use this ISR instead
  ISR(UART1_UDRE_vect) 
  { 
      9bitSerial.interrupt(); 
  } 
  </code></pre>
  
  <p>The following error is reported, which seems to confirm the approach doesn't work:</p>
  
  <p>ISR.cpp:11:25: error: expected unqualified-id before numeric constant
  ISR.cpp:in expansion of macro 'UART1_UDRE_vect'</p>
  
  <p>Any clues? </p>