/* This API sets the burst data length (1,2,6,8 byte) of auxiliary Mag sensor.  */
uint16_t bma4_set_mag_burst(uint8_t mag_burst, struct bma4_dev *dev)
/* This API sets the burst data length (1,2,6,8 byte) of auxiliary Mag sensor.  */
uint16_t bma4_set_mag_burst(uint8_t mag_burst, struct bma4_dev *dev)
{
    uint16_t rslt = 0;
    uint8_t data = 0;
    if (dev == NULL) {
        rslt |= BMA4_E_NULL_PTR;
    } else {
        rslt |= bma4_read_regs(BMA4_AUX_IF_CONF_ADDR, &data, 1, dev);
        if (rslt == BMA4_OK) {
            data = BMA4_SET_BITS_POS_0(data, BMA4_MAG_BURST, mag_burst);
            rslt |= bma4_write_regs(BMA4_AUX_IF_CONF_ADDR, &data, 1, dev);
        }
    }
    return rslt;
}