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 "LPC21xx.h"
#include <BOARD_CONFIG>
#include "armVIC.h"
+ Include dependency graph for settings_arch.c:

Go to the source code of this file.

Data Structures

struct  FlashInfo
 

Macros

#define IAP_LOCATION   0x7FFFFFF1
 
#define IAP_PREPARE_SECTORS   50
 
#define IAP_COPY_RAM_TO_FLASH   51
 
#define IAP_ERASE_SECTORS   52
 
#define IAP_BLANK_CHECK_SECTORS   53
 
#define IAP_READ_PART_ID   54
 
#define IAP_COMPARE   56
 
#define BOUND   256
 
#define FSIZ   8
 
#define FCHK   4
 

Typedefs

typedef void(* IAP )(uint32_t[], uint32_t[])
 

Functions

static uint32_t pflash_checksum (uint32_t ptr, uint32_t size)
 
static int32_t flash_detect (FlashInfo *flash)
 
static int32_t pflash_erase_page (FlashInfo *flash)
 
static int32_t pflash_program_array (FlashInfo *flash, uint32_t dest, uint32_t src)
 
static int32_t pflash_program_bytes (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 BOUND   256

Definition at line 57 of file settings_arch.c.

Referenced by pflash_program_array(), and pflash_program_bytes().

#define FCHK   4

Definition at line 60 of file settings_arch.c.

Referenced by persistent_read(), and pflash_program_bytes().

#define FSIZ   8

Definition at line 59 of file settings_arch.c.

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

#define IAP_BLANK_CHECK_SECTORS   53

Definition at line 52 of file settings_arch.c.

Referenced by pflash_erase_page().

#define IAP_COMPARE   56

Definition at line 54 of file settings_arch.c.

#define IAP_COPY_RAM_TO_FLASH   51

Definition at line 50 of file settings_arch.c.

Referenced by pflash_program_array().

#define IAP_ERASE_SECTORS   52

Definition at line 51 of file settings_arch.c.

Referenced by pflash_erase_page().

#define IAP_LOCATION   0x7FFFFFF1

Definition at line 47 of file settings_arch.c.

Referenced by flash_detect(), pflash_erase_page(), and pflash_program_array().

#define IAP_PREPARE_SECTORS   50

Definition at line 49 of file settings_arch.c.

Referenced by pflash_erase_page(), and pflash_program_array().

#define IAP_READ_PART_ID   54

Definition at line 53 of file settings_arch.c.

Referenced by flash_detect().

Typedef Documentation

typedef void(* IAP)(uint32_t[], uint32_t[])

Definition at line 62 of file settings_arch.c.

Function Documentation

static int32_t flash_detect ( FlashInfo flash)
static

Definition at line 94 of file settings_arch.c.

References FlashInfo::addr, disableIRQ(), enableIRQ(), IAP_LOCATION, IAP_READ_PART_ID, FlashInfo::page_nr, and FlashInfo::page_size.

Referenced by persistent_read(), and persistent_write().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int32_t persistent_read ( uint32_t  ptr,
uint32_t  size 
)

Definition at line 255 of file settings_arch.c.

Referenced by settings_init().

+ Here is the caller graph for this function:

int32_t persistent_write ( uint32_t  ptr,
uint32_t  size 
)

Definition at line 243 of file settings_arch.c.

Referenced by settings_store().

+ Here is the caller graph for this function:

static uint32_t pflash_checksum ( uint32_t  ptr,
uint32_t  size 
)
static

Definition at line 83 of file settings_arch.c.

Referenced by persistent_read(), and persistent_write().

+ Here is the caller graph for this function:

static int32_t pflash_erase_page ( FlashInfo flash)
static

Definition at line 135 of file settings_arch.c.

References disableIRQ(), enableIRQ(), IAP_BLANK_CHECK_SECTORS, IAP_ERASE_SECTORS, IAP_LOCATION, IAP_PREPARE_SECTORS, and FlashInfo::page_nr.

Referenced by pflash_program_bytes().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int32_t pflash_program_array ( FlashInfo flash,
uint32_t  dest,
uint32_t  src 
)
static

Definition at line 169 of file settings_arch.c.

References BOUND, CCLK, dest, disableIRQ(), enableIRQ(), IAP_COPY_RAM_TO_FLASH, IAP_LOCATION, IAP_PREPARE_SECTORS, and FlashInfo::page_nr.

Referenced by pflash_program_bytes().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 200 of file settings_arch.c.

References FlashInfo::addr, BOUND, FCHK, FSIZ, FlashInfo::page_size, pflash_erase_page(), and pflash_program_array().

Referenced by persistent_write().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: