/* This API reads the data ready status of Mag from the sensor. The status get reset when Mag data register is read.  */
uint16_t bma4_get_mag_data_rdy(uint8_t *data_rdy, struct bma4_dev *dev)
/* This API reads the data ready status of Mag from the sensor. The status get reset when Mag data register is read.  */
uint16_t bma4_get_mag_data_rdy(uint8_t *data_rdy, 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_STATUS_ADDR, &data, 1, dev);
        if (rslt == BMA4_OK)
            *data_rdy = BMA4_GET_BITSLICE(data, BMA4_STAT_DATA_RDY_MAG);
    }
    return rslt;
}