flashpage.h File Reference

Low-level flash page peripheral driver interface. More...

Detailed Description

#include <stdint.h>
#include "cpu_conf.h"
#include "periph_cpu.h"
+ Include dependency graph for flashpage.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define CPU_FLASH_BASE   (0)
 Per default, we expect the internal flash to start at address 0.
 For raw writings to the flash, this constant must define the minimum write length allowed by the MCU.
 The buffers to be written to the flash MUST be aligned, as well as the address on which the buffer is written to the flash. More...


 Return values used in this interface. More...


static void * flashpage_addr (int page)
 Translate the given page number into the page's starting address. More...
static int flashpage_page (void *addr)
 Translate the given address into the corresponding page number. More...
void flashpage_write (int page, const void *data)
 Write the given page with the given data. More...
void flashpage_write_raw (void *target_addr, const void *data, size_t len)
 Write any number of data bytes to a given location in the flash memory. More...
void flashpage_read (int page, void *data)
 Read the given page into the given memory location. More...
int flashpage_verify (int page, const void *data)
 Verify the given page against the given data. More...
int flashpage_write_and_verify (int page, const void *data)
 Write the given page and verify the results. More...