PER Firmware
Loading...
Searching...
No Matches
flash.h
Go to the documentation of this file.
1
10#ifndef PHAL_G4_FLASH_H
11#define PHAL_G4_FLASH_H
12
13#include <stdbool.h>
14#include <stdint.h>
15
22static constexpr uint32_t PHAL_FLASH_WRITE_ALIGNMENT_BYTES = 8U;
23
36bool PHAL_FLASH_read(uint32_t address, void *destination, uint32_t length_bytes);
37
52bool PHAL_FLASH_write(uint32_t address, const void *source, uint32_t length_bytes);
53
69bool PHAL_FLASH_erase(uint32_t address, uint32_t length_bytes);
70
71#endif // PHAL_G4_FLASH_H
bool PHAL_FLASH_read(uint32_t address, void *destination, uint32_t length_bytes)
Copy bytes from internal flash into a buffer.
Definition flash.c:100
bool PHAL_FLASH_write(uint32_t address, const void *source, uint32_t length_bytes)
Program bytes into erased internal flash.
Definition flash.c:124
static constexpr uint32_t PHAL_FLASH_WRITE_ALIGNMENT_BYTES
Definition flash.h:22
bool PHAL_FLASH_erase(uint32_t address, uint32_t length_bytes)
Erase every internal flash page touched by a range.
Definition flash.c:164