As far as I can tell the driver in question is for a com port chip.
Why does your application need to know anything about a specific serial port hardware device?
On Linux systems the kernel has all the drivers for various serial port devices. On the Pi SoC itself, USB/serial adapters etc.
Applications only need to talk to the kernel to use any serial ports that show up in /dev/ Typically languages provide libraries and modules to do that. For example C uses libc.
I have created code that uses serial ports in many different languages running on different operating systems and platforms. I have never needed to know about any particular serial hardware device the machine may have. Well, at least not when there is actually an operating system on the platform.
Of the thousands of lines in your application only some small part of it should need changing to make use of the proper Linux facilities.
https://elinux.org/CSharp_on_RPi#Serial ... ractive.29
Memory in C++ is a leaky abstraction .