summaryrefslogtreecommitdiff
path: root/digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include
diff options
context:
space:
mode:
Diffstat (limited to 'digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include')
-rw-r--r--digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include/pdsDataServer.h99
-rw-r--r--digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include/private/pdsAuxService.h80
-rw-r--r--digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include/private/pdsCrcService.h73
-rw-r--r--digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include/private/pdsDbg.h37
-rw-r--r--digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include/private/pdsMemAbstract.h70
-rw-r--r--digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include/private/pdsWriteData.h84
6 files changed, 0 insertions, 443 deletions
diff --git a/digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include/pdsDataServer.h b/digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include/pdsDataServer.h
deleted file mode 100644
index 67855a66..00000000
--- a/digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include/pdsDataServer.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/***************************************************************************//**
- \file pdsDataServer.h
-
- \brief The header file describes the Persistence Data Server interface
-
- \author
- Atmel Corporation: http://www.atmel.com \n
- Support email: avr@atmel.com
-
- Copyright (c) 2008-2011, Atmel Corporation. All rights reserved.
- Licensed under Atmel's Limited License Agreement (BitCloudTM).
-
- \internal
- History:
- 28/09/07 A. Khromykh - Created
- 01/11/10 A. Razinkov - Modified
-*****************************************************************************/
-
-#ifndef _PERSISTDATASERVER_H
-#define _PERSISTDATASERVER_H
-
-/******************************************************************************
- Includes section
-******************************************************************************/
-#include <configServer.h>
-
-/******************************************************************************
- Types section
-******************************************************************************/
-//! PDS state result after a command call
-typedef enum
-{
- PDS_SUCCESS, //!< - Command completed successfully
- PDS_EEPROM_ERROR, //!< - EEPROM error occurred
- PDS_CRC_ERROR, //!< - Wrong CRC
- PDS_COMMIT_IN_PROGRESS //!< - Commit to external memory started
-} PDS_DataServerState_t;
-
-#ifdef _COMMISSIONING_
-//! \cond internal
-/***************************************************************************//**
-\brief Reads all parameters from EEPROM to Config Server memory.
-
-Reads all parameters from EEPROM to Config Server memory and also checks CRC of
-EEPROM stack parameters. In case of wrong CRC ConfigServer should reset EEPROM stack
-parameters to default values.
-*******************************************************************************/
-void PDS_Init(void);
-//! \endcond
-
-/*****************************************************************************//**
-\brief Writes default values of parameters to EEPROM
-
-\return - PDS state as a result of setting parameters to default state
-*******************************************************************************/
-PDS_DataServerState_t PDS_SetToDefault(void);
-
-/***************************************************************************//**
-\brief Must be called from the ::APL_TaskHandler() function only.\n
-The function forces writing data from ConfigServer to EEPROM. After returning from the function
-all ConfigServer data is stored in EEPROM.
-*******************************************************************************/
-void PDS_FlushData(void);
-
-/***************************************************************************//**
-\brief Must be called from the ::APL_TaskHandler() function only.\n
-Stops Persist Data Server.
-*******************************************************************************/
-void PDS_Stop(void);
-#endif /* _COMMISSIONING_ */
-
-/*****************************************************************************//**
-\brief Must be called from the ::APL_TaskHandler() function only.\n
-Reads data from the user area of EEPROM.
-
-\param[in] offset - data offset
-\param[in] data - pointer to user data area
-\param[in] length - data length
-\param[in] callback - pointer to a callback function; if callback is NULL, then data will be read syncronously
-
-\return - PDS state as a result of data reading operation
-*******************************************************************************/
-PDS_DataServerState_t PDS_ReadUserData(uint16_t offset, uint8_t *data, uint16_t length, void (*callback)(void));
-
-/****************************************************************************//**
-\brief Must be called only from ::APL_TaskHandler() function.\n
-Writes data to user area of EEPROM.
-
-\param[in] offset - data offset
-\param[in] data - pointer to user data area
-\param[in] length - data length
-\param[in] callback - pointer to a callback function; if callback is NULL, then data will be written syncronously
-
-\return - PDS state as a result of data writing operation
-*******************************************************************************/
-PDS_DataServerState_t PDS_WriteUserData(uint16_t offset, uint8_t *data, uint16_t length, void (*callback)(void));
-
-#endif //#ifndef _PERSISTDATASERVER_H
-
diff --git a/digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include/private/pdsAuxService.h b/digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include/private/pdsAuxService.h
deleted file mode 100644
index 3735afaa..00000000
--- a/digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include/private/pdsAuxService.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/***************************************************************************//**
- \file pdsAuxService.h
-
- \brief The header file describes the auxiliary service of Persistence Data Server
-
- \author
- Atmel Corporation: http://www.atmel.com \n
- Support email: avr@atmel.com
-
- Copyright (c) 2008-2011, Atmel Corporation. All rights reserved.
- Licensed under Atmel's Limited License Agreement (BitCloudTM).
-
- \internal
-
- History:
- 22/01/08 A. Khromykh - Created
- 01/11/10 A. Razinkov - Modified
-*****************************************************************************/
-
-#ifndef _PDSAUXSERVICE_H
-#define _PDSAUXSERVICE_H
-
-/******************************************************************************
- Includes section
-******************************************************************************/
-#ifndef _MAC2_
- #include <aps.h>
- #include <nwk.h>
- #include <appFramework.h>
-#else // _MAC2_
- #include <appTimer.h>
-#endif // _MAC2_
-
-/******************************************************************************
- Define(s) section
-******************************************************************************/
-/* define for eeprom write highlight */
-//#define USE_LED
-
-// crc area
-#define PDS_CRC_AREA 10
-// user area
-#define USER_BASE_EEPROM_ADDRESS (csPersistentMemorySize + PDS_CRC_AREA)
-
-#define PDS_CS_PARAMETER 0
-#define PDS_CS_MEMORY 1
-#define PDS_STOP_SAVE 2
-
-#define EEPROM_BUSY -2
-#define EEPROM_ERROR -1
-
-#define STORE_TIMER_TIMEOUT 300000ul // 5 minutes
-#define SHORT_TIMEOUT 50ul // 50 msec
-#define PDS_LONG_INTERVAL 0
-#define PDS_SHORT_INTERVAL 1
-#define SAVE_IS_STARTED 1
-#define SAVE_IS_STOPED 0
-
-#define MAX_CS_PDS_VARIABLE_SIZE 16
-
-/******************************************************************************
- Types section
-******************************************************************************/
-// crc property
-typedef struct
-{
- uint8_t crc;
- uint16_t position;
- PDS_DataServerState_t eepromState;
-} PDS_ServiceCrc_t;
-
-/******************************************************************************
- External global variables section
-******************************************************************************/
-extern HAL_AppTimer_t pdsEepromSaveServiceTimer;
-extern uint8_t savingIsStarted;
-extern const uint8_t csPersistentItemsAmount;
-extern const uint16_t csPersistentMemorySize;
-
-#endif /*_PDSAUXSERVICE_H*/
diff --git a/digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include/private/pdsCrcService.h b/digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include/private/pdsCrcService.h
deleted file mode 100644
index cf00f9f4..00000000
--- a/digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include/private/pdsCrcService.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/***************************************************************************//**
- \file pdsCrcService.h
-
- \brief The header file describes the interface of crc counting
-
- \author
- Atmel Corporation: http://www.atmel.com \n
- Support email: avr@atmel.com
-
- Copyright (c) 2008-2011, Atmel Corporation. All rights reserved.
- Licensed under Atmel's Limited License Agreement (BitCloudTM).
-
- \internal
- History:
- 22/01/08 A. Khromykh - Created
- 01/11/10 A. Razinkov - Modified
-*****************************************************************************/
-
-#ifndef _PDSCRCSERVICE_H
-#define _PDSCRCSERVICE_H
-
-/******************************************************************************
- Includes section
-******************************************************************************/
-#include <pdsDataServer.h>
-#include <pdsAuxService.h>
-
-#ifdef _COMMISSIONING_
-/******************************************************************************
- Prototypes section
-******************************************************************************/
-/******************************************************************************
-\brief Calculate CRC of persistent data stored in persist memory
-\
-\param[out] crcStation - pointer to CRC service structure
-******************************************************************************/
-void pdsCalculateCrc(PDS_ServiceCrc_t *crcStation);
-
-/******************************************************************************
-\brief Read CRC of stored data from persist memory
-\
-\param[out] crcStation - pointer to CRC service structure
-******************************************************************************/
-void pdsReadCrc(PDS_ServiceCrc_t *crcStation);
-
-/******************************************************************************
-\brief Write CRC of stored data to persist memory. The ring buffer used
-\ to increase persist memory life cycle
-\
-\param[out] crcStation - pointer to CRC service structure
-******************************************************************************/
-PDS_DataServerState_t pdsWriteCrc(void);
-
-/******************************************************************************
-\brief Clears whole CRC area in persist memory
-\
-\return operation result
-******************************************************************************/
-PDS_DataServerState_t pdsClearCrcArea(void);
-
-/******************************************************************************
-\brief Check if any valid data exists in persist memory
-\
-\return operation result
-******************************************************************************/
-PDS_DataServerState_t pdsCheckPersistMemory(void);
-
-#ifdef __DBG_PDS__
- void pdsDbgReadAllEeprom(void);
-#endif
-
-#endif /* _COMMISSIONING_ */
-#endif /*_PDSCRCSERVICE_H*/
diff --git a/digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include/private/pdsDbg.h b/digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include/private/pdsDbg.h
deleted file mode 100644
index b336095f..00000000
--- a/digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include/private/pdsDbg.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/******************************************************************************
- \file csDbg.h
-
- \brief
- Persistent Data Server debug info
-
- \author
- Atmel Corporation: http://www.atmel.com \n
- Support email: avr@atmel.com
-
- Copyright (c) 2010 , Atmel Corporation. All rights reserved.
- Licensed under Atmel's Limited License Agreement (BitCloudTM).
-
- \internal
- History:
- 29.10.10 A. Razinkov - Created.
-******************************************************************************/
-
-#ifndef _PDSDBG_H_
-#define _PDSDBG_H_
-
-/******************************************************************************
- Includes section
-******************************************************************************/
-#include <dbg.h>
-
-/******************************************************************************
- Types section
-******************************************************************************/
-
-typedef enum
-{
- PDS_PDSPREPAREMEMORYACCESS0,
- PDS_PDSPREPAREMEMORYACCESS1
-} PDS_DbgCodeId_t;
-
-#endif /* CSDBG_H_ */
diff --git a/digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include/private/pdsMemAbstract.h b/digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include/private/pdsMemAbstract.h
deleted file mode 100644
index ca95f064..00000000
--- a/digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include/private/pdsMemAbstract.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/***************************************************************************//**
- \file pdsMemAbstract.h
-
- \brief Memory abstract header
-
- \author
- Atmel Corporation: http://www.atmel.com \n
- Support email: avr@atmel.com
-
- Copyright (c) 2008-2011, Atmel Corporation. All rights reserved.
- Licensed under Atmel's Limited License Agreement (BitCloudTM).
-
- \internal
- History:
- 6/11/08 A. Khromykh - Created
-*****************************************************************************/
-#ifndef _PDSMEMABSTRACT_H
-#define _PDSMEMABSTRACT_H
-
-/* Type of usage memory */
-#define USE_EEPROM
-
-/* This header file performs persistence memory API redefinition.
- * The goal is to achieve memory type independence for persist data server (PDS).
- *
- *
- * MEMORY_DESCRIPTOR - persistence memory descriptor. It is a structure type, which
- * includes the following variables:
- * uint16_t address - internal persistence memory address to be accessed.
- * uint8_t *data - pointer to the variable in RAM to be stored (or to be filled
- * by read value from persistence).
- * uint16_t length - "data" variable length (bytes). Equal to the number of bytes
- * to be exchanged between persistence memory and RAM.
- *
- *
- * WRITE_MEMORY, READ_MEMORY - persistence memory access functions. These functions
- * should have the following form:
- * int write/read(MEMORY_DESCRIPTOR *memoryDescr, void (*callback)(void));
- * Parameters:
- * memoryDescr - pointer to memory descriptor
- * callback - pointer to callback function. Callback function will be called
- * after read or write persistence memory operation is completed.
- * Returns:
- * 0 - successful access;
- * -1 - the number of bytes to read (write) is too large.
- * Persistence memory access functions should perform memory arbitration also, i.e.
- * memory busy return status is illegal.
- *
- *
- * IS_MEMORY_BUSY - persistence memory access function, should have the following form:
- * bool isMemoryBusy(void);
- * Parameters:
- * none.
- * Returns:
- * true - memory is busy
- * false - memory is free;
-*/
-
-#if defined(USE_EEPROM)
-
-#include <eeprom.h>
-
-#define WRITE_MEMORY HAL_WriteEeprom
-#define READ_MEMORY HAL_ReadEeprom
-#define IS_MEMORY_BUSY HAL_IsEepromBusy
-#define MEMORY_DESCRIPTOR HAL_EepromParams_t
-
-#endif
-
-#endif /* _PDSMEMABSTRACT_H */
diff --git a/digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include/private/pdsWriteData.h b/digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include/private/pdsWriteData.h
deleted file mode 100644
index 17cedbc4..00000000
--- a/digital/beacon/src/Bitcloud_stack/Components/PersistDataServer/include/private/pdsWriteData.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/******************************************************************************
- \file csDbg.h
-
- \brief
- Persistent Periodic data save implementation header
-
- \author
- Atmel Corporation: http://www.atmel.com \n
- Support email: avr@atmel.com
-
- Copyright (c) 2010 , Atmel Corporation. All rights reserved.
- Licensed under Atmel's Limited License Agreement (BitCloudTM).
-
- \internal
- History:
- 29.10.10 A. Razinkov - Created.
-******************************************************************************/
-
-#ifndef _PDSWRITEDATA_H_
-#define _PDSWRITEDATA_H_
-
-/******************************************************************************
- Includes section
-******************************************************************************/
-#include <pdsMemAbstract.h>
-
-#ifdef _COMMISSIONING_
-/******************************************************************************
- Functions prototypes section
-******************************************************************************/
-/******************************************************************************
-\brief Update persistent items values in Configuration Server from persist memory
-\
-\return Operation result
-******************************************************************************/
-PDS_DataServerState_t pdsUpdate(void);
-
-/******************************************************************************
-\brief Locates parameter by it's index in persistent memory table. And prepares
-\ memory descriptor to store parameter's value in EEPROM
-\
-\param[in] index - index of the parameter in persistent memory table
-\param[out]descriptor - memory descriptor to store parameter value
-******************************************************************************/
-void pdsPrepareMemoryAccess(uint8_t index, MEMORY_DESCRIPTOR* descriptor);
-
-/******************************************************************************
-\brief Timer callback, initiates the commit process.
-******************************************************************************/
-void pdsOnTimerSave(void);
-
-/*******************************************************************************
-\brief Start server work
-*******************************************************************************/
-void pdsStartPersistServer(void);
-#endif /* _COMMISSIONING_ */
-
-/******************************************************************************
-\brief Writes data to persist memory
-\
-\param[in] descriptor - memory descriptor to store parameter value
-\param[out]callback - callback to write-finidhed event handler
-******************************************************************************/
-PDS_DataServerState_t pdsWrite(MEMORY_DESCRIPTOR* descriptor, void (*callback)(void));
-
-/******************************************************************************
-\brief Read data from persist memory
-\
-\param[in] descriptor - memory descriptor to read parameter value
-\param[out]callback - callback to read-finished event handler
-******************************************************************************/
-PDS_DataServerState_t pdsRead(MEMORY_DESCRIPTOR* descriptor, void (*callback)(void));
-
-/******************************************************************************
-\brief Wait until memory be ready for transaction
-******************************************************************************/
-void pdsWaitMemoryFree(void);
-
-/*******************************************************************************
-\brief Dummy callback
-*******************************************************************************/
-void pdsDummyCallback(void);
-
-#endif /* _PDSWRITEDATA_H_ */