|
@@ -191,11 +191,11 @@ void W25QXXFlash::SPI_FLASH_SectorErase(uint32_t SectorAddr) {
|
191
|
191
|
W25QXX_CS_L;
|
192
|
192
|
// Send Sector Erase instruction
|
193
|
193
|
spi_flash_Send(W25X_SectorErase);
|
194
|
|
- // Send SectorAddr high nibble address byte
|
|
194
|
+ // Send SectorAddr high nybble address byte
|
195
|
195
|
spi_flash_Send((SectorAddr & 0xFF0000) >> 16);
|
196
|
|
- // Send SectorAddr medium nibble address byte
|
|
196
|
+ // Send SectorAddr medium nybble address byte
|
197
|
197
|
spi_flash_Send((SectorAddr & 0xFF00) >> 8);
|
198
|
|
- // Send SectorAddr low nibble address byte
|
|
198
|
+ // Send SectorAddr low nybble address byte
|
199
|
199
|
spi_flash_Send(SectorAddr & 0xFF);
|
200
|
200
|
// Deselect the FLASH: Chip Select high
|
201
|
201
|
|
|
@@ -209,11 +209,11 @@ void W25QXXFlash::SPI_FLASH_BlockErase(uint32_t BlockAddr) {
|
209
|
209
|
W25QXX_CS_L;
|
210
|
210
|
// Send Sector Erase instruction
|
211
|
211
|
spi_flash_Send(W25X_BlockErase);
|
212
|
|
- // Send SectorAddr high nibble address byte
|
|
212
|
+ // Send SectorAddr high nybble address byte
|
213
|
213
|
spi_flash_Send((BlockAddr & 0xFF0000) >> 16);
|
214
|
|
- // Send SectorAddr medium nibble address byte
|
|
214
|
+ // Send SectorAddr medium nybble address byte
|
215
|
215
|
spi_flash_Send((BlockAddr & 0xFF00) >> 8);
|
216
|
|
- // Send SectorAddr low nibble address byte
|
|
216
|
+ // Send SectorAddr low nybble address byte
|
217
|
217
|
spi_flash_Send(BlockAddr & 0xFF);
|
218
|
218
|
|
219
|
219
|
W25QXX_CS_H;
|
|
@@ -265,11 +265,11 @@ void W25QXXFlash::SPI_FLASH_PageWrite(uint8_t* pBuffer, uint32_t WriteAddr, uint
|
265
|
265
|
W25QXX_CS_L;
|
266
|
266
|
// Send "Write to Memory " instruction
|
267
|
267
|
spi_flash_Send(W25X_PageProgram);
|
268
|
|
- // Send WriteAddr high nibble address byte to write to
|
|
268
|
+ // Send WriteAddr high nybble address byte to write to
|
269
|
269
|
spi_flash_Send((WriteAddr & 0xFF0000) >> 16);
|
270
|
|
- // Send WriteAddr medium nibble address byte to write to
|
|
270
|
+ // Send WriteAddr medium nybble address byte to write to
|
271
|
271
|
spi_flash_Send((WriteAddr & 0xFF00) >> 8);
|
272
|
|
- // Send WriteAddr low nibble address byte to write to
|
|
272
|
+ // Send WriteAddr low nybble address byte to write to
|
273
|
273
|
spi_flash_Send(WriteAddr & 0xFF);
|
274
|
274
|
|
275
|
275
|
NOMORE(NumByteToWrite, SPI_FLASH_PerWritePageSize);
|
|
@@ -371,11 +371,11 @@ void W25QXXFlash::SPI_FLASH_BufferRead(uint8_t* pBuffer, uint32_t ReadAddr, uint
|
371
|
371
|
// Send "Read from Memory " instruction
|
372
|
372
|
spi_flash_Send(W25X_ReadData);
|
373
|
373
|
|
374
|
|
- // Send ReadAddr high nibble address byte to read from
|
|
374
|
+ // Send ReadAddr high nybble address byte to read from
|
375
|
375
|
spi_flash_Send((ReadAddr & 0xFF0000) >> 16);
|
376
|
|
- // Send ReadAddr medium nibble address byte to read from
|
|
376
|
+ // Send ReadAddr medium nybble address byte to read from
|
377
|
377
|
spi_flash_Send((ReadAddr & 0xFF00) >> 8);
|
378
|
|
- // Send ReadAddr low nibble address byte to read from
|
|
378
|
+ // Send ReadAddr low nybble address byte to read from
|
379
|
379
|
spi_flash_Send(ReadAddr & 0xFF);
|
380
|
380
|
|
381
|
381
|
if (NumByteToRead <= 32 || !flash_dma_mode) {
|