intel_ReadIdentification
Default mainpageat91libmemoriesnorflashintel_ReadIdentification
Description Source Call Graph
Start Line: 104
unsigned int intel_ReadIdentification(struct NorFlashInfo *pNorFlashInfo, unsigned int offset)
{
    unsigned int data;
    unsigned char busWidth;
    unsigned int address;
    
    busWidth = NorFlash_GetDataBusWidth(pNorFlashInfo);
    // Issue the Read Device Identifier command at specified address.
    WriteCommand(busWidth, 
                 NorFlash_GetByteAddressInChip(pNorFlashInfo, 0), 
                 INTEL_CMD_IDIN);
    
    if(offset >= INTEL_LOCKSTATUS) {
        // Block base address.
        address = NorFlash_GetAddressInChip (pNorFlashInfo, offset);
    }
    else {
        address = NorFlash_GetByteAddressInChip (pNorFlashInfo, offset);
    }
    ReadRawData(busWidth, address, (unsigned char*)&data);
    return data;
}