15
15
*/
16
16
17
17
#include < stdint.h>
18
+ #include " drivers/TableCRC.h"
18
19
19
20
namespace mbed {
20
21
/* * \addtogroup drivers */
21
22
/* * @{*/
22
23
23
- uint8_t Table_CRC_7Bit_SD[256 ] = {
24
+ extern const uint8_t Table_CRC_7Bit_SD[MBED_CRC_TABLE_SIZE ] = {
24
25
0x0 , 0x12 , 0x24 , 0x36 , 0x48 , 0x5a , 0x6c , 0x7e , 0x90 , 0x82 , 0xb4 , 0xa6 , 0xd8 , 0xca , 0xfc , 0xee ,
25
26
0x32 , 0x20 , 0x16 , 0x4 , 0x7a , 0x68 , 0x5e , 0x4c , 0xa2 , 0xb0 , 0x86 , 0x94 , 0xea , 0xf8 , 0xce , 0xdc ,
26
27
0x64 , 0x76 , 0x40 , 0x52 , 0x2c , 0x3e , 0x8 , 0x1a , 0xf4 , 0xe6 , 0xd0 , 0xc2 , 0xbc , 0xae , 0x98 , 0x8a ,
@@ -39,7 +40,7 @@ uint8_t Table_CRC_7Bit_SD[256] = {
39
40
0x1c , 0xe , 0x38 , 0x2a , 0x54 , 0x46 , 0x70 , 0x62 , 0x8c , 0x9e , 0xa8 , 0xba , 0xc4 , 0xd6 , 0xe0 , 0xf2
40
41
};
41
42
42
- uint8_t Table_CRC_8bit_CCITT[256 ] = {
43
+ extern const uint8_t Table_CRC_8bit_CCITT[MBED_CRC_TABLE_SIZE ] = {
43
44
0x0 , 0x7 , 0xe , 0x9 , 0x1c , 0x1b , 0x12 , 0x15 , 0x38 , 0x3f , 0x36 , 0x31 , 0x24 , 0x23 , 0x2a , 0x2d ,
44
45
0x70 , 0x77 , 0x7e , 0x79 , 0x6c , 0x6b , 0x62 , 0x65 , 0x48 , 0x4f , 0x46 , 0x41 , 0x54 , 0x53 , 0x5a , 0x5d ,
45
46
0xe0 , 0xe7 , 0xee , 0xe9 , 0xfc , 0xfb , 0xf2 , 0xf5 , 0xd8 , 0xdf , 0xd6 , 0xd1 , 0xc4 , 0xc3 , 0xca , 0xcd ,
@@ -58,7 +59,7 @@ uint8_t Table_CRC_8bit_CCITT[256] = {
58
59
0xde , 0xd9 , 0xd0 , 0xd7 , 0xc2 , 0xc5 , 0xcc , 0xcb , 0xe6 , 0xe1 , 0xe8 , 0xef , 0xfa , 0xfd , 0xf4 , 0xf3
59
60
};
60
61
61
- uint16_t Table_CRC_16bit_CCITT[256 ] = {
62
+ extern const uint16_t Table_CRC_16bit_CCITT[MBED_CRC_TABLE_SIZE ] = {
62
63
0x0 , 0x1021 , 0x2042 , 0x3063 , 0x4084 , 0x50a5 , 0x60c6 , 0x70e7 , 0x8108 , 0x9129 , 0xa14a , 0xb16b ,
63
64
0xc18c , 0xd1ad , 0xe1ce , 0xf1ef , 0x1231 , 0x210 , 0x3273 , 0x2252 , 0x52b5 , 0x4294 , 0x72f7 , 0x62d6 ,
64
65
0x9339 , 0x8318 , 0xb37b , 0xa35a , 0xd3bd , 0xc39c , 0xf3ff , 0xe3de , 0x2462 , 0x3443 , 0x420 , 0x1401 ,
@@ -83,7 +84,7 @@ uint16_t Table_CRC_16bit_CCITT[256] = {
83
84
0x2e93 , 0x3eb2 , 0x0ed1 , 0x1ef0
84
85
};
85
86
86
- uint16_t Table_CRC_16bit_IBM[256 ] = {
87
+ extern const uint16_t Table_CRC_16bit_IBM[MBED_CRC_TABLE_SIZE ] = {
87
88
0x0 , 0x8005 , 0x800f , 0xa , 0x801b , 0x1e , 0x14 , 0x8011 , 0x8033 , 0x36 , 0x3c , 0x8039 ,
88
89
0x28 , 0x802d , 0x8027 , 0x22 , 0x8063 , 0x66 , 0x6c , 0x8069 , 0x78 , 0x807d , 0x8077 , 0x72 ,
89
90
0x50 , 0x8055 , 0x805f , 0x5a , 0x804b , 0x4e , 0x44 , 0x8041 , 0x80c3 , 0xc6 , 0xcc , 0x80c9 ,
@@ -107,7 +108,7 @@ uint16_t Table_CRC_16bit_IBM[256] = {
107
108
0x220 , 0x8225 , 0x822f , 0x22a , 0x823b , 0x23e , 0x234 , 0x8231 , 0x8213 , 0x216 , 0x21c , 0x8219
108
109
};
109
110
110
- uint32_t Table_CRC_32bit_ANSI[256 ] = {
111
+ extern const uint32_t Table_CRC_32bit_ANSI[MBED_CRC_TABLE_SIZE ] = {
111
112
0x0 , 0x4c11db7 , 0x9823b6e , 0xd4326d9 , 0x130476dc , 0x17c56b6b , 0x1a864db2 , 0x1e475005 ,
112
113
0x2608edb8 , 0x22c9f00f , 0x2f8ad6d6 , 0x2b4bcb61 , 0x350c9b64 , 0x31cd86d3 , 0x3c8ea00a , 0x384fbdbd ,
113
114
0x4c11db70 , 0x48d0c6c7 , 0x4593e01e , 0x4152fda9 , 0x5f15adac , 0x5bd4b01b , 0x569796c2 , 0x52568b75 ,
0 commit comments