1 
2 #include "vpdecc_support.h"
3 
4 #include <string.h>
5 
6 /******************************************************************************/
7 /* seepromGetEcc                                                              */
8 /*                                                                            */
9 /* Calculates the 7 bit ECC code of a 32 bit data word and returns it         */
10 /*                                                                            */
11 /******************************************************************************/
seepromGetEcc(const unsigned char * data)12 inline unsigned char seepromGetEcc(const unsigned char* data)
13 {
14     unsigned char vResult = 0x00;
15     return vResult;
16 }
17 
18 /******************************************************************************/
19 /*                                                                            */
20 /******************************************************************************/
seepromScramble(const int bitOffset,const unsigned char * cleanData,size_t cleanSize,unsigned char * scrambledData,size_t scrambledSize)21 int seepromScramble(const int bitOffset, const unsigned char* cleanData,
22                     size_t cleanSize, unsigned char* scrambledData,
23                     size_t scrambledSize)
24 {
25     int vRet = 0;
26     return vRet;
27 }
28 
29 /******************************************************************************/
30 /*                                                                            */
31 /******************************************************************************/
seepromUnscramble(const int bitOffset,const unsigned char * scrambledData,size_t scrambledSize,unsigned char * cleanData,size_t cleanSize)32 int seepromUnscramble(const int bitOffset, const unsigned char* scrambledData,
33                       size_t scrambledSize, unsigned char* cleanData,
34                       size_t cleanSize)
35 {
36     int vRet = 0;
37     return vRet;
38 }
39 
40 /******************************************************************************/
41 /* seepromGenCsDecode                                                         */
42 /*                                                                            */
43 /*                                                                            */
44 /******************************************************************************/
seepromGenCsDecode(const unsigned char numBits,const unsigned char syndrome,const unsigned char * csdSyndroms,unsigned char * vResult)45 void seepromGenCsDecode(const unsigned char numBits,
46                         const unsigned char syndrome,
47                         const unsigned char* csdSyndroms,
48                         unsigned char* vResult)
49 {}
50 
51 /******************************************************************************/
52 /* seepromGenerateCheckSyndromDecode                                          */
53 /*                                                                            */
54 /*                                                                            */
55 /******************************************************************************/
seepromGenerateCheckSyndromDecode(const unsigned char checkSyndrom,unsigned char * csdData,unsigned char * csdEcc)56 void seepromGenerateCheckSyndromDecode(const unsigned char checkSyndrom,
57                                        unsigned char* csdData,
58                                        unsigned char* csdEcc)
59 {}
60 
61 /******************************************************************************/
62 /* seepromEccCheck                                                            */
63 /*                                                                            */
64 /* Checks the data integrity and correct it if possible                       */
65 /*                                                                            */
66 /******************************************************************************/
67 
seepromEccCheck(unsigned char * vData,unsigned char * vEcc,size_t numOfWords)68 int seepromEccCheck(unsigned char* vData, unsigned char* vEcc,
69                     size_t numOfWords)
70 {
71     int vRet = 0;
72     return vRet;
73 }
74