mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-12-23 21:29:28 +00:00
Clean up some ctors/dtors.
This commit is contained in:
parent
d61d1d71eb
commit
c218badd5a
@ -55,8 +55,6 @@ ADB_Bus::ADB_Bus() {
|
||||
mouse_access_no = adb_relative;
|
||||
}
|
||||
|
||||
ADB_Bus::~ADB_Bus() {}
|
||||
|
||||
bool ADB_Bus::listen(int device, int reg) {
|
||||
if (device == keyboard_access_no) {
|
||||
if (adb_keybd_listen(reg)) {
|
||||
|
@ -51,7 +51,7 @@ enum adb_default_values {
|
||||
class ADB_Bus {
|
||||
public:
|
||||
ADB_Bus();
|
||||
~ADB_Bus();
|
||||
~ADB_Bus() = default;
|
||||
|
||||
bool listen(int device, int reg);
|
||||
bool talk(int device, int reg, uint16_t value);
|
||||
|
@ -45,6 +45,7 @@ enum HWCompType : int {
|
||||
/** Abstract base class for HW components. */
|
||||
class HWComponent {
|
||||
public:
|
||||
HWComponent() = default;
|
||||
virtual ~HWComponent() = default;
|
||||
|
||||
virtual std::string get_name(void) {
|
||||
|
@ -47,9 +47,7 @@ public:
|
||||
I2CBus() {
|
||||
std::memset(this->dev_list, 0, sizeof(this->dev_list));
|
||||
};
|
||||
~I2CBus() {
|
||||
std::memset(this->dev_list, 0, sizeof(this->dev_list));
|
||||
};
|
||||
virtual ~I2CBus() = default;
|
||||
|
||||
virtual void register_device(uint8_t dev_addr, I2CDevice* dev_obj) {
|
||||
if (this->dev_list[dev_addr]) {
|
||||
|
@ -30,6 +30,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
/** Abstract class representing a simple, memory-mapped I/O device */
|
||||
class MMIODevice : public HWComponent {
|
||||
public:
|
||||
MMIODevice() = default;
|
||||
virtual uint32_t read(uint32_t reg_start, uint32_t offset, int size) = 0;
|
||||
virtual void write(uint32_t reg_start, uint32_t offset, uint32_t value, int size) = 0;
|
||||
virtual ~MMIODevice() = default;
|
||||
|
Loading…
Reference in New Issue
Block a user