val = 0x8000; while(val & 0x8000){ ifx_sw_read(0x125, &val); }