xref: /netbsd-src/sys/dev/nand/nand_crc.h (revision 2b6ee22130b628b099671b82a7a7f5c1f5a1f09e)
1*2b6ee221Sahoka /*	$NetBSD: nand_crc.h,v 1.1 2011/02/26 18:07:31 ahoka Exp $	*/
2*2b6ee221Sahoka 
3*2b6ee221Sahoka /*-
4*2b6ee221Sahoka  * Copyright (c) 2010 Department of Software Engineering,
5*2b6ee221Sahoka  *		      University of Szeged, Hungary
6*2b6ee221Sahoka  * Copyright (c) 2010 Adam Hoka <ahoka@NetBSD.org>
7*2b6ee221Sahoka  * All rights reserved.
8*2b6ee221Sahoka  *
9*2b6ee221Sahoka  * This code is derived from software contributed to The NetBSD Foundation
10*2b6ee221Sahoka  * by the Department of Software Engineering, University of Szeged, Hungary
11*2b6ee221Sahoka  *
12*2b6ee221Sahoka  * Redistribution and use in source and binary forms, with or without
13*2b6ee221Sahoka  * modification, are permitted provided that the following conditions
14*2b6ee221Sahoka  * are met:
15*2b6ee221Sahoka  * 1. Redistributions of source code must retain the above copyright
16*2b6ee221Sahoka  *    notice, this list of conditions and the following disclaimer.
17*2b6ee221Sahoka  * 2. Redistributions in binary form must reproduce the above copyright
18*2b6ee221Sahoka  *    notice, this list of conditions and the following disclaimer in the
19*2b6ee221Sahoka  *    documentation and/or other materials provided with the distribution.
20*2b6ee221Sahoka  *
21*2b6ee221Sahoka  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22*2b6ee221Sahoka  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23*2b6ee221Sahoka  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24*2b6ee221Sahoka  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25*2b6ee221Sahoka  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26*2b6ee221Sahoka  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27*2b6ee221Sahoka  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
28*2b6ee221Sahoka  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29*2b6ee221Sahoka  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30*2b6ee221Sahoka  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31*2b6ee221Sahoka  * SUCH DAMAGE.
32*2b6ee221Sahoka  */
33*2b6ee221Sahoka 
34*2b6ee221Sahoka #ifndef _NAND_CRC_H_
35*2b6ee221Sahoka #define _NAND_CRC_H_
36*2b6ee221Sahoka 
37*2b6ee221Sahoka #include <sys/param.h>
38*2b6ee221Sahoka #include <sys/types.h>
39*2b6ee221Sahoka 
40*2b6ee221Sahoka uint16_t nand_crc16(uint8_t *, size_t);
41*2b6ee221Sahoka 
42*2b6ee221Sahoka #endif
43