UHSDR/UHSDR-active-devel/mchf-eclipse/misc/config_storage.h

36 lines
1.8 KiB
C
Raw Normal View History

2022-11-08 16:13:55 +01:00
/* -*- mode: c; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; coding: utf-8 -*- */
/************************************************************************************
** **
** mcHF QRP Transceiver **
** K Atanassov - M0NKA 2014 **
** **
**---------------------------------------------------------------------------------**
** **
** File name: **
** Description: **
** Last Modified: **
** Licence: GNU GPLv3 **
************************************************************************************/
#ifndef __CONFIG_STORAGE_H
#define __CONFIG_STORAGE_H
/* Max variables number */
#define NB_OF_VAR (0x1ff)
void ConfigStorage_Init(void);
uint16_t ConfigStorage_ReadVariable(uint16_t addr, uint16_t *value);
uint16_t ConfigStorage_WriteVariable(uint16_t addr, uint16_t value);
void ConfigStorage_CopyFlash2Serial(void);
void ConfigStorage_CopySerial2Flash(void);
void ConfigStorage_CopySerial2RAMCache(void);
uint16_t ConfigStorage_CopyRAMCache2Serial(void);
uint16_t ConfigStorage_CopyArray2Serial(uint32_t Addr, const uint8_t *buffer, uint16_t length);
void ConfigStorage_CopySerial2Array(uint32_t Addr, uint8_t *buffer, uint16_t length);
#endif