/* Soft iron 3x3 matrix. Value are expressed in sign-module format. (Es. SVVVVVVVb where S is the sign 0/+1/- and V is the value)..  */
int32_t lsm6dsl_mag_soft_iron_mat_set(stmdev_ctx_t *ctx, uint8_t *buff)
/* Soft iron 3x3 matrix. Value are expressed in sign-module format. (Es. SVVVVVVVb where S is the sign 0/+1/- and V is the value)..  */
int32_t lsm6dsl_mag_soft_iron_mat_set(stmdev_ctx_t *ctx, uint8_t *buff)
{
  int32_t ret;
  ret = lsm6dsl_mem_bank_set(ctx, LSM6DSL_BANK_A);
  if(ret == 0){
    ret = lsm6dsl_write_reg(ctx, LSM6DSL_MAG_SI_XX, buff, 9);
    if(ret == 0){
      ret = lsm6dsl_mem_bank_set(ctx, LSM6DSL_USER_BANK);
    }
  }
  return ret;
}