/* Setup SPI0 multi-function pins */
SYS->P1_MFP = SYS_MFP_P14_SPISS0 | SYS_MFP_P15_MOSI_0 | SYS_MFP_P16_MISO_0 | SYS_MFP_P17_SPICLK0;
/* Set IP clock divider. SPI clock rate = 2MHz */
SPI_Open(SPI0, SPI_MASTER, SPI_MODE_0, 32, 2000000);
/* Enable the automatic hardware slave select function. Select the SS pin and configure as low-active. */
SPI_EnableAutoSS(SPI0, SPI_SS, SPI_SS_ACTIVE_LOW);
看到有个例子有这么两句,SS是SPI选定的吗,不是可以自己操作吗,还是这样可以更高速?
|