-
Notifications
You must be signed in to change notification settings - Fork 4
/
GlobalDef.h
45 lines (37 loc) · 2.04 KB
/
GlobalDef.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*--------------------------------------------------------------------------------------------------
Name : GlobalDef.h
Description : Global definitions.
History : 2004/04/06 - Created by Louis Frigon.
--------------------------------------------------------------------------------------------------*/
#ifndef _GLOBALDEF_H_
#define _GLOBALDEF_H_
#include <avr/io.h>
/*--------------------------------------------------------------------------------------------------
Constants
--------------------------------------------------------------------------------------------------*/
#define FALSE 0
#define TRUE (!FALSE)
// AVC LAN bus directly connected to internal analog comparator (PD6/7)
// PD6 AIN0 +
// PD7 AIN1 -
#define DATAIN_PIN ACSR
#define DATAIN ACO
#define INPUT_IS_SET ( bit_is_set( DATAIN_PIN, DATAIN ) )
#define INPUT_IS_CLEAR ( bit_is_clear( DATAIN_PIN, DATAIN ) )
#define LED_DDR DDRB
#define LED_PORT PORTB
#define LEDOUT _BV(PORT5)
/*--------------------------------------------------------------------------------------------------
Type definitions
--------------------------------------------------------------------------------------------------*/
typedef unsigned char byte;
typedef unsigned int word;
/*--------------------------------------------------------------------------------------------------
Prototypes
--------------------------------------------------------------------------------------------------*/
inline void LedOff( void );
inline void LedOn( void );
#endif // _GLOBALDEF_H_
/*--------------------------------------------------------------------------------------------------
End of file.
--------------------------------------------------------------------------------------------------*/