All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
vexflash.c File Reference

Store user parameters in Flash. More...

#include "ch.h"
#include "hal.h"
#include "vex.h"
#include "vexflash.h"

Macros

#define USER_PARAM_PAGE_ADDR   0x0805F000
 
#define USER_PARAM_INDEX   64
 
#define USER_PARAM_MAX_WRITE   32
 
#define RDP_Key   ((uint16_t)0x00A5)
 
#define FLASH_KEY1   ((uint32_t)0x45670123)
 
#define FLASH_KEY2   ((uint32_t)0xCDEF89AB)
 

Functions

user_paramvexFlashUserParamRead ()
 Read user parameters. More...
 
int16_t vexFlashUserParamWrite (user_param *u)
 write user parameters More...
 
int16_t vexFlashUserParamInit ()
 Init user parameters. More...
 

Detailed Description

Store user parameters in Flash.

Macro Definition Documentation

#define USER_PARAM_PAGE_ADDR   0x0805F000
#define USER_PARAM_INDEX   64
#define USER_PARAM_MAX_WRITE   32
#define RDP_Key   ((uint16_t)0x00A5)
#define FLASH_KEY1   ((uint32_t)0x45670123)
#define FLASH_KEY2   ((uint32_t)0xCDEF89AB)

Function Documentation

user_param* vexFlashUserParamRead ( void  )

Read user parameters.

Returns
A pointer to a user_param structure
int16_t vexFlashUserParamWrite ( user_param u)

write user parameters

Parameters
[in]uPointer to user_param structure
Returns
status or error code
int16_t vexFlashUserParamInit ( void  )

Init user parameters.