2 * Copyright (C) 2007 Anton Blad
3 * Copyright (C) 2007 Fredrik Kuivinen
4 * Copyright (C) 2007 Jakob Rosén
6 * This file is licensed under GPL v2.
9 #include <util/crc16.h>
12 volatile enum buffer_status buffer_flags
= BUFFER_OK
;
13 volatile uint16_t buffer
[BUFFER_CAPACITY
];
14 volatile buf_t buffer_start
= 0;
15 volatile buf_t buffer_size
= 0;
16 volatile uint16_t buffer_crc
= 0xffff;
17 volatile uint32_t buffer_crc_len
= 0;
19 void update_crc(uint16_t w
)
21 buffer_crc
= _crc16_update(buffer_crc
, w
>> 8);
22 buffer_crc
= _crc16_update(buffer_crc
, w
& 0xff);