Ejemplo n.º 1
0
static void IsWriteInProgress(void)
{
    volatile unsigned char temp = 0;
    do
    {
        temp = FlashStatusRead();
    }while(temp & WRITE_IN_PROGRESS);
}
Ejemplo n.º 2
0
/*
**    This function will check whether flash is busy with any operation like
**    read, write, sector erase.
*/
static void IsFlashBusy(void)
{
    unsigned char temp = 0;
    
    do
    {
        temp = FlashStatusRead();
    }
    while(temp & IS_FLASH_BUSY);
}
Ejemplo n.º 3
0
/*
**    This function will check whether write enable command is successfully
**    latched on to flash or not.
*/
static void IsWriteEnabled(void)
{
    unsigned char temp = 0;

    do
    {
        /* Read the status from flash */
        temp = FlashStatusRead();
    }
    while(!(temp & WRITE_EN_LATCHED)); 
}
Ejemplo n.º 4
0
static unsigned int IsWriteEnabled(void)
{
    volatile unsigned char temp = 0;
    unsigned int retVal = FALSE;

    /* Reading the Status Register of SPI Flash. */
    temp = FlashStatusRead();

    if (temp & WRITE_ENABLE_LATCH)
    { 
	retVal = TRUE;
    }

    return retVal;
}