| 13 | } |
| 14 | |
| 15 | int32_t Axp192::i2cWrite(void* handle, uint8_t address, uint8_t reg, const uint8_t* buffer, uint16_t size) { |
| 16 | const auto* device = static_cast<Axp192*>(handle); |
| 17 | if (i2c_controller_write_register(device->configuration->controller, address, reg, buffer, size, device->configuration->writeTimeout) == ERROR_NONE) { |
| 18 | return AXP192_OK; |
| 19 | } else { |
| 20 | return 1; |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | bool Axp192::supportsMetric(MetricType type) const { |
| 25 | if (!isInitialized) { |
nothing calls this directly
no test coverage detected