mirror of
https://github.com/halleysfifthinc/AVCLAN-Mockingboard.git
synced 2026-08-07 01:13:18 +00:00
51 lines
2.0 KiB
C
51 lines
2.0 KiB
C
/*--------------------------------------------------------------------------------------------------
|
|
|
|
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.
|
|
--------------------------------------------------------------------------------------------------*/
|