Instead of calling uint8_t mpu_read_register(uint8_t address) twice we could implement an uint32_t mpu_read_registers(address, size). Or at least an uint16_t mpu_read_register_pair(address) that returns the 2-bytes reading.
It seems that if you keep sending zeroes through the SPI the gyro keeps dumping the next adjacent bytes in its memory. This will optimize 16 bits outputs.
Instead of calling
uint8_t mpu_read_register(uint8_t address)twice we could implement anuint32_t mpu_read_registers(address, size). Or at least anuint16_t mpu_read_register_pair(address)that returns the 2-bytes reading.It seems that if you keep sending zeroes through the SPI the gyro keeps dumping the next adjacent bytes in its memory. This will optimize 16 bits outputs.