Alpana Kumari | c0aeac3 | 2019-11-28 05:20:10 -0600 | [diff] [blame] | 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 | /******************************************************************************/ |
| 12 | inline unsigned char seepromGetEcc(const unsigned char* data) |
| 13 | { |
| 14 | unsigned char vResult = 0x00; |
| 15 | return vResult; |
| 16 | } |
| 17 | |
| 18 | /******************************************************************************/ |
| 19 | /* */ |
| 20 | /******************************************************************************/ |
| 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 | /******************************************************************************/ |
| 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 | /******************************************************************************/ |
| 45 | void seepromGenCsDecode(const unsigned char numBits, |
| 46 | const unsigned char syndrom, |
| 47 | const unsigned char* csdSyndroms, |
| 48 | unsigned char* vResult) |
| 49 | { |
| 50 | } |
| 51 | |
| 52 | /******************************************************************************/ |
| 53 | /* seepromGenerateCheckSyndromDecode */ |
| 54 | /* */ |
| 55 | /* */ |
| 56 | /******************************************************************************/ |
| 57 | void seepromGenerateCheckSyndromDecode(const unsigned char checkSyndrom, |
| 58 | unsigned char* csdData, |
| 59 | unsigned char* csdEcc) |
| 60 | { |
| 61 | } |
| 62 | |
| 63 | /******************************************************************************/ |
| 64 | /* seepromEccCheck */ |
| 65 | /* */ |
| 66 | /* Checks the data integrety and correct it if possible */ |
| 67 | /* */ |
| 68 | /******************************************************************************/ |
| 69 | |
| 70 | int seepromEccCheck(unsigned char* vData, unsigned char* vEcc, |
| 71 | size_t numOfWords) |
| 72 | { |
| 73 | int vRet = 0; |
| 74 | return vRet; |
| 75 | } |