Serial communication API

I want to develop my plugin that draw some objects with data from serial port like Firefly. Now I’m using STM32F MCU and trying to communicate with Window PC by using serial communication (UART). Is there any API to open serial port and get data from it?