This feels weird.
I tried to make a single sketch to get started fast in an easy way.
But I do want to return any error that could occur.
A few (hundred) more or less defines doesn't hurt. Why not let them stay ?
You can read the datasheets and make the same code as I did.
You could even remove all the error checking.
But why would you want to do that ?
http://playground.arduino.cc/Main/MPU-6050Some explaining:
The read function should return the read values and also return an error.
The error is in the return variable.
The one or more bytes that are read are placed in a memory location.
That memory location is pointed to by 'buffer'.
The 'uint8_t *' indicated that the buffer points to a memory location for unsigned 8-bit bytes.
So you declare an array: uint8_t buffer[20];
You give the read function a pointer to it : buffer
And the read function fills the buffer.