[an error occurred while processing this directive]
|
void set_SPI(void)
{
int wait;
MCBSP_SAMPLE_RATE_RESET(SPI_CHANEL);
MCBSP_TX_RESET(SPI_CHANEL);
MCBSP_TX_RESET(SPI_CHANEL);
mcbsp_init
(
SPI_CHANEL,
0x00001000, /* Serial Port Control Reg. (SPCR) */
0x00000000, /* Receiver Control Reg. (RCR) */
0x00000000, /* Transmitter Control Reg. (XCR) */
0x2000006F, /* Sample-Rate Generator Reg. (SRGR) */
0x00000000, /* Multichannel Control Reg. (MCR) */
0x00000000, /* Receiver Channel Enable(RCER) */
0x00000000, /* Transmitter Channel Enable(XCER) */
0x00000E0c /* Pin Control Reg. (PCR) */
);
MCBSP_SAMPLE_RATE_ENABLE(SPI_CHANEL);
for (wait=0; wait<0x10; wait++); /* Wait states after SRG starts */
MCBSP_ENABLE(SPI_CHANEL,3);
TIMER_STOP(TIMER_CHANEL);
}
E-mail: info@telesys.ru