想问下倒数第四排*pBuffer = SPI_FLASH_SendByte(Dummy_Byte); 有什么用

2019-07-14 19:51发布

void SPI_FLASH_BufferRead(u8* pBuffer, u32 ReadAddr, u16 NumByteToRead)
{
  /* Select the FLASH: Chip Select low */
  SPI_FLASH_CS_LOW();

  /* Send "Read from Memory " instruction */
  SPI_FLASH_SendByte(W25X_ReadData);

  /* Send ReadAddr high nibble address byte to read from */
  SPI_FLASH_SendByte((ReadAddr & 0xFF0000) >> 16);
  /* Send ReadAddr medium nibble address byte to read from */
  SPI_FLASH_SendByte((ReadAddr& 0xFF00) >> 8);
  /* Send ReadAddr low nibble address byte to read from */
  SPI_FLASH_SendByte(ReadAddr & 0xFF);

  while (NumByteToRead--) /* while there is data to be read */
  {
    /* Read a byte from the FLASH */
    *pBuffer = SPI_FLASH_SendByte(Dummy_Byte); 注明:#define Dummy_Byte                0xFF
    /* Point to the next location where the byte read will be saved */
    pBuffer++;
  }
想问下倒数第四排*pBuffer = SPI_FLASH_SendByte(Dummy_Byte); 有什么用

0条回答

一周热门 更多>