/* This API gets the interrupt mode which is set in the sensor.  */
uint16_t bma4_get_interrupt_mode(uint8_t *mode, struct bma4_dev *dev)
/* This API gets the interrupt mode which is set in the sensor.  */
uint16_t bma4_get_interrupt_mode(uint8_t *mode, 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_INTR_LATCH_ADDR, &data, 1, dev);
        *mode = data;
    }
    return rslt;
}