AT45_Configure
Default mainpageat91libmemoriesspi-flashAT45_Configure
Description Source Call Graph
Start Line: 83
unsigned char AT45_Configure(At45 *pAt45, Spid *pSpid, unsigned char spiCs)
{
    SpidCmd *pCommand;

    // Sanity checks
    ASSERT(pSpid, "AT45_Configure: pSpid is 0.\n\r");
    ASSERT(pAt45, "AT45_Configure: pAt45 is 0.\n\r");

    // Initialize the At45 instance
    pAt45->pSpid = pSpid;
    pAt45->pDesc = 0;
    memset(pAt45->pCmdBuffer, 0, 8);

    // Initialize the spidCmd structure
    pCommand = &(pAt45->command);
    pCommand->pCmd = pAt45->pCmdBuffer;
    pCommand->callback = 0;
    pCommand->pArgument = 0;
    pCommand->spiCs = spiCs;

    return 0;
}