bulebule
bulebule copied to clipboard
Implement uint32_t mpu_read_registers(address, size)
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.