void AT45D_WaitReady(At45 *pAt45) { unsigned char ready = 0; SANITY_CHECK(pAt45); // Poll device until it is ready while (!ready) { ready = AT45_STATUS_READY(AT45D_GetStatus(pAt45)); } }