/* Read magnetometer device ID. 
This function reads the magnetometer hardware identification registers and returns these values to the addresses specified in the function parameters. */
static bool hmc5883l_device_id(sensor_hal_t *hal, sensor_data_t *data)
/* Read magnetometer device ID. 
This function reads the magnetometer hardware identification registers and returns these values to the addresses specified in the function parameters. */
static bool hmc5883l_device_id(sensor_hal_t *hal, sensor_data_t *data)
{
	uint32_t id_reg = 0;
	size_t const id_len = 3;
	size_t const count = sensor_bus_read
				(hal, HMC5883L_ID_REG_A, &id_reg, id_len);
	data->device.id  = cpu_to_be32(id_reg) >> 8;
	data->device.version = 0;
	return (count == id_len);
}