hw/drivers/sensors/bmx160/src/bmx160.c
static int bmx160_bmm_operation_wait(struct bmx160 *bmx160)
{
    int err;
    uint8_t status = 0;

    for (int i = 0; i < 512; i++) {
        err = bmx160_reg_read(bmx160, BMX160_REG_STATUS, &status, 1);
        if (err)
            return err;

        if (status & BMX160_STATUS_MAG_MAN_OP)
            os_time_delay((OS_TICKS_PER_SEC * 1) / 1000);
        else
            return 0;
    }

    return SYS_EBUSY;
}
// wait on bmm/mag/aux operation to complete
wait on bmm/mag/aux operation to complete
wait on bmm / mag / aux operation to complete
static int bmx160_bmm_operation_wait(struct bmx160 *bmx160)
{
    int err;
    uint8_t status = 0;
    for (int i = 0; i < 512; i++) {
        err = bmx160_reg_read(bmx160, BMX160_REG_STATUS, &status, 1);
        if (err)
            return err;
        if (status & BMX160_STATUS_MAG_MAN_OP)
            os_time_delay((OS_TICKS_PER_SEC * 1) / 1000);
        else
            return 0;
    }
    return SYS_EBUSY;
}
static int bmx160_bmm_operation_wait ( struct bmx160 * bmx160 ) { int err ; uint8_t status = 0 ; for ( int i = 0 ; i < 512 ; i ++ ) { err = bmx160_reg_read ( bmx160 , BMX160_REG_STATUS , & status , 1 ) ; if ( err ) return err ; if ( status & BMX160_STATUS_MAG_MAN_OP ) os_time_delay ( ( OS_TICKS_PER_SEC * 1 ) / 1000 ) ; else return 0 ; } return SYS_EBUSY ; }
wait on bmm/mag/aux operation to complete
wait on bmm / mag / aux operation to complete