mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-11 20:29:46 +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;
|
mouse_access_no = adb_relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
ADB_Bus::~ADB_Bus() {}
|
|
||||||
|
|
||||||
bool ADB_Bus::listen(int device, int reg) {
|
bool ADB_Bus::listen(int device, int reg) {
|
||||||
if (device == keyboard_access_no) {
|
if (device == keyboard_access_no) {
|
||||||
if (adb_keybd_listen(reg)) {
|
if (adb_keybd_listen(reg)) {
|
||||||
|
@ -51,7 +51,7 @@ enum adb_default_values {
|
|||||||
class ADB_Bus {
|
class ADB_Bus {
|
||||||
public:
|
public:
|
||||||
ADB_Bus();
|
ADB_Bus();
|
||||||
~ADB_Bus();
|
~ADB_Bus() = default;
|
||||||
|
|
||||||
bool listen(int device, int reg);
|
bool listen(int device, int reg);
|
||||||
bool talk(int device, int reg, uint16_t value);
|
bool talk(int device, int reg, uint16_t value);
|
||||||
|
@ -45,6 +45,7 @@ enum HWCompType : int {
|
|||||||
/** Abstract base class for HW components. */
|
/** Abstract base class for HW components. */
|
||||||
class HWComponent {
|
class HWComponent {
|
||||||
public:
|
public:
|
||||||
|
HWComponent() = default;
|
||||||
virtual ~HWComponent() = default;
|
virtual ~HWComponent() = default;
|
||||||
|
|
||||||
virtual std::string get_name(void) {
|
virtual std::string get_name(void) {
|
||||||
|
@ -47,9 +47,7 @@ public:
|
|||||||
I2CBus() {
|
I2CBus() {
|
||||||
std::memset(this->dev_list, 0, sizeof(this->dev_list));
|
std::memset(this->dev_list, 0, sizeof(this->dev_list));
|
||||||
};
|
};
|
||||||
~I2CBus() {
|
virtual ~I2CBus() = default;
|
||||||
std::memset(this->dev_list, 0, sizeof(this->dev_list));
|
|
||||||
};
|
|
||||||
|
|
||||||
virtual void register_device(uint8_t dev_addr, I2CDevice* dev_obj) {
|
virtual void register_device(uint8_t dev_addr, I2CDevice* dev_obj) {
|
||||||
if (this->dev_list[dev_addr]) {
|
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 */
|
/** Abstract class representing a simple, memory-mapped I/O device */
|
||||||
class MMIODevice : public HWComponent {
|
class MMIODevice : public HWComponent {
|
||||||
public:
|
public:
|
||||||
|
MMIODevice() = default;
|
||||||
virtual uint32_t read(uint32_t reg_start, uint32_t offset, int size) = 0;
|
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 void write(uint32_t reg_start, uint32_t offset, uint32_t value, int size) = 0;
|
||||||
virtual ~MMIODevice() = default;
|
virtual ~MMIODevice() = default;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user