Description
Source
Call Graph
Start Line: 101
void AT26_Configure(At26 *pAt26, Spid *pSpid, unsigned char cs)
{
SpidCmd *pCommand;
SANITY_CHECK(pAt26);
SANITY_CHECK(pSpid);
SANITY_CHECK(cs < 4);
// Configure the SPI chip select for the serial flash
SPID_ConfigureCS(pSpid, cs, CSR);
// Initialize the AT26 fields
pAt26->pSpid = pSpid;
pAt26->pDesc = 0;
// Initialize the command structure
pCommand = &(pAt26->command);
pCommand->pCmd = (unsigned char *) pAt26->pCmdBuffer;
pCommand->callback = 0;
pCommand->pArgument = 0;
pCommand->spiCs = cs;
}