//-----------------------------------------------------------------------------
///
/// \brief  Retain data
///
///         A defined data region is hold in e.g. flahs.
///         There are several storage areas (pages) to hold data redundant.
///         Currently the data area size must not exceed the page size of the
///         flash.
///
/// \date   20160513
/// \author Maximilian Seesslen <mes@seesslen.net>
///
//-----------------------------------------------------------------------------


//---Includes------------------------------------------------------------------


//---Own------------------------------

#include <biwak/retain.h>
#include <lepto/log.h>
//#include <lepto/crc32.h>
#include <cstring>


//---Implementation------------------------------------------------------------


/// \brief  Le contructeur
///
CRetain::CRetain(CFlash &_flash, int size /*=0*/, int _containerCount/*=2*/ /*, int _pageOffset*/ /*=0*/ )
   :m_flash(_flash)
{
   //data=nullptr;
   m_dataSize=0;

   m_containerCount=_containerCount;

   for(int i1=0; i1<m_containerCount; i1++)
   {
      m_containerAddress[i1] = 0;
   }

   return;
}


void CRetain::setData(void *_data, int _dataSize, int layoutVersionMajor, int layoutVersionMinor)
{
   return;
}


int CRetain::store()
{
   return(0);
}


int CRetain::restore()
{
   return(0);
}


//---fin-----------------------------------------------------------------------
