Macros | Functions | Variables
flash.h File Reference
#include <stddef.h>
#include <stdbool.h>
#include <stdint.h>
#include <breezystm32.h>
Include dependency graph for flash.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CONFIG_SIZE   (FLASH_PAGE_SIZE * NUM_PAGES)
 
#define FLASH_PAGE_COUNT   128
 
#define FLASH_PAGE_SIZE   ((uint16_t)0x400)
 
#define NUM_PAGES   3
 

Functions

void initEEPROM (void)
 Initialize Flash. More...
 
bool readEEPROM (void *dest, size_t len)
 Read data from Flash. More...
 
bool writeEEPROM (const void *src, size_t len)
 Write data to Flash. More...
 

Variables

static const uint32_t FLASH_WRITE_ADDR = 0x08000000 + (FLASH_PAGE_SIZE * (FLASH_PAGE_COUNT - (CONFIG_SIZE / 1024)))
 

Macro Definition Documentation

#define CONFIG_SIZE   (FLASH_PAGE_SIZE * NUM_PAGES)

Definition at line 52 of file flash.h.

#define FLASH_PAGE_COUNT   128

Definition at line 45 of file flash.h.

#define FLASH_PAGE_SIZE   ((uint16_t)0x400)

Definition at line 48 of file flash.h.

#define NUM_PAGES   3

Definition at line 49 of file flash.h.

Function Documentation

void initEEPROM ( void  )

Initialize Flash.

Definition at line 37 of file flash.c.

bool readEEPROM ( void *  dest,
size_t  len 
)

Read data from Flash.

Parameters
destThe memory address to copy the data to
lenThe number of bytes to copy
Returns
true if the read was successful, false otherwise

Definition at line 54 of file flash.c.

bool writeEEPROM ( const void *  src,
size_t  len 
)

Write data to Flash.

Parameters
srcThe memory address to copy data from
lenThe number of bytes to copy
Returns
true if the write was successful, false otherwise

Definition at line 60 of file flash.c.

Variable Documentation

const uint32_t FLASH_WRITE_ADDR = 0x08000000 + (FLASH_PAGE_SIZE * (FLASH_PAGE_COUNT - (CONFIG_SIZE / 1024)))
static

Definition at line 57 of file flash.h.



rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Wed Jul 3 2019 19:59:26