mirror of
https://github.com/AetherDroid/android_kernel_samsung_on5xelte.git
synced 2025-09-08 17:18:05 -04:00
Fixed MTP to work with TWRP
This commit is contained in:
commit
f6dfaef42e
50820 changed files with 20846062 additions and 0 deletions
30
include/linux/crc16.h
Normal file
30
include/linux/crc16.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* crc16.h - CRC-16 routine
|
||||
*
|
||||
* Implements the standard CRC-16:
|
||||
* Width 16
|
||||
* Poly 0x8005 (x^16 + x^15 + x^2 + 1)
|
||||
* Init 0
|
||||
*
|
||||
* Copyright (c) 2005 Ben Gardner <bgardner@wabtec.com>
|
||||
*
|
||||
* This source code is licensed under the GNU General Public License,
|
||||
* Version 2. See the file COPYING for more details.
|
||||
*/
|
||||
|
||||
#ifndef __CRC16_H
|
||||
#define __CRC16_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
extern u16 const crc16_table[256];
|
||||
|
||||
extern u16 crc16(u16 crc, const u8 *buffer, size_t len);
|
||||
|
||||
static inline u16 crc16_byte(u16 crc, const u8 data)
|
||||
{
|
||||
return (crc >> 8) ^ crc16_table[(crc ^ data) & 0xff];
|
||||
}
|
||||
|
||||
#endif /* __CRC16_H */
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue