Defines | |
#define | FLASH_CS PIN_B3 |
Flash Chip Select - Port B3. | |
#define | FLASH_CLK PIN_B5 |
Flash Clock - Port B5. | |
#define | FLASH_D PIN_B4 |
Flash Data Input - Port B4. | |
#define | FLASH_Q PIN_B2 |
Flash Data Output - Port B2. | |
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 | 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. |
#define FLASH_CLK PIN_B5 |
Flash Clock - Port B5.
Definition at line 1135 of file PicoBeacon.c.
Referenced by flashGetByte(), flashInit(), flashSendAddress(), and flashSendByte().
#define FLASH_CS PIN_B3 |
Flash Chip Select - Port B3.
Definition at line 1132 of file PicoBeacon.c.
Referenced by flashErase(), flashInit(), flashIsWriteInProgress(), flashReadBlock(), and flashWriteBlock().
#define FLASH_D PIN_B4 |
Flash Data Input - Port B4.
Definition at line 1138 of file PicoBeacon.c.
Referenced by flashInit(), flashSendAddress(), and flashSendByte().
#define FLASH_Q PIN_B2 |
Flash Data Output - Port B2.
Definition at line 1141 of file PicoBeacon.c.
Referenced by flashGetByte().
void flashErase | ( | ) |
Erase the entire flash device (all locations set to 0xff).
Definition at line 1245 of file PicoBeacon.c.
References FLASH_CS, flashIsWriteInProgress(), and flashSendByte().
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.
Definition at line 1267 of file PicoBeacon.c.
References FLASH_CLK, FLASH_Q, and value.
Referenced by flashIsWriteInProgress(), and flashReadBlock().
void flashInit | ( | ) |
bool_t flashIsWriteInProgress | ( | ) |
Determine if a flash write or erase operation is currently in progress.
Definition at line 1148 of file PicoBeacon.c.
References FLASH_CS, flashGetByte(), and flashSendByte().
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 |
Definition at line 1171 of file PicoBeacon.c.
References FLASH_CS, flashGetByte(), flashSendAddress(), and flashSendByte().
Referenced by diagReadFlash(), and logInit().
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 |
Definition at line 1338 of file PicoBeacon.c.
References FLASH_CLK, and FLASH_D.
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 |
Definition at line 1309 of file PicoBeacon.c.
References FLASH_CLK, and FLASH_D.
Referenced by flashErase(), flashIsWriteInProgress(), flashReadBlock(), 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 |
Definition at line 1194 of file PicoBeacon.c.
References FLASH_CS, flashIsWriteInProgress(), flashSendAddress(), and flashSendByte().
Referenced by logFlush().