This commit is contained in:
greedyhao
2019-10-05 20:44:28 +08:00
parent f97e223929
commit 071d438d59
5 changed files with 13 additions and 26 deletions

View File

@ -107,24 +107,6 @@ void rcvr_spi_multi (
UINT btr /* Number of bytes to receive (even number) */
)
{
// WORD d;
// SPI_CTL0(SPI1) = (SPI_CTL0(SPI1) & ~0x800) | 0x800; /* Put SPI into 16-bit mode */
// spi_i2s_data_transmit(SPI1, 0xFFFF); /* Start the first SPI transaction */
// btr -= 2;
// do { /* Receive the data block into buffer */
// while(RESET == spi_i2s_flag_get(SPI1, SPI_FLAG_RBNE)); /* Wait for end of the SPI transaction */
// d = spi_i2s_data_receive(SPI1); /* Get received word */
// spi_i2s_data_transmit(SPI1, 0xFFFF); /* Start next transaction */
// buff[1] = d; buff[0] = d >> 8; /* Store received data */
// buff += 2;
// } while (btr -= 2);
// while(RESET == spi_i2s_flag_get(SPI1, SPI_FLAG_RBNE)); /* Wait for end of the SPI transaction */
// d = spi_i2s_data_receive(SPI1); /* Get last word received */
// buff[1] = d; buff[0] = d >> 8; /* Store it */
// SPI_CTL0(SPI1) = (SPI_CTL0(SPI1) & ~0x800) | 0x00; /* Put SPI into 8-bit mode */
do
{
*buff = xchg_spi(0xff);

View File

@ -104,6 +104,11 @@ int main(void)
}
else
{
LCD_ShowString(24, 0, (u8 *)("no card found!"), BLACK);
LCD_ShowString(24, 16, (u8 *)("no card found!"), BLUE);
LCD_ShowString(24, 32, (u8 *)("no card found!"), BRED);
LCD_ShowString(24, 48, (u8 *)("no card found!"), GBLUE);
LCD_ShowString(24, 64, (u8 *)("no card found!"), RED);
while (1)
{
LEDR_TOG;