view network/test_avr.h @ 109:315850d48eec avr-http

Remove previous avrusbmodem import
author Matt Johnston <matt@ucc.asn.au>
date Sat, 15 Sep 2012 21:44:37 +0800
parents b523761181f5
children
line wrap: on
line source

#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