# HG changeset patch # User Matt Johnston # Date 1347716595 -28800 # Node ID b523761181f5a066b9630a6e7cfa5f943bb7fc0b # Parent 56d09a0969b530ca0cabf83198e1c5b5e0997a7f Add some replacement functions for testing diff -r 56d09a0969b5 -r b523761181f5 network/test_avr.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/network/test_avr.h Sat Sep 15 21:43:15 2012 +0800 @@ -0,0 +1,24 @@ +#ifndef _TEST_AVR_H +#define _TEST_AVR_H + +#include +#include + +static uint16_t _crc_ccitt_update (uint16_t crc, uint8_t data) +{ + data ^= crc & 0xff; + data ^= data << 4; + + return ((((uint16_t)data << 8) | ((crc >> 8) & 0xff)) ^ (uint8_t)(data >> 4) + ^ ((uint16_t)data << 3)); +} + +static void _delay_ms (double __ms) +{ + usleep(__ms*1000); +} + +static + + +#endif // _TEST_AVR_H