diff network/test_avr.h @ 108:b523761181f5 avr-http

Add some replacement functions for testing
author Matt Johnston <matt@ucc.asn.au>
date Sat, 15 Sep 2012 21:43:15 +0800
parents
children
line wrap: on
line diff
--- /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 <stdint.h>
+#include <unistd.h>
+
+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