/* This API maps the actual burst read length set by user.  */
static int8_t map_read_len(uint16_t *len, const struct bmi160_dev *dev)
/* This API maps the actual burst read length set by user.  */
static int8_t map_read_len(uint16_t *len, const struct bmi160_dev *dev)
{
    int8_t rslt = BMI160_OK;
    switch (dev->aux_cfg.aux_rd_burst_len)
    {
        case BMI160_AUX_READ_LEN_0:
            *len = 1;
            break;
        case BMI160_AUX_READ_LEN_1:
            *len = 2;
            break;
        case BMI160_AUX_READ_LEN_2:
            *len = 6;
            break;
        case BMI160_AUX_READ_LEN_3:
            *len = 8;
            break;
        default:
            rslt = BMI160_E_INVALID_INPUT;
            break;
    }
    return rslt;
}