lkml.org 
[lkml]   [2006]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RESEND] CRC ITU-T V.41
On Thu, 22 Jun 2006 16:29:02 +0200 Ivo van Doorn wrote:

> diff --git a/lib/crc-itu-t.c b/lib/crc-itu-t.c
> new file mode 100644
> index 0000000..15128ae
> --- /dev/null
> +++ b/lib/crc-itu-t.c
> @@ -0,0 +1,69 @@
> +/*
> + * crc-itu-t.c
> + *
> + * This source code is licensed under the GNU General Public License,
> + * Version 2. See the file COPYING for more details.
> + */
> +
> +#include <linux/types.h>
> +#include <linux/module.h>
> +#include <linux/crc-itu-t.h>
> +
> +/**
> + * crc_itu_t - Compute the CRC-ITU-T for the data buffer
> + *

no blank ('*') line here (above), please.
kernel-doc doesn't expect that.

> + * @crc: previous CRC value
> + * @buffer: data pointer
> + * @len: number of bytes in the buffer
> + *
> + * Returns the updated CRC value
> + */
> +u16 crc_itu_t(u16 crc, const u8 *buffer, size_t len)
> +{
> + while (len--)
> + crc = crc_itu_t_byte(crc, *buffer++);
> + return crc;
> +}

---
~Randy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-22 18:07    [W:0.039 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site