|
px-fwlib 0.10.0
Cross-platform embedded library and documentation for 8/16/32-bit microcontrollers generated with Doxygen 1.9.2
|
This component can clear and write a page of internal FLASH.
File(s):
These routines must always reside in the bootloader section. If mixing application code and bootloader code, the prefix BOOTLOADER_SECTION can be used to place these functions in a section called ".bootloader". See <avr/boot.h>
Example of setting ".bootloader" section address in Makefile:
LDFLAGS += -Wl,--section-start,.bootloader=0x1FF00
Macros | |
| #define | PX_FLASH_PAGE_SIZE SPM_PAGESIZE |
| FLASH Page size in bytes. More... | |
| #define | PX_FLASH_NR_OF_PAGES ((PX_FLASHEND + 1) / PX_FLASH_PAGE_SIZE) |
| Total number of FLASH pages (application and bootloader section) More... | |
Functions | |
| void | px_flash_erase_page (const uint16_t page) |
| Function to erase a page. More... | |
| void | px_flash_wr_page (const uint16_t page, const uint8_t *data) |
| Function to write a page. More... | |
| #define PX_FLASH_PAGE_SIZE SPM_PAGESIZE |
FLASH Page size in bytes.
Definition at line 56 of file px_flash.h.
| #define PX_FLASH_NR_OF_PAGES ((PX_FLASHEND + 1) / PX_FLASH_PAGE_SIZE) |
Total number of FLASH pages (application and bootloader section)
Definition at line 59 of file px_flash.h.
| void px_flash_erase_page | ( | const uint16_t | page | ) |
Function to erase a page.
| page | 0 to (PX_FLASH_NR_OF_PAGES - 1) |
Definition at line 39 of file px_flash.c.
| void px_flash_wr_page | ( | const uint16_t | page, |
| const uint8_t * | data | ||
| ) |
Function to write a page.
| page | 0 to (PX_FLASH_NR_OF_PAGES - 1) |
| data | Pointer to buffer containing data to write |
Definition at line 60 of file px_flash.c.