SoftwareSerial 和 Serial 的父 class 是什么

What is the parent class of SoftwareSerial and Serial

我想创建一个函数来通过引用传递串行端口以读取内容。我结合使用 SoftwareSerial 和 Serial,这意味着我想将这两个对象传递给我想要创建的函数。 class 他们都继承自什么?我应该声明什么 class 我的源对象?

void getResponse(Serial &source){
    ...
}

Arduino Serial 和 SoftwareSerial 的共同基础 类 是 Stream 和 Print