1.1 --- a/pkg/devices/lib/i2c/include/i2c-common.h Mon Oct 30 17:21:26 2023 +0100
1.2 +++ b/pkg/devices/lib/i2c/include/i2c-common.h Mon Oct 30 17:22:43 2023 +0100
1.3 @@ -37,6 +37,7 @@
1.4 {
1.5 protected:
1.6 Hw::Register_block<32> _regs;
1.7 + enum Clock_identifiers _clock;
1.8 Cpm_chip *_cpm;
1.9 uint32_t _frequency;
1.10
1.11 @@ -68,6 +69,13 @@
1.12 void queue_writes();
1.13 void store_reads();
1.14
1.15 + // Behaviour adaptations.
1.16 +
1.17 + virtual bool high_speed_mode() = 0;
1.18 + virtual bool hold_enable() = 0;
1.19 + virtual bool stop_hold() = 0;
1.20 + uint32_t stop_command();
1.21 +
1.22 public:
1.23 explicit I2c_channel(l4_addr_t start, enum Clock_identifiers clock,
1.24 Cpm_chip *cpm, uint32_t frequency);
1.25 @@ -113,6 +121,9 @@
1.26
1.27 virtual unsigned int num_channels() = 0;
1.28
1.29 + virtual I2c_channel *_get_channel(l4_addr_t addr, enum Clock_identifiers clock,
1.30 + Cpm_chip *cpm, uint32_t frequency) = 0;
1.31 +
1.32 public:
1.33 explicit I2c_chip(l4_addr_t start, l4_addr_t end, Cpm_chip *cpm,
1.34 uint32_t frequency);