Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
settings_arch.c File Reference
#include "subsystems/settings.h"
#include <libopencm3/stm32/crc.h>
#include <libopencm3/stm32/dbgmcu.h>
+ Include dependency graph for settings_arch.c:

Go to the source code of this file.

Data Structures

struct  FlashInfo
 

Macros

#define FLASH_BEGIN   0x08000000
 
#define FSIZ   8
 
#define FCHK   4
 

Functions

static uint32_t pflash_checksum (uint32_t ptr, uint32_t size)
 
static int32_t flash_detect (struct FlashInfo *flash)
 
static int32_t pflash_program_bytes (struct FlashInfo *flash, uint32_t src, uint32_t size, uint32_t chksum)
 
int32_t persistent_write (uint32_t ptr, uint32_t size)
 
int32_t persistent_read (uint32_t ptr, uint32_t size)
 

Macro Definition Documentation

#define FCHK   4

Definition at line 70 of file settings_arch.c.

Referenced by persistent_read(), and pflash_program_bytes().

#define FLASH_BEGIN   0x08000000

Definition at line 68 of file settings_arch.c.

Referenced by flash_detect().

#define FSIZ   8

Definition at line 69 of file settings_arch.c.

Referenced by persistent_read(), persistent_write(), and pflash_program_bytes().

Function Documentation

static int32_t flash_detect ( struct FlashInfo flash)
static

Definition at line 115 of file settings_arch.c.

References FlashInfo::addr, FLASH_BEGIN, FlashInfo::page_nr, FlashInfo::page_size, and FlashInfo::total_size.

Referenced by persistent_read(), and persistent_write().

+ Here is the caller graph for this function:

int32_t persistent_read ( uint32_t  ptr,
uint32_t  size 
)

Definition at line 262 of file settings_arch.c.

References FlashInfo::addr, FCHK, flash_detect(), FSIZ, FlashInfo::page_size, and pflash_checksum().

+ Here is the call graph for this function:

int32_t persistent_write ( uint32_t  ptr,
uint32_t  size 
)

Definition at line 251 of file settings_arch.c.

References flash_detect(), FSIZ, FlashInfo::page_size, pflash_checksum(), and pflash_program_bytes().

+ Here is the call graph for this function:

static uint32_t pflash_checksum ( uint32_t  ptr,
uint32_t  size 
)
static

Definition at line 73 of file settings_arch.c.

Referenced by persistent_read(), and persistent_write().

+ Here is the caller graph for this function:

static int32_t pflash_program_bytes ( struct FlashInfo flash,
uint32_t  src,
uint32_t  size,
uint32_t  chksum 
)
static

Definition at line 199 of file settings_arch.c.

References FlashInfo::addr, FCHK, FSIZ, and FlashInfo::page_size.

Referenced by persistent_write().

+ Here is the caller graph for this function: