receiver/main.h

Wed, 16 Nov 2011 17:04:10 +0100

author
Malte Bayer <mbayer@neo-soft.org>
date
Wed, 16 Nov 2011 17:04:10 +0100
changeset 9
20dbe0546a36
child 11
69c2a1408619
permissions
-rw-r--r--

added receiver testing stuff

#ifndef MAIN_H
#define MAIN_H

#include <avr/wdt.h>

#define uchar unsigned char
#define uint unsigned int

// Macro used to write to a single I/O pin
#define writeBit(port,bit,value) { if ((value)>0) (port) |= (1<<bit); else (port) &= ~(1<<bit); } 

// Macro used to read from a single I/O pin
#define readBit(port,bit) (((port) >> (bit)) & 1)

// we have internal AREF...
// #define EXT_AREF 1

// RESET ROUTINE FOR DOING A SOFT-RESET:
#define soft_reset()        \
do                          \
{                           \
    wdt_enable(WDTO_15MS);  \
    for(;;)                 \
    {                       \
    }                       \
} while(0)


#endif

mercurial