Re: [PATCH RESEND] CRC ITU-T V.41
From: Randy.Dunlap
Date: Thu Jun 22 2006 - 12:03:49 EST
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/