A couple of things might work:
a) makre the member function IRQHandler() public in HardwareSerial. Or maybe protected, maybe friend... If so you could maybe do something like:
Serial1.IRQHandler();
Not very clean, also if you did this for all 8 possible serial ports, this would pull in the objects, buffers, ... For all 8...
b) Even less clean, you might be able to get away with doing something similar to T3.x... Again not clean, but maybe something like:
Code:
if (CCM_CCGR3 & CCM_CCGR3_LPUART6(CCM_CCGR_ON)) IRQHandler_Serial1();
Note: again IRQHandler_Serial1 is only defined in HardwareSerial.cpp and part of a hardware table also would require probably either doing external... or exporting and again this would bring in all of these objects...
c) Wonder if you could simply look at the IRQ handler and if set called it...
That is currently the code when you call Serial1.begin(...) will do: a attachInterruptVector(hardware->irq, hardware->irq_handler);
Which in this case is: for: IRQ_LPUART6 and IRQHandler_Serial1 So would something like:
Code:
if (_VectorsRam[IRQ_LPUART6 +16]) (*_VectorsRam[IRQ_LPUART6 +16])();
Note: I have not taken a quick look at how _VectorsRam is initialized, so not sure if test would be for non NULL or not being the default handler address.
Again not sure of best ways... But the last one, hopefully does not cause any additional code to be brought in.