[Tinyos Core WG] CRC interface
David Moss
dmm at rincon.com
Wed Sep 26 15:28:14 PDT 2007
So.. how about we make the interface asynchronous while we're at it? This
can be used immediately to implement asynchronous software CRC checking of
radio packets.
interface Crc {
/**
* Compute the CRC-16 value of a byte array.
*
* @param buf A pointer to the buffer over which to compute CRC.
* @param len The length of the buffer over which to compute CRC.
* @return The CRC-16 value.
*/
async command uint16_t crc16(void* buf, uint8_t len);
/**
* Compute a generic CRC-16 using a given seed. Used to compute CRC's
* of discontinuous data.
*
* @param startCrc An initial CRC value to begin with
* @param buf A pointer to a buffer of data
* @param len The length of the buffer
* @return The CRC-16 value.
*/
async command uint16_t seededCrc16(uint16_t startCrc, void *buf, uint8_t
len);
}
If there are no more suggestions, I'll update these modules by the end of
the week.
-David
-----Original Message-----
From: Philip Levis [mailto:pal at cs.stanford.edu]
Sent: Tuesday, September 25, 2007 11:11 PM
To: Kevin Klues
Cc: David Moss; TinyOS Core WG
Subject: Re: [Tinyos Core WG] CRC interface
On Sep 25, 2007, at 9:13 PM, Kevin Klues wrote:
> Does crc16_seeded follow the coding standard in TEP 3?
>
> Section 4.1.1
> Commands, events, tasks and functions should be mixed case,
> starting lower case.
Nope. Whoops. :)
Phil
More information about the Tinyos-2.0wg
mailing list