Exemplo n.º 1
0
/**
  * @brief  Polls the status of the Write In Progress (WIP) flag in the FLASH's
  *         status register and loop until write opertaion has completed.
  * @param  None
  * @retval None
  */
void sFLASH_WaitForWriteEnd(uint32_t Addr)
{
  uint8_t flashstatus = 0;

  if(Addr >= sFLASH_MEMORYSIZE)  
	  {
		  /*!< Select the FLASH: Chip Select low */
		  sFLASH_CS2_LOW();
	  }
	  else
	  {
		  /*!< Select the FLASH: Chip Select low */
		  sFLASH_CS_LOW();
	  }  

 
  /*!< Send "Read Status Register" instruction */
  sFLASH_SendByte(sFLASH_CMD_RDSR);

  /*!< Loop as long as the memory is busy with a write cycle */
  do
  {
    /*!< Send a dummy byte to generate the clock needed by the FLASH
    and put the value of the status register in FLASH_Status variable */
    flashstatus = sFLASH_SendByte(sFLASH_DUMMY_BYTE);

  }
  while ((flashstatus & sFLASH_WIP_FLAG) == SET); /* Write in progress */

  /*!< Deselect the FLASH: Chip Select high */
  sFLASH_CS_HIGH();

}
Exemplo n.º 2
0
Arquivo: at26df.c Projeto: ADTL/AFGUI
unsigned int sFLASH_ReadStatus(void)
{
	unsigned int Temp0 = 0;
	
	/*!< Select the FLASH: Chip Select low */
	sFLASH_CS_LOW();
	
	/*!< Send "RDID " instruction */
	sFLASH_SendByte(sFLASH_CMD_RDSR);
	
	/*!< Read a byte from the FLASH */
	Temp0 = sFLASH_SendByte(sFLASH_DUMMY_BYTE);
	
	/*!< Read a byte from the FLASH */
	//Temp1 = sFLASH_SendByte(sFLASH_DUMMY_BYTE);
	
	/*!< Read a byte from the FLASH */
	//Temp2 = sFLASH_SendByte(sFLASH_DUMMY_BYTE);
	
	/*!< Deselect the FLASH: Chip Select high */
	sFLASH_CS_HIGH();
	
	//Temp = Temp0;
	
	return Temp0;
}
Exemplo n.º 3
0
/**
* @brief	Enables the write access to the FLASH.
* @param	None
* @retval None
*/
void sFLASH_SoftReset(void)
{
	/*!< Select the FLASH: Chip Select low */
	sFLASH_CS_LOW();

	/*!< Send "Write Enable" instruction */
	sFLASH_SendByte(sFLASH_CMD_RST0);

	/*!< Deselect the FLASH: Chip Select high */
	sFLASH_CS_HIGH();

	//delay	
	//sFLASH_SendByte(sFLASH_DUMMY_BYTE);


	/*!< Select the FLASH: Chip Select low */
	sFLASH_CS_LOW();

	/*!< Send "Write Enable" instruction */
	sFLASH_SendByte(sFLASH_CMD_RST1);

	/*!< Deselect the FLASH: Chip Select high */
	sFLASH_CS_HIGH();

	sFLASH_WaitForWriteEnd(0);
}
Exemplo n.º 4
0
/**
  * @brief  Reads FLASH identification.
  * @param  None
  * @retval FLASH identification
  */
uint32_t sFLASH_ReadID(void)
{
  uint32_t Temp = 0, Temp0 = 0, Temp1 = 0, Temp2 = 0;

  /*!< Select the FLASH: Chip Select low */
  sFLASH_CS_LOW();

  /*!< Send "RDID " instruction */
  sFLASH_SendByte(0x9F);

  /*!< Read a byte from the FLASH */
  Temp0 = sFLASH_SendByte(sFLASH_DUMMY_BYTE);

  /*!< Read a byte from the FLASH */
  Temp1 = sFLASH_SendByte(sFLASH_DUMMY_BYTE);

  /*!< Read a byte from the FLASH */
  Temp2 = sFLASH_SendByte(sFLASH_DUMMY_BYTE);

  /*!< Deselect the FLASH: Chip Select high */
  sFLASH_CS_HIGH();

  Temp = (Temp0 << 16) | (Temp1 << 8) | Temp2;

  return Temp;
}
Exemplo n.º 5
0
/**
 * @brief  Reads a block of data from the FLASH.
 * @param  pBuffer: pointer to the buffer that receives the data read from the FLASH.
 * @param  ReadAddr: FLASH's internal address to read from.
 * @param  NumByteToRead: number of bytes to read from the FLASH.
 * @retval None
 */
void sFLASH_ReadBuffer(uint8_t* pBuffer, uint32_t ReadAddr, uint32_t NumByteToRead)
{
    /* Select the FLASH: Chip Select low */
    sFLASH_CS_LOW();

    /* Send "Read from Memory " instruction */
    sFLASH_SendByte(sFLASH_CMD_READ);

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

    while (NumByteToRead) /* while there is data to be read */
    {
        /* Read a byte from the FLASH and point to the next location */
        *pBuffer++ = sFLASH_SendByte(sFLASH_DUMMY_BYTE);
        /* Decrement NumByteToRead */
        NumByteToRead--;
    }

    /* Deselect the FLASH: Chip Select high */
    sFLASH_CS_HIGH();
}
Exemplo n.º 6
0
/**
  * @brief  Writes more than one byte to the FLASH with a single WRITE cycle 
  *         (Page WRITE sequence).
  * @note   The number of byte can't exceed the FLASH page size.
  * @param  pBuffer: pointer to the buffer  containing the data to be written
  *         to the FLASH.
  * @param  WriteAddr: FLASH's internal address to write to.
  * @param  NumByteToWrite: number of bytes to write to the FLASH, must be equal
  *         or less than "sFLASH_PAGESIZE" value.
  * @retval None
  */
void sFLASH_WritePage(uint8_t* pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite)
{
  /*!< Enable the write access to the FLASH */
  sFLASH_WriteEnable();

  /*!< Select the FLASH: Chip Select low */
  sFLASH_CS_LOW();
  /*!< Send "Write to Memory " instruction */
  sFLASH_SendByte(sFLASH_CMD_WRITE);
  /*!< Send WriteAddr high nibble address byte to write to */
  sFLASH_SendByte((WriteAddr & 0xFF0000) >> 16);
  /*!< Send WriteAddr medium nibble address byte to write to */
  sFLASH_SendByte((WriteAddr & 0xFF00) >> 8);
  /*!< Send WriteAddr low nibble address byte to write to */
  sFLASH_SendByte(WriteAddr & 0xFF);

  /*!< while there is data to be written on the FLASH */
  while (NumByteToWrite--)
  {
    /*!< Send the current byte */
    sFLASH_SendByte(*pBuffer);
    /*!< Point on the next byte to be written */
    pBuffer++;
  }

  /*!< Deselect the FLASH: Chip Select high */
  sFLASH_CS_HIGH();

  /*!< Wait the end of Flash writing */
  sFLASH_WaitForWriteEnd();
}
Exemplo n.º 7
0
/**
  * @brief  Reads a block of data from the FLASH.
  * @param  pBuffer: pointer to the buffer that receives the data read from the FLASH.
  * @param  ReadAddr: FLASH's internal address to read from.
  * @param  NumByteToRead: number of bytes to read from the FLASH.
  * @retval None
  */
void sFLASH_ReadBuffer(uint8_t* pBuffer, uint32_t ReadAddr, uint16_t NumByteToRead)
{
  /*!< Select the FLASH: Chip Select low */
  sFLASH_CS_LOW();

  /*!< Send "Read from Memory " instruction */
  sFLASH_SendByte(sFLASH_CMD_READ);

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

  while (NumByteToRead--) /*!< while there is data to be read */
  {
    /*!< Read a byte from the FLASH */
    *pBuffer = sFLASH_SendByte(sFLASH_DUMMY_BYTE);
    /*!< Point to the next location where the byte read will be saved */
    pBuffer++;
  }

  /*!< Deselect the FLASH: Chip Select high */
  sFLASH_CS_HIGH();
}
Exemplo n.º 8
0
/**
* @brief	Enables the write access to the FLASH.
* @param	None
* @retval None
*/
void sFLASH_WriteStatusForWrite(void)
{  
#if 1
        /*!< Enable the write access to the FLASH */
        sFLASH_WriteEnable(0);

        /*!< Select the FLASH: Chip Select low */
        sFLASH_CS_LOW();

        /*!< Send "Write Enable" instruction */
        sFLASH_SendByte(sFLASH_CMD_WRSR);
        /*!< Send "Write Enable" instruction */
        sFLASH_SendByte(0x00);
        sFLASH_SendByte(0x02);

        /*!< Deselect the FLASH: Chip Select high */
        sFLASH_CS_HIGH();

        sFLASH_WaitForWriteEnd(0);

#endif	
	/*!< Select the FLASH: Chip Select low */
	sFLASH_CS_LOW();
	/*!< Send "Write Enable" instruction */
	sFLASH_SendByte(sFLASH_CMD_RDCR);
	/*!< Send "Write Enable" instruction */
	sFLASH_SendByte(sFLASH_DUMMY_BYTE);
	/*!< Deselect the FLASH: Chip Select hig */
	sFLASH_CS_HIGH();
}
Exemplo n.º 9
0
Arquivo: at26df.c Projeto: ADTL/AFGUI
void sFLASH_GlobalUnprotect(void)
{
	sFLASH_WriteEnable();
	
	sFLASH_CS_LOW();
	
	sFLASH_SendByte(sFLASH_CMD_WRSR);
	
	sFLASH_SendByte(0);

	/*!< Deselect the FLASH: Chip Select high */
	sFLASH_CS_HIGH();
	
}	
Exemplo n.º 10
0
/**
  * @brief  Initiates a read data byte (READ) sequence from the Flash.
  *   This is done by driving the /CS line low to select the device, then the READ
  *   instruction is transmitted followed by 3 bytes address. This function exit
  *   and keep the /CS line low, so the Flash still being selected. With this
  *   technique the whole content of the Flash is read with a single READ instruction.
  * @param  ReadAddr: FLASH's internal address to read from.
  * @retval None
  */
void sFLASH_StartReadSequence(uint32_t ReadAddr)
{
  /*!< Select the FLASH: Chip Select low */
  sFLASH_CS_LOW();

  /*!< Send "Read from Memory " instruction */
  sFLASH_SendByte(sFLASH_CMD_READ);

  /*!< Send the 24-bit address of the address to read from -------------------*/
  /*!< Send ReadAddr high nibble address byte */
  sFLASH_SendByte((ReadAddr & 0xFF0000) >> 16);
  /*!< Send ReadAddr medium nibble address byte */
  sFLASH_SendByte((ReadAddr& 0xFF00) >> 8);
  /*!< Send ReadAddr low nibble address byte */
  sFLASH_SendByte(ReadAddr & 0xFF);
}
Exemplo n.º 11
0
/***********************************************
函数名称:sFLASH_64KBEraseSector
功    能:擦除W25Q64 FLASH的一个块。
入口参数:无
返 回 值:无
备    注:无
************************************************/
void sFLASH_64KBEraseSector(FLADDR SectorAddr)
{   //芯片写使能
sFLASH_WriteEnable();
//芯片使能 
W25Q64_WCS_Clr();
//发送扇区擦除指令
sFLASH_SendByte(sFLASH_CMD_BE);
//发送24位地址
sFLASH_SendByte((SectorAddr & 0xFF0000) >> 16);
sFLASH_SendByte((SectorAddr & 0xFF00) >> 8);
sFLASH_SendByte(SectorAddr & 0xFF);
//芯片禁止 
W25Q64_WCS_Set();
//等待写完成
sFLASH_WaitForWriteEnd();
}
Exemplo n.º 12
0
/***********************************************
函数名称:sFLASH_WriteEnable
功    能:写使能。
入口参数:无
返 回 值:无	
备    注:无
************************************************/
void sFLASH_WriteEnable(void)
{   //使能芯片 
W25Q64_WCS_Clr();
//发送写使能指令 
sFLASH_SendByte(sFLASH_CMD_WREN);
//禁止芯片 
W25Q64_WCS_Set();
}
Exemplo n.º 13
0
/**
  * @brief  Enables the write access to the FLASH.
  * @param  None
  * @retval None
  */
void sFLASH_WriteEnable(void)
{
  /*!< Select the FLASH: Chip Select low */
  sFLASH_CS_LOW();

  /*!< Send "Write Enable" instruction */
  sFLASH_SendByte(sFLASH_CMD_WREN);

  /*!< Deselect the FLASH: Chip Select high */
  sFLASH_CS_HIGH();
}
Exemplo n.º 14
0
/**
 * @brief  Disables the write access to the FLASH.
 * @param  None
 * @retval None
 */
static void sFLASH_WriteDisable(void)
{
    /* Select the FLASH: Chip Select low */
    sFLASH_CS_LOW();

    /* Send "Write Disable" instruction */
    sFLASH_SendByte(sFLASH_CMD_WRDI);

    /* Deselect the FLASH: Chip Select high */
    sFLASH_CS_HIGH();
}
Exemplo n.º 15
0
/***********************************************
函数名称:sFLASH_ReadID
功    能:从W25Q64 FLASH读取器件ID号。
入口参数:无
返 回 值:unsigned int:读出的ID。	
备    注:无
************************************************/
unsigned int sFLASH_ReadID(void)
{
unsigned int Temp = 0; 
unsigned char Temp0 = 0, Temp1 = 0;
//使能flash
W25Q64_WCS_Clr();
//发送读flash  id号指令
sFLASH_SendByte(sFLASH_CMD_RDID);
//发送24位地址 地址为0
sFLASH_SendByte(0);
sFLASH_SendByte(0);
sFLASH_SendByte(0);
//读取返回的数据
Temp0 = sFLASH_ReadByte();
Temp1 = sFLASH_ReadByte();
//禁止flash
W25Q64_WCS_Set();
//组合数据
Temp = (Temp0 << 8) | Temp1;
return Temp;
}
Exemplo n.º 16
0
/***********************************************
函数名称:sFLASH_WritePage
功    能:向W25Q64 FLASH写入一页数据。
入口参数:pBuffer:存放写入的数据的缓冲区,
			WriteAddr:开始写入的地址,
	NumByteToWrite:写入的字节数
返 回 值:无:读出的数据。	
备    注:无
************************************************/
void sFLASH_WritePage(unsigned char* pBuffer, FLADDR WriteAddr, unsigned int NumByteToWrite)
{//芯片写使能,写之前需写使能,否则无法写入 
sFLASH_WriteEnable();
//芯片使能 
W25Q64_WCS_Clr();
//发送写指令 
sFLASH_SendByte(sFLASH_CMD_PAGEPRO);
//发送24位地址 
sFLASH_SendByte((WriteAddr & 0xFF0000) >> 16);
sFLASH_SendByte((WriteAddr & 0xFF00) >> 8);
sFLASH_SendByte(WriteAddr & 0xFF);
//循环按字节写入 
while (NumByteToWrite--)
{sFLASH_SendByte(*pBuffer);
 pBuffer++;
}
//芯片禁止 
W25Q64_WCS_Set();
//等待写完成
sFLASH_WaitForWriteEnd();
}
Exemplo n.º 17
0
Arquivo: at26df.c Projeto: ADTL/AFGUI
void sFLASH_EraseBlock32k(unsigned int SectorAddr)
{
	__IO unsigned int status;
	/*!< Send write enable instruction */
	sFLASH_WriteEnable();
	/*!< Sector Erase */
	/*!< Select the FLASH: Chip Select low */
	sFLASH_CS_LOW();
	/*!< Send Sector Erase instruction */
	sFLASH_SendByte(sFLASH_CMD_32K_ERASE);
	/*!< Send SectorAddr high nibble address byte */
	sFLASH_SendByte((SectorAddr & 0xFF0000) >> 16);
	/*!< Send SectorAddr medium nibble address byte */
	sFLASH_SendByte((SectorAddr & 0xFF00) >> 8);
	/*!< Send SectorAddr low nibble address byte */
	sFLASH_SendByte(SectorAddr & 0xFF);
	/*!< Deselect the FLASH: Chip Select high */
	sFLASH_CS_HIGH();

	/*!< Wait the end of Flash writing */
	sFLASH_WaitForWriteEnd();
}
Exemplo n.º 18
0
/**
  * @brief  Erases the specified FLASH sector.
  * @param  SectorAddr: address of the sector to erase.
  * @retval None
  */
void sFLASH_EraseSector(uint32_t SectorAddr)
{
  /*!< Send write enable instruction */
  sFLASH_WriteEnable();

  /*!< Sector Erase */
  /*!< Select the FLASH: Chip Select low */
  sFLASH_CS_LOW();
  /*!< Send Sector Erase instruction */
  sFLASH_SendByte(sFLASH_CMD_SE);
  /*!< Send SectorAddr high nibble address byte */
  sFLASH_SendByte((SectorAddr & 0xFF0000) >> 16);
  /*!< Send SectorAddr medium nibble address byte */
  sFLASH_SendByte((SectorAddr & 0xFF00) >> 8);
  /*!< Send SectorAddr low nibble address byte */
  sFLASH_SendByte(SectorAddr & 0xFF);
  /*!< Deselect the FLASH: Chip Select high */
  sFLASH_CS_HIGH();

  /*!< Wait the end of Flash writing */
  sFLASH_WaitForWriteEnd();
}
Exemplo n.º 19
0
/***********************************************
函数名称:sFLASH_ReadBuffer
功    能:从W25Q64 FLASH读取一串数据。
入口参数:pBuffer:接收该字符串的缓冲区
			ReadAddr:开始读的地址
	NumByteToRead:读的字节数
返 回 值:无	
备    注:无
************************************************/
void sFLASH_ReadBuffer(unsigned char * pBuffer, FLADDR ReadAddr, unsigned int NumByteToRead)
{//芯片使能 
W25Q64_WCS_Clr();

//发送读命令
sFLASH_SendByte(sFLASH_CMD_READ);

//发送24位地址 
sFLASH_SendByte((ReadAddr & 0xFF0000) >> 16);
sFLASH_SendByte((ReadAddr& 0xFF00) >> 8);
sFLASH_SendByte(ReadAddr & 0xFF);

//循环按字节读取
while (NumByteToRead--) 
{
	*pBuffer = sFLASH_ReadByte();
	pBuffer++;
}

//芯片禁止 
W25Q64_WCS_Set();
}
Exemplo n.º 20
0
/***********************************************
函数名称:sFLASH_EraseSector
功    能:擦除W25Q64 FLASH整个芯片,
需要大概20s左右的时间。
入口参数:无
返 回 值:unsigned char:读出的数据。	
备    注:无
************************************************/
void sFLASH_EraseFlash(void)
{   //芯片写使能
  	sFLASH_WriteEnable();
  	//芯片使能 
  	W25Q64_WCS_Clr();
  	//发送扇区擦除指令
  	sFLASH_SendByte(sFLASH_CMD_CE);

  	//芯片禁止 
  	W25Q64_WCS_Set();
  	//等待写完成
  	sFLASH_WaitForWriteEnd();
}
Exemplo n.º 21
0
/**
 * @brief Initializes SPI Flash
 * @param void
 * @return void
 */
void sFLASH_Init(void)
{
    /* Initializes the peripherals used by the SPI FLASH driver */
    sFLASH_SPI_Init();

    /* Disable the write access to the FLASH */
    sFLASH_WriteDisable();

    /* Select the FLASH: Chip Select low */
    sFLASH_CS_LOW();
    /* Send "Write Enable Status" instruction */
    sFLASH_SendByte(sFLASH_CMD_EWSR);
    /* Deselect the FLASH: Chip Select high */
    sFLASH_CS_HIGH();

    /* Select the FLASH: Chip Select low */
    sFLASH_CS_LOW();
    /* Send "Write Status Register" instruction */
    sFLASH_SendByte(sFLASH_CMD_WRSR);
    sFLASH_SendByte(0);
    /* Deselect the FLASH: Chip Select high */
    sFLASH_CS_HIGH();
}
Exemplo n.º 22
0
/***********************************************
函数名称:sFLASH_WaitForWriteEnd
功    能:等待写结束
入口参数:无
返 回 值:无	
备    注:无
************************************************/
void sFLASH_WaitForWriteEnd(void)
{unsigned char flashstatus = 0;
//芯片使能 
W25Q64_WCS_Clr();
//发送读取寄存器指令
sFLASH_SendByte(sFLASH_CMD_RDSR);
//循环读取忙标记直到忙结束 
do
{	flashstatus = sFLASH_ReadByte();}
//判断忙标记
while ((flashstatus & sFLASH_WIP_FLAG) == 0x01); 
//芯片禁止 
W25Q64_WCS_Set();
}
Exemplo n.º 23
0
/**
 * @brief  Reads FLASH identification.
 * @param  None
 * @retval FLASH identification
 */
uint32_t sFLASH_ReadID(void)
{
    uint8_t byte[3];

    /* Select the FLASH: Chip Select low */
    sFLASH_CS_LOW();

    /* Send "JEDEC ID Read" instruction */
    sFLASH_SendByte(sFLASH_CMD_RDID);

    /* Read a byte from the FLASH */
    byte[0] = sFLASH_SendByte(sFLASH_DUMMY_BYTE);

    /* Read a byte from the FLASH */
    byte[1] = sFLASH_SendByte(sFLASH_DUMMY_BYTE);

    /* Read a byte from the FLASH */
    byte[2] = sFLASH_SendByte(sFLASH_DUMMY_BYTE);

    /* Deselect the FLASH: Chip Select high */
    sFLASH_CS_HIGH();

    return (byte[0] << 16) | (byte[1] << 8) | byte[2];
}
Exemplo n.º 24
0
/**
  * @brief  Enables the write access to the FLASH.
  * @param  None
  * @retval None
  */
void sFLASH_WriteEnable(uint32_t WriteAddr)
{
	if(WriteAddr >= sFLASH_MEMORYSIZE)
		/*!< Select the FLASH: Chip Select low */
		sFLASH_CS2_LOW();
	else
		/*!< Select the FLASH: Chip Select low */
		sFLASH_CS_LOW();

  /*!< Send "Write Enable" instruction */
  sFLASH_SendByte(sFLASH_CMD_WREN);

  /*!< Deselect the FLASH: Chip Select high */
  sFLASH_CS_HIGH();
}
Exemplo n.º 25
0
/**
  * @brief  Erases the entire FLASH.
  * @param  None
  * @retval None
  */
void sFLASH_EraseBulk(void)
{
  /*!< Send write enable instruction */
  sFLASH_WriteEnable();

  /*!< Bulk Erase */
  /*!< Select the FLASH: Chip Select low */
  sFLASH_CS_LOW();
  /*!< Send Bulk Erase instruction  */
  sFLASH_SendByte(sFLASH_CMD_BE);
  /*!< Deselect the FLASH: Chip Select high */
  sFLASH_CS_HIGH();

  /*!< Wait the end of Flash writing */
  sFLASH_WaitForWriteEnd();
}
Exemplo n.º 26
0
/**
 * @brief  Erases the entire FLASH.
 * @param  None
 * @retval None
 */
void sFLASH_EraseBulk(void)
{
    /* Enable the write access to the FLASH */
    sFLASH_WriteEnable();

    /* Bulk Erase */
    /* Select the FLASH: Chip Select low */
    sFLASH_CS_LOW();
    /* Send Bulk Erase instruction  */
    sFLASH_SendByte(sFLASH_CMD_BE);
    /* Deselect the FLASH: Chip Select high */
    sFLASH_CS_HIGH();

    /* Wait till the end of Flash writing */
    sFLASH_WaitForWriteEnd();
}
Exemplo n.º 27
0
Arquivo: at26df.c Projeto: ADTL/AFGUI
/**
	* @brief	Reads a byte from the SPI Flash.
	* @note	 This function must be used only if the Start_Read_Sequence function
	*				 has been previously called.
	* @param	None
	* @retval Byte Read from the SPI Flash.
	*/
unsigned char sFLASH_ReadByte(void)
{
	return (sFLASH_SendByte(sFLASH_DUMMY_BYTE));
}
Exemplo n.º 28
0
/**
  * @brief  Reads a byte from the SPI Flash.
  * @note   This function must be used only if the Start_Read_Sequence function
  *         has been previously called.
  * @param  None
  * @retval Byte Read from the SPI Flash.
  */
uint8_t sFLASH_ReadByte(void)
{
  return (sFLASH_SendByte(sFLASH_DUMMY_BYTE));
}