annotate old/crc8.h @ 614:e1bab5b36352 rust

using some refcells for the paramwaiter
author Matt Johnston <matt@ucc.asn.au>
date Tue, 07 Mar 2017 23:04:02 +0800
parents 11a1b59b0624
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
1 #ifndef CRC8_H_
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
2 #define CRC8_H_
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
3
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
4 #ifdef __cplusplus
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
5 extern "C" {
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
6 #endif
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
7
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
8 #include <stdint.h>
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
9
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
10 uint8_t crc8( uint8_t* data, uint16_t number_of_bytes_in_data );
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
11
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
12 #ifdef __cplusplus
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
13 }
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
14 #endif
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
15
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
16 #endif
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
17
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
18 /*
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
19 This is based on code from :
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
20
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
21 Copyright (c) 2002 Colin O'Flynn
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
22
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
23 Permission is hereby granted, free of charge, to any person obtaining a copy of
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
24 this software and associated documentation files (the "Software"), to deal in
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
25 the Software without restriction, including without limitation the rights to
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
26 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
27 the Software, and to permit persons to whom the Software is furnished to do so,
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
28 subject to the following conditions:
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
29
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
30 The above copyright notice and this permission notice shall be included in all
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
31 copies or substantial portions of the Software.
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
32
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
33 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
34 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
35 FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
36 COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
37 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
38 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
39 */
7da9a3f23592 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
40