Functions | |
bool_t | flashIsWriteInProgress () |
Determine if a flash write or erase operation is currently in progress. | |
void | flashReadBlock (uint32_t address, uint8_t *block, uint16_t length) |
Read a block of memory from the flash device. | |
void | flashWriteBlock (uint32_t address, uint8_t *block, uint8_t length) |
Write a block of memory to the flash device. | |
void | flashErase () |
Erase the entire flash device (all locations set to 0xff). | |
uint8_t | flashReadElectronicSignature () |
Read the flash electronic signature byte. | |
uint8_t | flashGetByte () |
Read a single byte from the flash device through the serial interface. | |
void | flashInit () |
Initialize the flash memory subsystem. | |
void | flashSendByte (uint8_t value) |
Write a single byte to the flash device through the serial interface. | |
void | flashSendAddress (uint32_t address) |
Write the 24-bit address to the flash device through the serial interface. |
void flashErase | ( | ) |
Erase the entire flash device (all locations set to 0xff).
References flashIsWriteInProgress(), flashSendByte(), and IO_FLASH_CS.
Referenced by diagEraseFlash().
uint8_t flashGetByte | ( | ) |
Read a single byte from the flash device through the serial interface.
This function only controls the clock line. The chip select must be configured before calling this function.
Referenced by flashIsWriteInProgress(), flashReadBlock(), and flashReadElectronicSignature().
void flashInit | ( | ) |
bool_t flashIsWriteInProgress | ( | ) |
Determine if a flash write or erase operation is currently in progress.
References flashGetByte(), flashSendByte(), and IO_FLASH_CS.
Referenced by flashErase(), and flashWriteBlock().
Read a block of memory from the flash device.
address | of desired location in the range 0x00000 to 0xFFFFF (1MB) | |
block | pointer to locate of data block | |
length | number of bytes to read |
References flashGetByte(), flashSendAddress(), flashSendByte(), and IO_FLASH_CS.
Referenced by diagReadFlash(), and logInit().
uint8_t flashReadElectronicSignature | ( | ) |
Read the flash electronic signature byte.
This method is typically used for engineering and test functions.
References flashGetByte(), flashSendByte(), and IO_FLASH_CS.
Referenced by diagPort().
void flashSendAddress | ( | uint32_t | address | ) |
Write the 24-bit address to the flash device through the serial interface.
This function only controls the clock line. The chip select must be configured before calling this function.
address | 24-bit flash device address |
Referenced by flashReadBlock(), and flashWriteBlock().
void flashSendByte | ( | uint8_t | value | ) |
Write a single byte to the flash device through the serial interface.
This function only controls the clock line. The chip select must be configured before calling this function.
value | byte to write to device |
Referenced by flashErase(), flashIsWriteInProgress(), flashReadBlock(), flashReadElectronicSignature(), and flashWriteBlock().
Write a block of memory to the flash device.
address | of desired location in the range 0x00000 to 0xFFFFF (1MB) | |
block | pointer data block to write | |
length | number of bytes to write |
References flashIsWriteInProgress(), flashSendAddress(), flashSendByte(), and IO_FLASH_CS.
Referenced by logFlush().