-
Notifications
You must be signed in to change notification settings - Fork 233
/
Copy pathhamming.h
34 lines (27 loc) · 994 Bytes
/
hamming.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
* Copyright (C) 2008 Microchip Technology Inc. and its subsidiaries
*
* SPDX-License-Identifier: MIT
*/
#ifndef __HAMMING_H__
#define __HAMMING_H__
/*
*------------------------------------------------------------------------------
* Macro Defines
*------------------------------------------------------------------------------
*/
/* A single bit was incorrect but has been recovered */
#define Hamming_ERROR_SINGLEBIT 1
/* The original code has been corrupted */
#define Hamming_ERROR_ECC 2
/* Multiple bits are incorrect in the data and they cannot be corrected */
#define Hamming_ERROR_MULTIPLEBITS 3
/*
*------------------------------------------------------------------------------
* Exported functions
*------------------------------------------------------------------------------
*/
extern unsigned char Hamming_Verify256x(unsigned char *data,
unsigned int size,
const unsigned char *ecc_from_nand);
#endif /* #ifndef __HAMMING_H__ */