MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / i2cWrite

Method i2cWrite

Drivers/AXP192/Source/Axp192.cpp:15–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13}
14
15int32_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
24bool Axp192::supportsMetric(MetricType type) const {
25 if (!isInitialized) {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected