void AT26D_WaitReady(At26 *pAt26) { unsigned char ready = 0; SANITY_CHECK(pAt26); // Read status register and check busy bit while (!ready) { ready = ((AT26D_ReadStatus(pAt26) & AT26_STATUS_RDYBSY) == AT26_STATUS_RDYBSY_READY); } }