diff --git a/libraries/AP_HAL/Device.h b/libraries/AP_HAL/Device.h index 8f6af29b90..2d73a2f13e 100644 --- a/libraries/AP_HAL/Device.h +++ b/libraries/AP_HAL/Device.h @@ -69,6 +69,12 @@ public: return transfer(&first_reg, 1, recv, recv_len); } + /** + * Wrapper function over #transfer() to write a byte to the register reg. + * The transfer is done by sending reg and val in that order. + * + * Return: true on a successful transfer, false on failure. + */ bool write_register(uint8_t reg, uint8_t val) { uint8_t buf[2] = { reg, val };