Content originally posted in LPCWare by leluno on Sun May 04 10:43:03 MST 2014
void deselect (void)
{
cs_sd_high;/* CS = H */
xchg_spi(0xFF);/* Dummy clock (force DO hi-z for multiple slave SPI) */
//++kk
SSPxCR0 |= (1<<6);
SSPxCR0 |= (1<<7);
__set_PINSEL(1, 20, 0);// Attach SCK0 to I/O pad
__set_PINSEL(1, 23, 0);// Attach MISO0 to I/O pad
__set_PINSEL(1, 24, 0);// Attach MOSI0 to I/O pad
pinSEL(0,15,0b11);//0.15-4:ck
pinSEL(0,17,0b11);//0.17-4:miso
pinSEL(0,18,0b11);//0.18-4:mosi
//SSP0CPSR = 2;//oder 2?
//--kk
}
Problem with posting this code:??
SSPxCR0 |= (1<<"CPOL);
SSPxCR0 |= (1<<"CPHA);